mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
Reviewed-by: ayang, iwalulya, mli
This commit is contained in:
parent
ffadd63575
commit
4eab39d941
@ -1016,7 +1016,7 @@ void CodeCache::increment_unloading_cycle() {
|
||||
}
|
||||
}
|
||||
|
||||
CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
|
||||
CodeCache::UnlinkingScope::UnlinkingScope(BoolObjectClosure* is_alive)
|
||||
: _is_unloading_behaviour(is_alive)
|
||||
{
|
||||
_saved_behaviour = IsUnloadingBehaviour::current();
|
||||
@ -1025,7 +1025,7 @@ CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
|
||||
DependencyContext::cleaning_start();
|
||||
}
|
||||
|
||||
CodeCache::UnloadingScope::~UnloadingScope() {
|
||||
CodeCache::UnlinkingScope::~UnlinkingScope() {
|
||||
IsUnloadingBehaviour::set_current(_saved_behaviour);
|
||||
DependencyContext::cleaning_end();
|
||||
}
|
||||
|
||||
@ -177,14 +177,17 @@ class CodeCache : AllStatic {
|
||||
|
||||
// GC support
|
||||
static void verify_oops();
|
||||
// Scope object managing code cache unloading behavior.
|
||||
class UnloadingScope: StackObj {
|
||||
|
||||
// Helper scope object managing code cache unlinking behavior, i.e. sets and
|
||||
// restores the closure that determines which nmethods are going to be removed
|
||||
// during the unlinking part of code cache unloading.
|
||||
class UnlinkingScope : StackObj {
|
||||
ClosureIsUnloadingBehaviour _is_unloading_behaviour;
|
||||
IsUnloadingBehaviour* _saved_behaviour;
|
||||
|
||||
public:
|
||||
UnloadingScope(BoolObjectClosure* is_alive);
|
||||
~UnloadingScope();
|
||||
UnlinkingScope(BoolObjectClosure* is_alive);
|
||||
~UnlinkingScope();
|
||||
};
|
||||
|
||||
// Code cache unloading heuristics
|
||||
|
||||
@ -1695,7 +1695,7 @@ void G1ConcurrentMark::weak_refs_work() {
|
||||
if (ClassUnloadingWithConcurrentMark) {
|
||||
GCTraceTime(Debug, gc, phases) debug("Class Unloading", _gc_timer_cm);
|
||||
{
|
||||
CodeCache::UnloadingScope scope(&g1_is_alive);
|
||||
CodeCache::UnlinkingScope scope(&g1_is_alive);
|
||||
bool unloading_occurred = SystemDictionary::do_unloading(_gc_timer_cm);
|
||||
_g1h->complete_cleaning(unloading_occurred);
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ void G1FullCollector::phase1_mark_live_objects() {
|
||||
if (ClassUnloading) {
|
||||
GCTraceTime(Debug, gc, phases) debug("Phase 1: Class Unloading and Cleanup", scope()->timer());
|
||||
{
|
||||
CodeCache::UnloadingScope unloading_scope(&_is_alive);
|
||||
CodeCache::UnlinkingScope unloading_scope(&_is_alive);
|
||||
// Unload classes and purge the SystemDictionary.
|
||||
bool unloading_occurred = SystemDictionary::do_unloading(scope()->timer());
|
||||
_heap->complete_cleaning(unloading_occurred);
|
||||
|
||||
@ -2055,7 +2055,7 @@ void PSParallelCompact::marking_phase(ParallelOldTracer *gc_tracer) {
|
||||
|
||||
bool unloading_occurred;
|
||||
{
|
||||
CodeCache::UnloadingScope scope(is_alive_closure());
|
||||
CodeCache::UnlinkingScope scope(is_alive_closure());
|
||||
|
||||
// Follow system dictionary roots and unload classes.
|
||||
unloading_occurred = SystemDictionary::do_unloading(&_gc_timer);
|
||||
|
||||
@ -202,7 +202,7 @@ void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
|
||||
|
||||
bool unloading_occurred;
|
||||
{
|
||||
CodeCache::UnloadingScope scope(&is_alive);
|
||||
CodeCache::UnlinkingScope scope(&is_alive);
|
||||
|
||||
// Unload classes and purge the SystemDictionary.
|
||||
unloading_occurred = SystemDictionary::do_unloading(gc_timer());
|
||||
|
||||
@ -1812,7 +1812,7 @@ void ShenandoahHeap::stw_unload_classes(bool full_gc) {
|
||||
ShenandoahPhaseTimings::degen_gc_purge_class_unload;
|
||||
ShenandoahIsAliveSelector is_alive;
|
||||
{
|
||||
CodeCache::UnloadingScope scope(is_alive.is_alive_closure());
|
||||
CodeCache::UnlinkingScope scope(is_alive.is_alive_closure());
|
||||
ShenandoahGCPhase gc_phase(phase);
|
||||
ShenandoahGCWorkerPhase worker_phase(phase);
|
||||
bool unloading_occurred = SystemDictionary::do_unloading(gc_timer());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user