changeset 58853:1617236f5cbb

8238229: Remove TRACESPINNING debug code Reviewed-by: kbarrett, sjohanss
author tschatzl
date Mon, 03 Feb 2020 10:45:46 +0100
parents dbb94c2ceaf8
children 6d9ac97c7d2f
files src/hotspot/share/gc/g1/g1CollectedHeap.cpp src/hotspot/share/gc/parallel/psParallelCompact.cpp src/hotspot/share/gc/parallel/psScavenge.cpp src/hotspot/share/gc/shared/genCollectedHeap.cpp src/hotspot/share/gc/shared/taskTerminator.cpp src/hotspot/share/gc/shared/taskTerminator.hpp
diffstat 6 files changed, 0 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Feb 03 10:45:46 2020 +0100
@@ -1132,9 +1132,6 @@
   heap_transition->print();
   print_heap_after_gc();
   print_heap_regions();
-#ifdef TRACESPINNING
-  TaskTerminator::print_termination_counts();
-#endif
 }
 
 bool G1CollectedHeap::do_full_collection(bool explicit_gc,
@@ -3140,10 +3137,6 @@
 
       verify_after_young_collection(verify_type);
 
-#ifdef TRACESPINNING
-      TaskTerminator::print_termination_counts();
-#endif
-
       gc_epilogue(false);
     }
 
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Feb 03 10:45:46 2020 +0100
@@ -1969,10 +1969,6 @@
                          marking_start.ticks(), compaction_start.ticks(),
                          collection_exit.ticks());
 
-#ifdef TRACESPINNING
-  TaskTerminator::print_termination_counts();
-#endif
-
   AdaptiveSizePolicyOutput::print(size_policy, heap->total_collections());
 
   _gc_timer.register_gc_end();
--- a/src/hotspot/share/gc/parallel/psScavenge.cpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/parallel/psScavenge.cpp	Mon Feb 03 10:45:46 2020 +0100
@@ -731,10 +731,6 @@
                             scavenge_entry.ticks(), scavenge_midpoint.ticks(),
                             scavenge_exit.ticks());
 
-#ifdef TRACESPINNING
-  TaskTerminator::print_termination_counts();
-#endif
-
   AdaptiveSizePolicyOutput::print(size_policy, heap->total_collections());
 
   _gc_timer.register_gc_end();
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Mon Feb 03 10:45:46 2020 +0100
@@ -676,10 +676,6 @@
 
     print_heap_after_gc();
   }
-
-#ifdef TRACESPINNING
-  TaskTerminator::print_termination_counts();
-#endif
 }
 
 bool GenCollectedHeap::should_do_full_collection(size_t size, bool full, bool is_tlab,
--- a/src/hotspot/share/gc/shared/taskTerminator.cpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/shared/taskTerminator.cpp	Mon Feb 03 10:45:46 2020 +0100
@@ -29,12 +29,6 @@
 #include "gc/shared/taskqueue.hpp"
 #include "logging/log.hpp"
 
-#ifdef TRACESPINNING
-uint TaskTerminator::_total_yields = 0;
-uint TaskTerminator::_total_spins = 0;
-uint TaskTerminator::_total_peeks = 0;
-#endif
-
 TaskTerminator::TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set) :
   _n_threads(n_threads),
   _queue_set(queue_set),
@@ -64,13 +58,6 @@
   os::naked_yield();
 }
 
-#ifdef TRACESPINNING
-void TaskTerminator::print_termination_counts() {
-  log_trace(gc, task)("TaskTerminator Yields: %u Spins: %u Peeks: %u",
-                      total_yields(), total_spins(), total_peeks());
-}
-#endif
-
 void TaskTerminator::reset_for_reuse() {
   if (_offered_termination != 0) {
     assert(_offered_termination == _n_threads,
@@ -192,9 +179,6 @@
         yield();
         hard_spin_count = 0;
         hard_spin_limit = hard_spin_start;
-#ifdef TRACESPINNING
-        _total_yields++;
-#endif
       } else {
         // Hard spin this time
         // Increase the hard spinning period but only up to a limit.
@@ -204,9 +188,6 @@
           SpinPause();
         }
         hard_spin_count++;
-#ifdef TRACESPINNING
-        _total_spins++;
-#endif
       }
     } else {
       log_develop_trace(gc, task)("TaskTerminator::do_spin_master_work() thread " PTR_FORMAT " sleeps after %u yields",
@@ -223,9 +204,6 @@
       }
     }
 
-#ifdef TRACESPINNING
-    _total_peeks++;
-#endif
     size_t tasks = tasks_in_queue_set();
     bool exit = exit_termination(tasks, terminator);
     {
--- a/src/hotspot/share/gc/shared/taskTerminator.hpp	Mon Feb 03 10:45:44 2020 +0100
+++ b/src/hotspot/share/gc/shared/taskTerminator.hpp	Mon Feb 03 10:45:46 2020 +0100
@@ -29,9 +29,6 @@
 #include "runtime/mutex.hpp"
 #include "runtime/thread.hpp"
 
-// Define this to enable additional tracing probes.
-#undef TRACESPINNING
-
 class TaskQueueSetSuper;
 class TerminatorTerminator;
 
@@ -68,12 +65,6 @@
   Monitor*    _blocker;
   Thread*     _spin_master;
 
-#ifdef TRACESPINNING
-  static uint _total_yields;
-  static uint _total_spins;
-  static uint _total_peeks;
-#endif
-
   // If we should exit current termination protocol
   bool exit_termination(size_t tasks, TerminatorTerminator* terminator);
 
@@ -110,13 +101,6 @@
   // Same as above but the number of parallel threads is set to the
   // given number.
   void reset_for_reuse(uint n_threads);
-
-#ifdef TRACESPINNING
-  static uint total_yields() { return _total_yields; }
-  static uint total_spins() { return _total_spins; }
-  static uint total_peeks() { return _total_peeks; }
-  static void print_termination_counts();
-#endif
 };
 
 #endif // SHARE_GC_SHARED_TASKTERMINATOR_HPP