< prev index next >

src/hotspot/share/prims/jvmtiEnv.cpp

Print this page
rev 48551 : [mq]: heap8
rev 48552 : [mq]: heap10a
rev 48556 : [mq]: heap17
rev 48562 : [mq]: heap23

@@ -2026,66 +2026,60 @@
   return JVMTI_ERROR_NONE;
 } /* end StopHeapSampling */
 
 // Provoke a GC and get the currently live sampled allocations.
 jvmtiError
-JvmtiEnv::GetLiveTraces(jvmtiStackTraces* stack_traces) {
+JvmtiEnv::GetObjectAllocTraces(jvmtiAllocTraceInfo** stack_traces,
+                               jint* trace_counter_ptr) {
   ForceGarbageCollection();
   HeapThreadTransition htt(Thread::current());
   if (stack_traces == NULL) {
     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
   }
 
-  HeapMonitoring::get_live_traces(stack_traces);
+  HeapMonitoring::get_live_traces(this, stack_traces, trace_counter_ptr);
   return JVMTI_ERROR_NONE;
 } /* end GetLiveTraces */
 
 // Get the recently garbage collected allocations.
 jvmtiError
-JvmtiEnv::GetGarbageTraces(jvmtiStackTraces* stack_traces) {
+JvmtiEnv::GetGarbageTraces(jvmtiAllocTraceInfo** stack_traces,
+                           jint* trace_counter_ptr) {
   HeapThreadTransition htt(Thread::current());
   if (stack_traces == NULL) {
     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
   }
 
-  HeapMonitoring::get_garbage_traces(stack_traces);
+  HeapMonitoring::get_garbage_traces(this, stack_traces, trace_counter_ptr);
   return JVMTI_ERROR_NONE;
 } /* end GetGarbageTraces */
 
 // Get the frequently garbage collected traces.
 jvmtiError
-JvmtiEnv::GetFrequentGarbageTraces(jvmtiStackTraces* stack_traces) {
+JvmtiEnv::GetFrequentGarbageTraces(jvmtiAllocTraceInfo** stack_traces,
+                                   jint* trace_counter_ptr) {
   HeapThreadTransition htt(Thread::current());
   if (stack_traces == NULL) {
     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
   }
 
-  HeapMonitoring::get_frequent_garbage_traces(stack_traces);
+  HeapMonitoring::get_frequent_garbage_traces(this, stack_traces, trace_counter_ptr);
   return JVMTI_ERROR_NONE;
 } /* end GetFrequentGarbageTraces */
 
 // Get the traces that were garbage collected in the last full GC.
 jvmtiError
-JvmtiEnv::GetCachedTraces(jvmtiStackTraces* stack_traces) {
+JvmtiEnv::GetCachedObjectAllocTraces(jvmtiAllocTraceInfo** stack_traces,
+                          jint* trace_counter_ptr) {
   HeapThreadTransition htt(Thread::current());
   if (stack_traces == NULL) {
     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
   }
 
-  HeapMonitoring::get_cached_traces(stack_traces);
+  HeapMonitoring::get_cached_traces(this, stack_traces, trace_counter_ptr);
   return JVMTI_ERROR_NONE;
-} /* end GetCachedTraces */
-
-// Release sampled traces.
-jvmtiError
-JvmtiEnv::ReleaseTraces(jvmtiStackTraces* stack_traces) {
-  if (stack_traces == NULL) {
-    return JVMTI_ERROR_NONE;
-  }
-  HeapMonitoring::release_traces(stack_traces);
-  return JVMTI_ERROR_NONE;
-} /* end ReleaseTraces */
+} /* end GetObjectAllocTraces */
 
 // Get the heap sampling statistics.
 jvmtiError
 JvmtiEnv::GetHeapSamplingStats(jvmtiHeapSamplingStats* stats) {
   if (stats == NULL) {
< prev index next >