8240215: Shenandoah: remove ShenandoahAllocationTrace

Reviewed-by: rkennke
This commit is contained in:
Aleksey Shipilev 2020-02-28 17:59:50 +01:00
parent 637795e0a7
commit 5afeeed5b2
5 changed files with 0 additions and 63 deletions

View File

@ -361,10 +361,6 @@ jint ShenandoahHeap::initialize() {
ShenandoahStringDedup::initialize();
ShenandoahCodeRoots::initialize();
if (ShenandoahAllocationTrace) {
_alloc_tracker = new ShenandoahAllocTracker();
}
if (ShenandoahPacing) {
_pacer = new ShenandoahPacer(this);
_pacer->setup_for_idle();
@ -449,7 +445,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
_full_gc(new ShenandoahMarkCompact()),
_pacer(NULL),
_verifier(NULL),
_alloc_tracker(NULL),
_phase_timings(NULL),
_monitoring_support(NULL),
_memory_pool(NULL),
@ -797,8 +792,6 @@ ShenandoahHeap* ShenandoahHeap::heap_no_check() {
}
HeapWord* ShenandoahHeap::allocate_memory(ShenandoahAllocRequest& req) {
ShenandoahAllocTrace trace_alloc(req.size(), req.type());
intptr_t pacer_epoch = 0;
bool in_new_region = false;
HeapWord* result = NULL;
@ -1202,13 +1195,6 @@ void ShenandoahHeap::print_tracing_info() const {
ls.cr();
ls.cr();
if (ShenandoahAllocationTrace) {
assert(alloc_tracker() != NULL, "Must be");
alloc_tracker()->print_on(&ls);
} else {
ls.print_cr(" Allocation tracing is disabled, use -XX:+ShenandoahAllocationTrace to enable.");
}
}
}

View File

@ -458,7 +458,6 @@ private:
ShenandoahPacer* _pacer;
ShenandoahVerifier* _verifier;
ShenandoahAllocTracker* _alloc_tracker;
ShenandoahPhaseTimings* _phase_timings;
ShenandoahControlThread* control_thread() { return _control_thread; }
@ -474,7 +473,6 @@ public:
ShenandoahPacer* pacer() const { return _pacer; }
ShenandoahPhaseTimings* phase_timings() const { return _phase_timings; }
ShenandoahAllocTracker* alloc_tracker() const { return _alloc_tracker; }
ShenandoahVerifier* verifier();

View File

@ -138,33 +138,6 @@ bool ShenandoahGCPhase::is_root_work_phase() {
}
}
ShenandoahAllocTrace::ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type) {
if (ShenandoahAllocationTrace) {
_start = os::elapsedTime();
_size = words_size;
_alloc_type = alloc_type;
} else {
_start = 0;
_size = 0;
_alloc_type = ShenandoahAllocRequest::Type(0);
}
}
ShenandoahAllocTrace::~ShenandoahAllocTrace() {
if (ShenandoahAllocationTrace) {
double stop = os::elapsedTime();
double duration_sec = stop - _start;
double duration_us = duration_sec * 1000000;
ShenandoahAllocTracker* tracker = ShenandoahHeap::heap()->alloc_tracker();
assert(tracker != NULL, "Must be");
tracker->record_alloc_latency(_size, _alloc_type, duration_us);
if (duration_us > ShenandoahAllocationStallThreshold) {
log_warning(gc)("Allocation stall: %.0f us (threshold: " INTX_FORMAT " us)",
duration_us, ShenandoahAllocationStallThreshold);
}
}
}
ShenandoahWorkerSession::ShenandoahWorkerSession(uint worker_id) : _worker_id(worker_id) {
Thread* thr = Thread::current();
assert(ShenandoahThreadLocalData::worker_id(thr) == ShenandoahThreadLocalData::INVALID_WORKER_ID, "Already set");

View File

@ -87,16 +87,6 @@ public:
~ShenandoahGCPauseMark();
};
class ShenandoahAllocTrace : public StackObj {
private:
double _start;
size_t _size;
ShenandoahAllocRequest::Type _alloc_type;
public:
ShenandoahAllocTrace(size_t words_size, ShenandoahAllocRequest::Type alloc_type);
~ShenandoahAllocTrace();
};
class ShenandoahSafepoint : public AllStatic {
public:
// check if Shenandoah GC safepoint is in progress

View File

@ -235,16 +235,6 @@
"evacuation reserve/waste is incorrect, at the risk that " \
"application allocations run out of memory too early.") \
\
diagnostic(bool, ShenandoahAllocationTrace, false, \
"Trace allocation latencies and stalls. Can be expensive when " \
"lots of allocations happen, and may introduce scalability " \
"bottlenecks.") \
\
diagnostic(intx, ShenandoahAllocationStallThreshold, 10000, \
"When allocation tracing is enabled, the allocation stalls " \
"larger than this threshold would be reported as warnings. " \
"Time is in microseconds.") \
\
experimental(uintx, ShenandoahEvacAssist, 10, \
"How many objects to evacuate on LRB assist path. " \
"Use zero to disable.") \