Skip to content

Commit 358c56b

Browse files
author
Thomas Schatzl
committed
8238229: Remove TRACESPINNING debug code
Reviewed-by: kbarrett, sjohanss
1 parent 77ad678 commit 358c56b

File tree

6 files changed

+0
-57
lines changed

6 files changed

+0
-57
lines changed

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,9 +1132,6 @@ void G1CollectedHeap::print_heap_after_full_collection(G1HeapTransition* heap_tr
11321132
heap_transition->print();
11331133
print_heap_after_gc();
11341134
print_heap_regions();
1135-
#ifdef TRACESPINNING
1136-
TaskTerminator::print_termination_counts();
1137-
#endif
11381135
}
11391136

11401137
bool G1CollectedHeap::do_full_collection(bool explicit_gc,
@@ -3140,10 +3137,6 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus
31403137

31413138
verify_after_young_collection(verify_type);
31423139

3143-
#ifdef TRACESPINNING
3144-
TaskTerminator::print_termination_counts();
3145-
#endif
3146-
31473140
gc_epilogue(false);
31483141
}
31493142

src/hotspot/share/gc/parallel/psParallelCompact.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,10 +1969,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
19691969
marking_start.ticks(), compaction_start.ticks(),
19701970
collection_exit.ticks());
19711971

1972-
#ifdef TRACESPINNING
1973-
TaskTerminator::print_termination_counts();
1974-
#endif
1975-
19761972
AdaptiveSizePolicyOutput::print(size_policy, heap->total_collections());
19771973

19781974
_gc_timer.register_gc_end();

src/hotspot/share/gc/parallel/psScavenge.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,6 @@ bool PSScavenge::invoke_no_policy() {
731731
scavenge_entry.ticks(), scavenge_midpoint.ticks(),
732732
scavenge_exit.ticks());
733733

734-
#ifdef TRACESPINNING
735-
TaskTerminator::print_termination_counts();
736-
#endif
737-
738734
AdaptiveSizePolicyOutput::print(size_policy, heap->total_collections());
739735

740736
_gc_timer.register_gc_end();

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,6 @@ void GenCollectedHeap::do_collection(bool full,
676676

677677
print_heap_after_gc();
678678
}
679-
680-
#ifdef TRACESPINNING
681-
TaskTerminator::print_termination_counts();
682-
#endif
683679
}
684680

685681
bool GenCollectedHeap::should_do_full_collection(size_t size, bool full, bool is_tlab,

src/hotspot/share/gc/shared/taskTerminator.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#include "gc/shared/taskqueue.hpp"
3030
#include "logging/log.hpp"
3131

32-
#ifdef TRACESPINNING
33-
uint TaskTerminator::_total_yields = 0;
34-
uint TaskTerminator::_total_spins = 0;
35-
uint TaskTerminator::_total_peeks = 0;
36-
#endif
37-
3832
TaskTerminator::TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set) :
3933
_n_threads(n_threads),
4034
_queue_set(queue_set),
@@ -64,13 +58,6 @@ void TaskTerminator::yield() {
6458
os::naked_yield();
6559
}
6660

67-
#ifdef TRACESPINNING
68-
void TaskTerminator::print_termination_counts() {
69-
log_trace(gc, task)("TaskTerminator Yields: %u Spins: %u Peeks: %u",
70-
total_yields(), total_spins(), total_peeks());
71-
}
72-
#endif
73-
7461
void TaskTerminator::reset_for_reuse() {
7562
if (_offered_termination != 0) {
7663
assert(_offered_termination == _n_threads,
@@ -192,9 +179,6 @@ bool TaskTerminator::do_spin_master_work(TerminatorTerminator* terminator) {
192179
yield();
193180
hard_spin_count = 0;
194181
hard_spin_limit = hard_spin_start;
195-
#ifdef TRACESPINNING
196-
_total_yields++;
197-
#endif
198182
} else {
199183
// Hard spin this time
200184
// Increase the hard spinning period but only up to a limit.
@@ -204,9 +188,6 @@ bool TaskTerminator::do_spin_master_work(TerminatorTerminator* terminator) {
204188
SpinPause();
205189
}
206190
hard_spin_count++;
207-
#ifdef TRACESPINNING
208-
_total_spins++;
209-
#endif
210191
}
211192
} else {
212193
log_develop_trace(gc, task)("TaskTerminator::do_spin_master_work() thread " PTR_FORMAT " sleeps after %u yields",
@@ -223,9 +204,6 @@ bool TaskTerminator::do_spin_master_work(TerminatorTerminator* terminator) {
223204
}
224205
}
225206

226-
#ifdef TRACESPINNING
227-
_total_peeks++;
228-
#endif
229207
size_t tasks = tasks_in_queue_set();
230208
bool exit = exit_termination(tasks, terminator);
231209
{

src/hotspot/share/gc/shared/taskTerminator.hpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
#include "runtime/mutex.hpp"
3030
#include "runtime/thread.hpp"
3131

32-
// Define this to enable additional tracing probes.
33-
#undef TRACESPINNING
34-
3532
class TaskQueueSetSuper;
3633
class TerminatorTerminator;
3734

@@ -68,12 +65,6 @@ class TaskTerminator : public CHeapObj<mtGC> {
6865
Monitor* _blocker;
6966
Thread* _spin_master;
7067

71-
#ifdef TRACESPINNING
72-
static uint _total_yields;
73-
static uint _total_spins;
74-
static uint _total_peeks;
75-
#endif
76-
7768
// If we should exit current termination protocol
7869
bool exit_termination(size_t tasks, TerminatorTerminator* terminator);
7970

@@ -110,13 +101,6 @@ class TaskTerminator : public CHeapObj<mtGC> {
110101
// Same as above but the number of parallel threads is set to the
111102
// given number.
112103
void reset_for_reuse(uint n_threads);
113-
114-
#ifdef TRACESPINNING
115-
static uint total_yields() { return _total_yields; }
116-
static uint total_spins() { return _total_spins; }
117-
static uint total_peeks() { return _total_peeks; }
118-
static void print_termination_counts();
119-
#endif
120104
};
121105

122106
#endif // SHARE_GC_SHARED_TASKTERMINATOR_HPP

0 commit comments

Comments
 (0)