changeset 43952:8c42125f77c4

8172969: JVMTI spec: GetCurrentThread may return NULL in the early start phase Summary: Update the GetCurrentThread function spec to allow returning NULL Reviewed-by: dholmes, dcubed, alanb
author sspitsyn
date Mon, 13 Feb 2017 14:39:50 -0800
parents 907b469266c8
children e7ebd1507bd7
files hotspot/src/share/vm/prims/jvmti.xml
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/prims/jvmti.xml	Sun Feb 12 20:21:31 2017 -0500
+++ b/hotspot/src/share/vm/prims/jvmti.xml	Mon Feb 13 14:39:50 2017 -0800
@@ -1486,6 +1486,10 @@
         Get the current thread.  
         The current thread is the Java programming language thread which has called the function.
+        The function may return <code>NULL</code> in the start phase if the
+        <internallink id="jvmtiCapabilities.can_generate_early_vmstart">
+        <code>can_generate_early_vmstart</code></internallink> capability is enabled
+        and the <code>java.lang.Thread</code> class has not been initialized yet.
         Note that most <jvmti/> functions that take a thread 
         as an argument will accept <code>NULL</code> to mean 
@@ -1498,7 +1502,7 @@
         <param id="thread_ptr">
-	     On return, points to the current thread.
+	     On return, points to the current thread, or <code>NULL</code>.
@@ -14735,6 +14739,11 @@
       Clarified can_redefine_any_classes, can_retransform_any_classes and IsModifiableClass API to
       disallow some implementation defined classes.
+  <change date="12 February 2017" version="9.0.0">
+      Minor update for GetCurrentThread function:
+       - The function may return NULL in the start phase if the
+         can_generate_early_vmstart capability is enabled.
+  </change>