@@ -53,7 +53,11 @@ enum {
5353 JMM_VERSION_2 = 0x20020000 , // JDK 10
5454 JMM_VERSION_3 = 0x20030000 , // JDK 14
5555 JMM_VERSION_4 = 0x20040000 , // JDK 21
56+ #if HOTSPOT_TARGET_CLASSLIB == 8
57+ JMM_VERSION = 0x20010203
58+ #else
5659 JMM_VERSION = JMM_VERSION_4
60+ #endif
5761};
5862
5963typedef struct {
@@ -62,6 +66,9 @@ typedef struct {
6266 unsigned int isThreadContentionMonitoringSupported : 1 ;
6367 unsigned int isCurrentThreadCpuTimeSupported : 1 ;
6468 unsigned int isOtherThreadCpuTimeSupported : 1 ;
69+ #if HOTSPOT_TARGET_CLASSLIB == 8
70+ unsigned int isBootClassPathSupported : 1 ;
71+ #endif
6572 unsigned int isObjectMonitorUsageSupported : 1 ;
6673 unsigned int isSynchronizerUsageSupported : 1 ;
6774 unsigned int isThreadAllocatedMemorySupported : 1 ;
@@ -346,6 +353,140 @@ typedef struct jmmInterface_1_ {
346353 jboolean enabled );
347354} JmmInterface ;
348355
356+ #if HOTSPOT_TARGET_CLASSLIB == 8
357+ typedef struct jmmInterface_1_2_3_ {
358+ jlong (JNICALL * GetTotalThreadAllocatedMemory )
359+ (JNIEnv * env );
360+ jlong (JNICALL * GetOneThreadAllocatedMemory )
361+ (JNIEnv * env ,
362+ jlong thread_id );
363+
364+ jint (JNICALL * GetVersion ) (JNIEnv * env );
365+
366+ jint (JNICALL * GetOptionalSupport ) (JNIEnv * env ,
367+ jmmOptionalSupport * support_ptr );
368+
369+ /* This is used by JDK 6 and earlier.
370+ * For JDK 7 and after, use GetInputArgumentArray.
371+ */
372+ jobject (JNICALL * GetInputArguments ) (JNIEnv * env );
373+
374+ jint (JNICALL * GetThreadInfo ) (JNIEnv * env ,
375+ jlongArray ids ,
376+ jint maxDepth ,
377+ jobjectArray infoArray );
378+ jobjectArray (JNICALL * GetInputArgumentArray ) (JNIEnv * env );
379+
380+ jobjectArray (JNICALL * GetMemoryPools ) (JNIEnv * env , jobject mgr );
381+
382+ jobjectArray (JNICALL * GetMemoryManagers ) (JNIEnv * env , jobject pool );
383+
384+ jobject (JNICALL * GetMemoryPoolUsage ) (JNIEnv * env , jobject pool );
385+ jobject (JNICALL * GetPeakMemoryPoolUsage ) (JNIEnv * env , jobject pool );
386+
387+ void (JNICALL * GetThreadAllocatedMemory )
388+ (JNIEnv * env ,
389+ jlongArray ids ,
390+ jlongArray sizeArray );
391+
392+ jobject (JNICALL * GetMemoryUsage ) (JNIEnv * env , jboolean heap );
393+
394+ jlong (JNICALL * GetLongAttribute ) (JNIEnv * env , jobject obj , jmmLongAttribute att );
395+ jboolean (JNICALL * GetBoolAttribute ) (JNIEnv * env , jmmBoolAttribute att );
396+ jboolean (JNICALL * SetBoolAttribute ) (JNIEnv * env , jmmBoolAttribute att , jboolean flag );
397+
398+ jint (JNICALL * GetLongAttributes ) (JNIEnv * env ,
399+ jobject obj ,
400+ jmmLongAttribute * atts ,
401+ jint count ,
402+ jlong * result );
403+
404+ jobjectArray (JNICALL * FindCircularBlockedThreads ) (JNIEnv * env );
405+
406+ // Not used in JDK 6 or JDK 7
407+ jlong (JNICALL * GetThreadCpuTime ) (JNIEnv * env , jlong thread_id );
408+
409+ jobjectArray (JNICALL * GetVMGlobalNames ) (JNIEnv * env );
410+ jint (JNICALL * GetVMGlobals ) (JNIEnv * env ,
411+ jobjectArray names ,
412+ jmmVMGlobal * globals ,
413+ jint count );
414+
415+ jint (JNICALL * GetInternalThreadTimes ) (JNIEnv * env ,
416+ jobjectArray names ,
417+ jlongArray times );
418+
419+ jboolean (JNICALL * ResetStatistic ) (JNIEnv * env ,
420+ jvalue obj ,
421+ jmmStatisticType type );
422+
423+ void (JNICALL * SetPoolSensor ) (JNIEnv * env ,
424+ jobject pool ,
425+ jmmThresholdType type ,
426+ jobject sensor );
427+
428+ jlong (JNICALL * SetPoolThreshold ) (JNIEnv * env ,
429+ jobject pool ,
430+ jmmThresholdType type ,
431+ jlong threshold );
432+ jobject (JNICALL * GetPoolCollectionUsage ) (JNIEnv * env , jobject pool );
433+
434+ jint (JNICALL * GetGCExtAttributeInfo ) (JNIEnv * env ,
435+ jobject mgr ,
436+ jmmExtAttributeInfo * ext_info ,
437+ jint count );
438+ void (JNICALL * GetLastGCStat ) (JNIEnv * env ,
439+ jobject mgr ,
440+ jmmGCStat * gc_stat );
441+
442+ jlong (JNICALL * GetThreadCpuTimeWithKind )
443+ (JNIEnv * env ,
444+ jlong thread_id ,
445+ jboolean user_sys_cpu_time );
446+ void (JNICALL * GetThreadCpuTimesWithKind )
447+ (JNIEnv * env ,
448+ jlongArray ids ,
449+ jlongArray timeArray ,
450+ jboolean user_sys_cpu_time );
451+
452+ jint (JNICALL * DumpHeap0 ) (JNIEnv * env ,
453+ jstring outputfile ,
454+ jboolean live );
455+ jobjectArray (JNICALL * FindDeadlocks ) (JNIEnv * env ,
456+ jboolean object_monitors_only );
457+ void (JNICALL * SetVMGlobal ) (JNIEnv * env ,
458+ jstring flag_name ,
459+ jvalue new_value );
460+ jobjectArray (JNICALL * DumpThreadsMaxDepth ) (JNIEnv * env ,
461+ jlongArray ids ,
462+ jboolean lockedMonitors ,
463+ jboolean lockedSynchronizers ,
464+ jint maxDepth );
465+ jobjectArray (JNICALL * DumpThreads ) (JNIEnv * env ,
466+ jlongArray ids ,
467+ jboolean lockedMonitors ,
468+ jboolean lockedSynchronizers );
469+ void (JNICALL * SetGCNotificationEnabled ) (JNIEnv * env ,
470+ jobject mgr ,
471+ jboolean enabled );
472+ jobjectArray (JNICALL * GetDiagnosticCommands ) (JNIEnv * env );
473+ void (JNICALL * GetDiagnosticCommandInfo )
474+ (JNIEnv * env ,
475+ jobjectArray cmds ,
476+ dcmdInfo * infoArray );
477+ void (JNICALL * GetDiagnosticCommandArgumentsInfo )
478+ (JNIEnv * env ,
479+ jstring commandName ,
480+ dcmdArgInfo * infoArray );
481+ jstring (JNICALL * ExecuteDiagnosticCommand )
482+ (JNIEnv * env ,
483+ jstring command );
484+ void (JNICALL * SetDiagnosticFrameworkNotificationEnabled )
485+ (JNIEnv * env ,
486+ jboolean enabled );
487+ } JmmInterface_1_2_3 ;
488+ #endif
489+
349490#ifdef __cplusplus
350491} /* extern "C" */
351492#endif /* __cplusplus */
0 commit comments