8377161: G1: Remove unnecessary member G1FullGCScope::_g1h

Reviewed-by: shade, ayang
This commit is contained in:
Thomas Schatzl 2026-02-05 11:50:14 +00:00
parent fde77a9b55
commit 72eec521f9
2 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,14 +42,13 @@ G1FullGCScope::G1FullGCScope(G1MonitoringSupport* monitoring_support,
_rm(),
_should_clear_soft_refs(clear_soft),
_do_maximal_compaction(do_maximal_compaction),
_g1h(G1CollectedHeap::heap()),
_svc_marker(SvcGCMarker::FULL),
_timer(),
_tracer(tracer),
_active(),
_tracer_mark(&_timer, _tracer),
_monitoring_scope(monitoring_support),
_heap_printer(_g1h),
_heap_printer(G1CollectedHeap::heap()),
_region_compaction_threshold(do_maximal_compaction ?
G1HeapRegion::GrainWords :
(1 - MarkSweepDeadRatio / 100.0) * G1HeapRegion::GrainWords) { }

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -49,7 +49,6 @@ class G1FullGCScope : public StackObj {
ResourceMark _rm;
bool _should_clear_soft_refs;
bool _do_maximal_compaction;
G1CollectedHeap* _g1h;
SvcGCMarker _svc_marker;
STWGCTimer _timer;
G1FullGCTracer* _tracer;