< prev index next >

hotspot/src/share/vm/prims/jvm.h

Print this page




1167  * The following defines a private JVM interface that the JDK can query
1168  * for the JVM version and capabilities.  sun.misc.Version defines
1169  * the methods for getting the VM version and its capabilities.
1170  *
1171  * When a new bit is added, the following should be updated to provide
1172  * access to the new capability:
1173  *    HS:   JVM_GetVersionInfo and Abstract_VM_Version class
1174  *    SDK:  Version class
1175  *
1176  * Similary, a private JDK interface JDK_GetVersionInfo0 is defined for
1177  * JVM to query for the JDK version and capabilities.
1178  *
1179  * When a new bit is added, the following should be updated to provide
1180  * access to the new capability:
1181  *    HS:   JDK_Version class
1182  *    SDK:  JDK_GetVersionInfo0
1183  *
1184  * ==========================================================================
1185  */
1186 typedef struct {
1187     /* VM version string: follows the JDK release version naming convention    */
1188     unsigned int jvm_version;
1189     unsigned int update_version : 8;
1190     unsigned int special_update_version : 8;
1191     unsigned int reserved1 : 16;
1192     unsigned int reserved2;
1193 
1194     /* The following bits represents JVM supports that JDK has dependency on.
1195      * JDK can use these bits to determine which JVM version
1196      * and support it has to maintain runtime compatibility.
1197      *
1198      * When a new bit is added in a minor or update release, make sure
1199      * the new bit is also added in the main/baseline.
1200      */
1201     unsigned int is_attachable : 1;
1202     unsigned int : 31;
1203     unsigned int : 32;
1204     unsigned int : 32;
1205 } jvm_version_info;
1206 
1207 #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
1208 #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
1209 #define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
1210 #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
1211 
1212 JNIEXPORT void JNICALL
1213 JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
1214 
1215 typedef struct {
1216     // Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx
1217     unsigned int jdk_version;   /* Consists of major, minor, security (n.n.n) */
1218                                 /* and build number (xx) */
1219     unsigned int update_version : 8;         /* Update release version (uu) */
1220     unsigned int special_update_version : 8; /* Special update release version (c)*/
1221     unsigned int reserved1 : 16;
1222     unsigned int reserved2;
1223 
1224     /* The following bits represents new JDK supports that VM has dependency on.
1225      * VM implementation can use these bits to determine which JDK version
1226      * and support it has to maintain runtime compatibility.
1227      *
1228      * When a new bit is added in a minor or update release, make sure
1229      * the new bit is also added in the main/baseline.
1230      */
1231     unsigned int thread_park_blocker : 1;
1232     unsigned int post_vm_init_hook_enabled : 1;
1233     unsigned int pending_list_uses_discovered_field : 1;
1234     unsigned int : 29;
1235     unsigned int : 32;
1236     unsigned int : 32;
1237 } jdk_version_info;
1238 
1239 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
1240 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
1241 #define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
1242 
1243 /* Build number is available only for RE build.
1244  * It will be zero for internal builds.
1245  */
1246 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
1247 
1248 /*
1249  * This is the function JDK_GetVersionInfo0 defined in libjava.so
1250  * that is dynamically looked up by JVM.
1251  */
1252 typedef void (*jdk_version_info_fn_t)(jdk_version_info* info, size_t info_size);
1253 
1254 /*
1255  * This structure is used by the launcher to get the default thread
1256  * stack size from the VM using JNI_GetDefaultJavaVMInitArgs() with a
1257  * version of 1.1.  As it is not supported otherwise, it has been removed
1258  * from jni.h
1259  */
1260 typedef struct JDK1_1InitArgs {
1261     jint version;
1262 
1263     char **properties;
1264     jint checkSource;
1265     jint nativeStackSize;




1167  * The following defines a private JVM interface that the JDK can query
1168  * for the JVM version and capabilities.  sun.misc.Version defines
1169  * the methods for getting the VM version and its capabilities.
1170  *
1171  * When a new bit is added, the following should be updated to provide
1172  * access to the new capability:
1173  *    HS:   JVM_GetVersionInfo and Abstract_VM_Version class
1174  *    SDK:  Version class
1175  *
1176  * Similary, a private JDK interface JDK_GetVersionInfo0 is defined for
1177  * JVM to query for the JDK version and capabilities.
1178  *
1179  * When a new bit is added, the following should be updated to provide
1180  * access to the new capability:
1181  *    HS:   JDK_Version class
1182  *    SDK:  JDK_GetVersionInfo0
1183  *
1184  * ==========================================================================
1185  */
1186 typedef struct {
1187     unsigned int jvm_version; /* Encoded $VNUM as defined by JEP-223 */
1188     unsigned int patch_version : 8; /* JEP-223 patch version */
1189     unsigned int reserved3 : 8;

1190     unsigned int reserved1 : 16;
1191     unsigned int reserved2;
1192 
1193     /* The following bits represents JVM supports that JDK has dependency on.
1194      * JDK can use these bits to determine which JVM version
1195      * and support it has to maintain runtime compatibility.
1196      *
1197      * When a new bit is added in a minor or update release, make sure
1198      * the new bit is also added in the main/baseline.
1199      */
1200     unsigned int is_attachable : 1;
1201     unsigned int : 31;
1202     unsigned int : 32;
1203     unsigned int : 32;
1204 } jvm_version_info;
1205 
1206 #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
1207 #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
1208 #define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
1209 #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
1210 
1211 JNIEXPORT void JNICALL
1212 JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
1213 
1214 typedef struct {
1215     unsigned int jdk_version; /* Encoded $VNUM as defined by JEP-223 */
1216     unsigned int patch_version : 8; /* JEP-223 patch version */
1217     unsigned int reserved3 : 8;


1218     unsigned int reserved1 : 16;
1219     unsigned int reserved2;
1220 
1221     /* The following bits represents new JDK supports that VM has dependency on.
1222      * VM implementation can use these bits to determine which JDK version
1223      * and support it has to maintain runtime compatibility.
1224      *
1225      * When a new bit is added in a minor or update release, make sure
1226      * the new bit is also added in the main/baseline.
1227      */
1228     unsigned int thread_park_blocker : 1;
1229     unsigned int post_vm_init_hook_enabled : 1;
1230     unsigned int pending_list_uses_discovered_field : 1;
1231     unsigned int : 29;
1232     unsigned int : 32;
1233     unsigned int : 32;
1234 } jdk_version_info;
1235 
1236 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
1237 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
1238 #define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)




1239 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
1240 
1241 /*
1242  * This is the function JDK_GetVersionInfo0 defined in libjava.so
1243  * that is dynamically looked up by JVM.
1244  */
1245 typedef void (*jdk_version_info_fn_t)(jdk_version_info* info, size_t info_size);
1246 
1247 /*
1248  * This structure is used by the launcher to get the default thread
1249  * stack size from the VM using JNI_GetDefaultJavaVMInitArgs() with a
1250  * version of 1.1.  As it is not supported otherwise, it has been removed
1251  * from jni.h
1252  */
1253 typedef struct JDK1_1InitArgs {
1254     jint version;
1255 
1256     char **properties;
1257     jint checkSource;
1258     jint nativeStackSize;


< prev index next >