--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2020-01-30 17:13:15.924366959 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2020-01-30 17:13:15.536361410 +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); } --- old/src/hotspot/share/gc/parallel/psParallelCompact.cpp 2020-01-30 17:13:17.740392930 +0100 +++ new/src/hotspot/share/gc/parallel/psParallelCompact.cpp 2020-01-30 17:13:17.408388182 +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(); --- old/src/hotspot/share/gc/parallel/psScavenge.cpp 2020-01-30 17:13:19.416416899 +0100 +++ new/src/hotspot/share/gc/parallel/psScavenge.cpp 2020-01-30 17:13:19.092412266 +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(); --- old/src/hotspot/share/gc/shared/genCollectedHeap.cpp 2020-01-30 17:13:20.980439266 +0100 +++ new/src/hotspot/share/gc/shared/genCollectedHeap.cpp 2020-01-30 17:13:20.580433545 +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, --- old/src/hotspot/share/gc/shared/taskTerminator.cpp 2020-01-30 17:13:22.532461461 +0100 +++ new/src/hotspot/share/gc/shared/taskTerminator.cpp 2020-01-30 17:13:22.152456028 +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); { --- old/src/hotspot/share/gc/shared/taskTerminator.hpp 2020-01-30 17:13:24.096483827 +0100 +++ new/src/hotspot/share/gc/shared/taskTerminator.hpp 2020-01-30 17:13:23.624477077 +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