8308500: ZStatSubPhase::register_start should not call register_gc_phase_start if ZAbort::should_abort()

Reviewed-by: stefank, eosterlund
This commit is contained in:
Axel Boldt-Christmas 2023-05-23 10:45:01 +00:00
parent bdd240283e
commit e55961331e

View File

@ -808,7 +808,7 @@ ZStatSubPhase::ZStatSubPhase(const char* name, ZGenerationId id)
: ZStatPhase(id == ZGenerationId::young ? "Young Subphase" : "Old Subphase", name) {}
void ZStatSubPhase::register_start(ConcurrentGCTimer* timer, const Ticks& start) const {
if (timer != nullptr) {
if (timer != nullptr && !ZAbort::should_abort()) {
assert(!Thread::current()->is_Worker_thread(), "Unexpected timer value");
timer->register_gc_phase_start(name(), start);
}