6934758: Expose the break down of clean up task time during safepoint.
authorxlu
Sat, 13 Mar 2010 16:32:49 -0800
changeset 5086 ebccc0bb7b8e
parent 5085 4f0c435f8c3c
child 5088 a7a4e66595ec
6934758: Expose the break down of clean up task time during safepoint. Summary: Use -XX:+TraceSafepointCleanupTime to print out the details of each clean up tasks. Reviewed-by: dholmes, ysr
hotspot/src/share/vm/runtime/globals.hpp
hotspot/src/share/vm/runtime/safepoint.cpp
--- a/hotspot/src/share/vm/runtime/globals.hpp	Fri Mar 12 10:42:16 2010 -0500
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Sat Mar 13 16:32:49 2010 -0800
@@ -2289,6 +2289,10 @@
           "print safepoint statistics only when safepoint takes"            \
           " more than PrintSafepointSatisticsTimeout in millis")            \
                                                                             \
+  product(bool, TraceSafepointCleanupTime, false,                           \
+          "print the break down of clean up tasks performed during"         \
+          " safepoint")                                                     \
+                                                                            \
   develop(bool, InlineAccessors, true,                                      \
           "inline accessor methods (get/set)")                              \
                                                                             \
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Fri Mar 12 10:42:16 2010 -0500
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Sat Mar 13 16:32:49 2010 -0800
@@ -457,21 +457,21 @@
 // Various cleaning tasks that should be done periodically at safepoints
 void SafepointSynchronize::do_cleanup_tasks() {
   {
-    TraceTime t1("deflating idle monitors", TraceSafepoint);
+    TraceTime t1("deflating idle monitors", TraceSafepointCleanupTime);
     ObjectSynchronizer::deflate_idle_monitors();
   }
 
   {
-    TraceTime t2("updating inline caches", TraceSafepoint);
+    TraceTime t2("updating inline caches", TraceSafepointCleanupTime);
     InlineCacheBuffer::update_inline_caches();
   }
 
   if(UseCounterDecay && CounterDecay::is_decay_needed()) {
-    TraceTime t3("decaying counter", TraceSafepoint);
+    TraceTime t3("decaying counter", TraceSafepointCleanupTime);
     CounterDecay::decay();
   }
 
-  TraceTime t4("sweeping nmethods", TraceSafepoint);
+  TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime);
   NMethodSweeper::sweep();
 }