--- a/src/hotspot/share/services/management.cpp Wed Sep 18 17:31:35 2019 -0400
+++ b/src/hotspot/share/services/management.cpp Wed Sep 18 20:49:13 2019 -0400
@@ -2068,31 +2068,6 @@
}
#endif // INCLUDE_MANAGEMENT
-// Gets the amount of memory allocated on the Java heap for a single thread.
-// Returns -1 if the thread does not exist or has terminated.
-JVM_ENTRY(jlong, jmm_GetOneThreadAllocatedMemory(JNIEnv *env, jlong thread_id))
- if (thread_id < 0) {
- THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
- "Invalid thread ID", -1);
- }
-
- if (thread_id == 0) {
- // current thread
- if (THREAD->is_Java_thread()) {
- return ((JavaThread*)THREAD)->cooked_allocated_bytes();
- }
- return -1;
- }
-
- ThreadsListHandle tlh;
- JavaThread* java_thread = tlh.list()->find_JavaThread_from_java_tid(thread_id);
-
- if (java_thread != NULL) {
- return java_thread->cooked_allocated_bytes();
- }
- return -1;
-JVM_END
-
// Gets an array containing the amount of memory allocated on the Java
// heap for a set of threads (in bytes). Each element of the array is
// the amount of memory allocated for the thread ID specified in the
@@ -2217,7 +2192,6 @@
jmm_GetMemoryManagers,
jmm_GetMemoryPoolUsage,
jmm_GetPeakMemoryPoolUsage,
- jmm_GetOneThreadAllocatedMemory,
jmm_GetThreadAllocatedMemory,
jmm_GetMemoryUsage,
jmm_GetLongAttribute,