1.1 --- a/src/share/vm/services/jmm.h Fri Jan 07 03:38:19 2011 -0800 1.2 +++ b/src/share/vm/services/jmm.h Fri Jan 07 10:42:32 2011 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -60,7 +60,8 @@ 1.11 unsigned int isBootClassPathSupported : 1; 1.12 unsigned int isObjectMonitorUsageSupported : 1; 1.13 unsigned int isSynchronizerUsageSupported : 1; 1.14 - unsigned int : 24; 1.15 + unsigned int isThreadAllocatedMemorySupported : 1; 1.16 + unsigned int : 23; 1.17 } jmmOptionalSupport; 1.18 1.19 typedef enum { 1.20 @@ -105,7 +106,8 @@ 1.21 JMM_VERBOSE_GC = 21, 1.22 JMM_VERBOSE_CLASS = 22, 1.23 JMM_THREAD_CONTENTION_MONITORING = 23, 1.24 - JMM_THREAD_CPU_TIME = 24 1.25 + JMM_THREAD_CPU_TIME = 24, 1.26 + JMM_THREAD_ALLOCATED_MEMORY = 25 1.27 } jmmBoolAttribute; 1.28 1.29 1.30 @@ -213,7 +215,10 @@ 1.31 jobject (JNICALL *GetMemoryPoolUsage) (JNIEnv* env, jobject pool); 1.32 jobject (JNICALL *GetPeakMemoryPoolUsage) (JNIEnv* env, jobject pool); 1.33 1.34 - void* reserved4; 1.35 + void (JNICALL *GetThreadAllocatedMemory) 1.36 + (JNIEnv *env, 1.37 + jlongArray ids, 1.38 + jlongArray sizeArray); 1.39 1.40 jobject (JNICALL *GetMemoryUsage) (JNIEnv* env, jboolean heap); 1.41 1.42 @@ -228,6 +233,8 @@ 1.43 jlong* result); 1.44 1.45 jobjectArray (JNICALL *FindCircularBlockedThreads) (JNIEnv *env); 1.46 + 1.47 + // Not used in JDK 6 or JDK 7 1.48 jlong (JNICALL *GetThreadCpuTime) (JNIEnv *env, jlong thread_id); 1.49 1.50 jobjectArray (JNICALL *GetVMGlobalNames) (JNIEnv *env); 1.51 @@ -262,14 +269,22 @@ 1.52 void (JNICALL *GetLastGCStat) (JNIEnv *env, 1.53 jobject mgr, 1.54 jmmGCStat *gc_stat); 1.55 - jlong (JNICALL *GetThreadCpuTimeWithKind) (JNIEnv *env, 1.56 - jlong thread_id, 1.57 - jboolean user_sys_cpu_time); 1.58 - void* reserved5; 1.59 + 1.60 + jlong (JNICALL *GetThreadCpuTimeWithKind) 1.61 + (JNIEnv *env, 1.62 + jlong thread_id, 1.63 + jboolean user_sys_cpu_time); 1.64 + void (JNICALL *GetThreadCpuTimesWithKind) 1.65 + (JNIEnv *env, 1.66 + jlongArray ids, 1.67 + jlongArray timeArray, 1.68 + jboolean user_sys_cpu_time); 1.69 + 1.70 jint (JNICALL *DumpHeap0) (JNIEnv *env, 1.71 jstring outputfile, 1.72 jboolean live); 1.73 - jobjectArray (JNICALL *FindDeadlocks) (JNIEnv *env, jboolean object_monitors_only); 1.74 + jobjectArray (JNICALL *FindDeadlocks) (JNIEnv *env, 1.75 + jboolean object_monitors_only); 1.76 void (JNICALL *SetVMGlobal) (JNIEnv *env, 1.77 jstring flag_name, 1.78 jvalue new_value);