Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 5afeeed

Browse files
committedFeb 28, 2020
8240215: Shenandoah: remove ShenandoahAllocationTrace
Reviewed-by: rkennke
1 parent 637795e commit 5afeeed

File tree

5 files changed

+0
-63
lines changed

5 files changed

+0
-63
lines changed
 

‎src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,6 @@ jint ShenandoahHeap::initialize() {
361361
ShenandoahStringDedup::initialize();
362362
ShenandoahCodeRoots::initialize();
363363

364-
if (ShenandoahAllocationTrace) {
365-
_alloc_tracker = new ShenandoahAllocTracker();
366-
}
367-
368364
if (ShenandoahPacing) {
369365
_pacer = new ShenandoahPacer(this);
370366
_pacer->setup_for_idle();
@@ -449,7 +445,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
449445
_full_gc(new ShenandoahMarkCompact()),
450446
_pacer(NULL),
451447
_verifier(NULL),
452-
_alloc_tracker(NULL),
453448
_phase_timings(NULL),
454449
_monitoring_support(NULL),
455450
_memory_pool(NULL),
@@ -797,8 +792,6 @@ ShenandoahHeap* ShenandoahHeap::heap_no_check() {
797792
}
798793

799794
HeapWord* ShenandoahHeap::allocate_memory(ShenandoahAllocRequest& req) {
800-
ShenandoahAllocTrace trace_alloc(req.size(), req.type());
801-
802795
intptr_t pacer_epoch = 0;
803796
bool in_new_region = false;
804797
HeapWord* result = NULL;
@@ -1202,13 +1195,6 @@ void ShenandoahHeap::print_tracing_info() const {
12021195

12031196
ls.cr();
12041197
ls.cr();
1205-
1206-
if (ShenandoahAllocationTrace) {
1207-
assert(alloc_tracker() != NULL, "Must be");
1208-
alloc_tracker()->print_on(&ls);
1209-
} else {
1210-
ls.print_cr(" Allocation tracing is disabled, use -XX:+ShenandoahAllocationTrace to enable.");
1211-
}
12121198
}
12131199
}
12141200

‎src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ class ShenandoahHeap : public CollectedHeap {
458458
ShenandoahPacer* _pacer;
459459
ShenandoahVerifier* _verifier;
460460

461-
ShenandoahAllocTracker* _alloc_tracker;
462461
ShenandoahPhaseTimings* _phase_timings;
463462

464463
ShenandoahControlThread* control_thread() { return _control_thread; }
@@ -474,7 +473,6 @@ class ShenandoahHeap : public CollectedHeap {
474473
ShenandoahPacer* pacer() const { return _pacer; }
475474

476475
ShenandoahPhaseTimings* phase_timings() const { return _phase_timings; }
477-
ShenandoahAllocTracker* alloc_tracker() const { return _alloc_tracker; }
478476

479477
ShenandoahVerifier* verifier();
480478

‎src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp

-27
Original file line numberDiff line numberDiff line change
@@ -138,33 +138,6 @@ bool ShenandoahGCPhase::is_root_work_phase() {
138138
}
139139
}
140140

141-
ShenandoahAllocTrace::ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type) {
142-
if (ShenandoahAllocationTrace) {
143-
_start = os::elapsedTime();
144-
_size = words_size;
145-
_alloc_type = alloc_type;
146-
} else {
147-
_start = 0;
148-
_size = 0;
149-
_alloc_type = ShenandoahAllocRequest::Type(0);
150-
}
151-
}
152-
153-
ShenandoahAllocTrace::~ShenandoahAllocTrace() {
154-
if (ShenandoahAllocationTrace) {
155-
double stop = os::elapsedTime();
156-
double duration_sec = stop - _start;
157-
double duration_us = duration_sec * 1000000;
158-
ShenandoahAllocTracker* tracker = ShenandoahHeap::heap()->alloc_tracker();
159-
assert(tracker != NULL, "Must be");
160-
tracker->record_alloc_latency(_size, _alloc_type, duration_us);
161-
if (duration_us > ShenandoahAllocationStallThreshold) {
162-
log_warning(gc)("Allocation stall: %.0f us (threshold: " INTX_FORMAT " us)",
163-
duration_us, ShenandoahAllocationStallThreshold);
164-
}
165-
}
166-
}
167-
168141
ShenandoahWorkerSession::ShenandoahWorkerSession(uint worker_id) : _worker_id(worker_id) {
169142
Thread* thr = Thread::current();
170143
assert(ShenandoahThreadLocalData::worker_id(thr) == ShenandoahThreadLocalData::INVALID_WORKER_ID, "Already set");

‎src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp

-10
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ class ShenandoahGCPauseMark : public StackObj {
8787
~ShenandoahGCPauseMark();
8888
};
8989

90-
class ShenandoahAllocTrace : public StackObj {
91-
private:
92-
double _start;
93-
size_t _size;
94-
ShenandoahAllocRequest::Type _alloc_type;
95-
public:
96-
ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type);
97-
~ShenandoahAllocTrace();
98-
};
99-
10090
class ShenandoahSafepoint : public AllStatic {
10191
public:
10292
// check if Shenandoah GC safepoint is in progress

‎src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp

-10
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,6 @@
235235
"evacuation reserve/waste is incorrect, at the risk that " \
236236
"application allocations run out of memory too early.") \
237237
\
238-
diagnostic(bool, ShenandoahAllocationTrace, false, \
239-
"Trace allocation latencies and stalls. Can be expensive when " \
240-
"lots of allocations happen, and may introduce scalability " \
241-
"bottlenecks.") \
242-
\
243-
diagnostic(intx, ShenandoahAllocationStallThreshold, 10000, \
244-
"When allocation tracing is enabled, the allocation stalls " \
245-
"larger than this threshold would be reported as warnings. " \
246-
"Time is in microseconds.") \
247-
\
248238
experimental(uintx, ShenandoahEvacAssist, 10, \
249239
"How many objects to evacuate on LRB assist path. " \
250240
"Use zero to disable.") \

0 commit comments

Comments
 (0)
This repository has been archived.