Mercurial > hg > graal-jvmci-8
diff src/share/vm/services/jmm.h @ 2100:b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
Summary: Track allocated bytes in Thread's, update on TLAB retirement and direct allocation in Eden and tenured, add JNI methods for ThreadMXBean.
Reviewed-by: coleenp, kvn, dholmes, ysr
author | phh |
---|---|
date | Fri, 07 Jan 2011 10:42:32 -0500 |
parents | f95d63e2154a |
children | 78542e2b5e35 |
line wrap: on
line diff
--- a/src/share/vm/services/jmm.h Fri Jan 07 03:38:19 2011 -0800 +++ b/src/share/vm/services/jmm.h Fri Jan 07 10:42:32 2011 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,7 +60,8 @@ unsigned int isBootClassPathSupported : 1; unsigned int isObjectMonitorUsageSupported : 1; unsigned int isSynchronizerUsageSupported : 1; - unsigned int : 24; + unsigned int isThreadAllocatedMemorySupported : 1; + unsigned int : 23; } jmmOptionalSupport; typedef enum { @@ -105,7 +106,8 @@ JMM_VERBOSE_GC = 21, JMM_VERBOSE_CLASS = 22, JMM_THREAD_CONTENTION_MONITORING = 23, - JMM_THREAD_CPU_TIME = 24 + JMM_THREAD_CPU_TIME = 24, + JMM_THREAD_ALLOCATED_MEMORY = 25 } jmmBoolAttribute; @@ -213,7 +215,10 @@ jobject (JNICALL *GetMemoryPoolUsage) (JNIEnv* env, jobject pool); jobject (JNICALL *GetPeakMemoryPoolUsage) (JNIEnv* env, jobject pool); - void* reserved4; + void (JNICALL *GetThreadAllocatedMemory) + (JNIEnv *env, + jlongArray ids, + jlongArray sizeArray); jobject (JNICALL *GetMemoryUsage) (JNIEnv* env, jboolean heap); @@ -228,6 +233,8 @@ jlong* result); jobjectArray (JNICALL *FindCircularBlockedThreads) (JNIEnv *env); + + // Not used in JDK 6 or JDK 7 jlong (JNICALL *GetThreadCpuTime) (JNIEnv *env, jlong thread_id); jobjectArray (JNICALL *GetVMGlobalNames) (JNIEnv *env); @@ -262,14 +269,22 @@ void (JNICALL *GetLastGCStat) (JNIEnv *env, jobject mgr, jmmGCStat *gc_stat); - jlong (JNICALL *GetThreadCpuTimeWithKind) (JNIEnv *env, - jlong thread_id, - jboolean user_sys_cpu_time); - void* reserved5; + + jlong (JNICALL *GetThreadCpuTimeWithKind) + (JNIEnv *env, + jlong thread_id, + jboolean user_sys_cpu_time); + void (JNICALL *GetThreadCpuTimesWithKind) + (JNIEnv *env, + jlongArray ids, + jlongArray timeArray, + jboolean user_sys_cpu_time); + jint (JNICALL *DumpHeap0) (JNIEnv *env, jstring outputfile, jboolean live); - jobjectArray (JNICALL *FindDeadlocks) (JNIEnv *env, jboolean object_monitors_only); + jobjectArray (JNICALL *FindDeadlocks) (JNIEnv *env, + jboolean object_monitors_only); void (JNICALL *SetVMGlobal) (JNIEnv *env, jstring flag_name, jvalue new_value);