Skip to content

Commit 4eab39d

Browse files
author
Thomas Schatzl
committed
8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
Reviewed-by: ayang, iwalulya, mli
1 parent ffadd63 commit 4eab39d

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

src/hotspot/share/code/codeCache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ void CodeCache::increment_unloading_cycle() {
10161016
}
10171017
}
10181018

1019-
CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
1019+
CodeCache::UnlinkingScope::UnlinkingScope(BoolObjectClosure* is_alive)
10201020
: _is_unloading_behaviour(is_alive)
10211021
{
10221022
_saved_behaviour = IsUnloadingBehaviour::current();
@@ -1025,7 +1025,7 @@ CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
10251025
DependencyContext::cleaning_start();
10261026
}
10271027

1028-
CodeCache::UnloadingScope::~UnloadingScope() {
1028+
CodeCache::UnlinkingScope::~UnlinkingScope() {
10291029
IsUnloadingBehaviour::set_current(_saved_behaviour);
10301030
DependencyContext::cleaning_end();
10311031
}

src/hotspot/share/code/codeCache.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,17 @@ class CodeCache : AllStatic {
177177

178178
// GC support
179179
static void verify_oops();
180-
// Scope object managing code cache unloading behavior.
181-
class UnloadingScope: StackObj {
180+
181+
// Helper scope object managing code cache unlinking behavior, i.e. sets and
182+
// restores the closure that determines which nmethods are going to be removed
183+
// during the unlinking part of code cache unloading.
184+
class UnlinkingScope : StackObj {
182185
ClosureIsUnloadingBehaviour _is_unloading_behaviour;
183186
IsUnloadingBehaviour* _saved_behaviour;
184187

185188
public:
186-
UnloadingScope(BoolObjectClosure* is_alive);
187-
~UnloadingScope();
189+
UnlinkingScope(BoolObjectClosure* is_alive);
190+
~UnlinkingScope();
188191
};
189192

190193
// Code cache unloading heuristics

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ void G1ConcurrentMark::weak_refs_work() {
16951695
if (ClassUnloadingWithConcurrentMark) {
16961696
GCTraceTime(Debug, gc, phases) debug("Class Unloading", _gc_timer_cm);
16971697
{
1698-
CodeCache::UnloadingScope scope(&g1_is_alive);
1698+
CodeCache::UnlinkingScope scope(&g1_is_alive);
16991699
bool unloading_occurred = SystemDictionary::do_unloading(_gc_timer_cm);
17001700
_g1h->complete_cleaning(unloading_occurred);
17011701
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ void G1FullCollector::phase1_mark_live_objects() {
320320
if (ClassUnloading) {
321321
GCTraceTime(Debug, gc, phases) debug("Phase 1: Class Unloading and Cleanup", scope()->timer());
322322
{
323-
CodeCache::UnloadingScope unloading_scope(&_is_alive);
323+
CodeCache::UnlinkingScope unloading_scope(&_is_alive);
324324
// Unload classes and purge the SystemDictionary.
325325
bool unloading_occurred = SystemDictionary::do_unloading(scope()->timer());
326326
_heap->complete_cleaning(unloading_occurred);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ void PSParallelCompact::marking_phase(ParallelOldTracer *gc_tracer) {
20552055

20562056
bool unloading_occurred;
20572057
{
2058-
CodeCache::UnloadingScope scope(is_alive_closure());
2058+
CodeCache::UnlinkingScope scope(is_alive_closure());
20592059

20602060
// Follow system dictionary roots and unload classes.
20612061
unloading_occurred = SystemDictionary::do_unloading(&_gc_timer);

src/hotspot/share/gc/serial/genMarkSweep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
202202

203203
bool unloading_occurred;
204204
{
205-
CodeCache::UnloadingScope scope(&is_alive);
205+
CodeCache::UnlinkingScope scope(&is_alive);
206206

207207
// Unload classes and purge the SystemDictionary.
208208
unloading_occurred = SystemDictionary::do_unloading(gc_timer());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ void ShenandoahHeap::stw_unload_classes(bool full_gc) {
18121812
ShenandoahPhaseTimings::degen_gc_purge_class_unload;
18131813
ShenandoahIsAliveSelector is_alive;
18141814
{
1815-
CodeCache::UnloadingScope scope(is_alive.is_alive_closure());
1815+
CodeCache::UnlinkingScope scope(is_alive.is_alive_closure());
18161816
ShenandoahGCPhase gc_phase(phase);
18171817
ShenandoahGCWorkerPhase worker_phase(phase);
18181818
bool unloading_occurred = SystemDictionary::do_unloading(gc_timer());

0 commit comments

Comments
 (0)