Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Jul 30, 2020
2 parents 93c8d6d + 9798a08 commit a94b605
Show file tree
Hide file tree
Showing 50 changed files with 108 additions and 143 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/ci/ciReplay.cpp
Expand Up @@ -1108,8 +1108,8 @@ void* ciReplay::load_inline_data(ciMethod* method, int entry_bci, int comp_level
} }


int ciReplay::replay_impl(TRAPS) { int ciReplay::replay_impl(TRAPS) {
HandleMark hm; HandleMark hm(THREAD);
ResourceMark rm; ResourceMark rm(THREAD);


if (ReplaySuppressInitializers > 2) { if (ReplaySuppressInitializers > 2) {
// ReplaySuppressInitializers > 2 means that we want to allow // ReplaySuppressInitializers > 2 means that we want to allow
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/classfile/classLoaderDataGraph.cpp
Expand Up @@ -306,14 +306,14 @@ LockedClassesDo::~LockedClassesDo() {
// unloading can remove entries concurrently soon. // unloading can remove entries concurrently soon.
class ClassLoaderDataGraphIterator : public StackObj { class ClassLoaderDataGraphIterator : public StackObj {
ClassLoaderData* _next; ClassLoaderData* _next;
Thread* _thread;
HandleMark _hm; // clean up handles when this is done. HandleMark _hm; // clean up handles when this is done.
Handle _holder; Handle _holder;
Thread* _thread;
NoSafepointVerifier _nsv; // No safepoints allowed in this scope NoSafepointVerifier _nsv; // No safepoints allowed in this scope
// unless verifying at a safepoint. // unless verifying at a safepoint.


public: public:
ClassLoaderDataGraphIterator() : _next(ClassLoaderDataGraph::_head) { ClassLoaderDataGraphIterator() : _next(ClassLoaderDataGraph::_head), _thread(Thread::current()), _hm(_thread) {
_thread = Thread::current(); _thread = Thread::current();
assert_locked_or_safepoint(ClassLoaderDataGraph_lock); assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
} }
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/classfile/klassFactory.cpp
Expand Up @@ -173,8 +173,8 @@ InstanceKlass* KlassFactory::create_from_stream(ClassFileStream* stream,
assert(loader_data != NULL, "invariant"); assert(loader_data != NULL, "invariant");
assert(THREAD->is_Java_thread(), "must be a JavaThread"); assert(THREAD->is_Java_thread(), "must be a JavaThread");


ResourceMark rm; ResourceMark rm(THREAD);
HandleMark hm; HandleMark hm(THREAD);


JvmtiCachedClassFileData* cached_class_file = NULL; JvmtiCachedClassFileData* cached_class_file = NULL;


Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/classfile/systemDictionaryShared.cpp
Expand Up @@ -1773,7 +1773,7 @@ bool SystemDictionaryShared::check_linking_constraints(InstanceKlass* klass, TRA
RunTimeSharedClassInfo* info = RunTimeSharedClassInfo::get_for(klass); RunTimeSharedClassInfo* info = RunTimeSharedClassInfo::get_for(klass);
assert(info != NULL, "Sanity"); assert(info != NULL, "Sanity");
if (info->_num_loader_constraints > 0) { if (info->_num_loader_constraints > 0) {
HandleMark hm; HandleMark hm(THREAD);
for (int i = 0; i < info->_num_loader_constraints; i++) { for (int i = 0; i < info->_num_loader_constraints; i++) {
RunTimeSharedClassInfo::RTLoaderConstraint* lc = info->loader_constraint_at(i); RunTimeSharedClassInfo::RTLoaderConstraint* lc = info->loader_constraint_at(i);
Symbol* name = lc->constraint_name(); Symbol* name = lc->constraint_name();
Expand Down
8 changes: 3 additions & 5 deletions src/hotspot/share/code/nmethod.cpp
Expand Up @@ -873,7 +873,6 @@ void nmethod::log_identity(xmlStream* log) const {
void nmethod::log_new_nmethod() const { void nmethod::log_new_nmethod() const {
if (LogCompilation && xtty != NULL) { if (LogCompilation && xtty != NULL) {
ttyLocker ttyl; ttyLocker ttyl;
HandleMark hm;
xtty->begin_elem("nmethod"); xtty->begin_elem("nmethod");
log_identity(xtty); log_identity(xtty);
xtty->print(" entry='" INTPTR_FORMAT "' size='%d'", p2i(code_begin()), size()); xtty->print(" entry='" INTPTR_FORMAT "' size='%d'", p2i(code_begin()), size());
Expand Down Expand Up @@ -931,7 +930,6 @@ void nmethod::print_nmethod(bool printmethod) {
// Print the header part, then print the requested information. // Print the header part, then print the requested information.
// This is both handled in decode2(). // This is both handled in decode2().
if (printmethod) { if (printmethod) {
HandleMark hm;
ResourceMark m; ResourceMark m;
if (is_compiled_by_c1()) { if (is_compiled_by_c1()) {
tty->cr(); tty->cr();
Expand Down Expand Up @@ -2405,6 +2403,7 @@ void nmethod::verify() {




void nmethod::verify_interrupt_point(address call_site) { void nmethod::verify_interrupt_point(address call_site) {

// Verify IC only when nmethod installation is finished. // Verify IC only when nmethod installation is finished.
if (!is_not_installed()) { if (!is_not_installed()) {
if (CompiledICLocker::is_safe(this)) { if (CompiledICLocker::is_safe(this)) {
Expand All @@ -2415,6 +2414,8 @@ void nmethod::verify_interrupt_point(address call_site) {
} }
} }


HandleMark hm(Thread::current());

PcDesc* pd = pc_desc_at(nativeCall_at(call_site)->return_address()); PcDesc* pd = pc_desc_at(nativeCall_at(call_site)->return_address());
assert(pd != NULL, "PcDesc must exist"); assert(pd != NULL, "PcDesc must exist");
for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(), for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(),
Expand Down Expand Up @@ -2554,7 +2555,6 @@ void nmethod::print(outputStream* st) const {
} }


void nmethod::print_code() { void nmethod::print_code() {
HandleMark hm;
ResourceMark m; ResourceMark m;
ttyLocker ttyl; ttyLocker ttyl;
// Call the specialized decode method of this class. // Call the specialized decode method of this class.
Expand Down Expand Up @@ -2584,7 +2584,6 @@ void nmethod::print_dependencies() {


// Print the oops from the underlying CodeBlob. // Print the oops from the underlying CodeBlob.
void nmethod::print_oops(outputStream* st) { void nmethod::print_oops(outputStream* st) {
HandleMark hm;
ResourceMark m; ResourceMark m;
st->print("Oops:"); st->print("Oops:");
if (oops_begin() < oops_end()) { if (oops_begin() < oops_end()) {
Expand All @@ -2610,7 +2609,6 @@ void nmethod::print_oops(outputStream* st) {


// Print metadata pool. // Print metadata pool.
void nmethod::print_metadata(outputStream* st) { void nmethod::print_metadata(outputStream* st) {
HandleMark hm;
ResourceMark m; ResourceMark m;
st->print("Metadata:"); st->print("Metadata:");
if (metadata_begin() < metadata_end()) { if (metadata_begin() < metadata_end()) {
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/share/code/scopeDesc.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -253,7 +253,9 @@ void ScopeDesc::print_on(outputStream* st, PcDesc* pd) const {
#endif #endif


void ScopeDesc::verify() { void ScopeDesc::verify() {
ResourceMark rm; Thread* current_thread = Thread::current();
ResourceMark rm(current_thread);
HandleMark hm(current_thread);
guarantee(method()->is_method(), "type check"); guarantee(method()->is_method(), "type check");


// check if we have any illegal elements on the expression stack // check if we have any illegal elements on the expression stack
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/code/vtableStubs.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -320,7 +320,6 @@ void VtableStubs::vtable_stub_do(void f(VtableStub*)) {


extern "C" void bad_compiled_vtable_index(JavaThread* thread, oop receiver, int index) { extern "C" void bad_compiled_vtable_index(JavaThread* thread, oop receiver, int index) {
ResourceMark rm; ResourceMark rm;
HandleMark hm;
Klass* klass = receiver->klass(); Klass* klass = receiver->klass();
InstanceKlass* ik = InstanceKlass::cast(klass); InstanceKlass* ik = InstanceKlass::cast(klass);
klassVtable vt = ik->vtable(); klassVtable vt = ik->vtable();
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Expand Up @@ -3416,7 +3416,6 @@ class G1STWRefProcTaskProxy: public AbstractGangTask {
virtual void work(uint worker_id) { virtual void work(uint worker_id) {
// The reference processing task executed by a single worker. // The reference processing task executed by a single worker.
ResourceMark rm; ResourceMark rm;
HandleMark hm;


G1STWIsAliveClosure is_alive(_g1h); G1STWIsAliveClosure is_alive(_g1h);


Expand Down Expand Up @@ -3789,7 +3788,6 @@ class G1EvacuateRegionsBaseTask : public AbstractGangTask {


{ {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


G1ParScanThreadState* pss = _per_thread_states->state_for_worker(worker_id); G1ParScanThreadState* pss = _per_thread_states->state_for_worker(worker_id);
pss->set_ref_discoverer(_g1h->ref_processor_stw()); pss->set_ref_discoverer(_g1h->ref_processor_stw());
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Expand Up @@ -1479,7 +1479,6 @@ class G1CMRefProcTaskProxy : public AbstractGangTask {


virtual void work(uint worker_id) { virtual void work(uint worker_id) {
ResourceMark rm; ResourceMark rm;
HandleMark hm;
G1CMTask* task = _cm->task(worker_id); G1CMTask* task = _cm->task(worker_id);
G1CMIsAliveClosure g1_is_alive(_g1h); G1CMIsAliveClosure g1_is_alive(_g1h);
G1CMKeepAliveAndDrainClosure g1_par_keep_alive(_cm, task, false /* is_serial */); G1CMKeepAliveAndDrainClosure g1_par_keep_alive(_cm, task, false /* is_serial */);
Expand Down Expand Up @@ -1508,7 +1507,6 @@ void G1CMRefProcTaskExecutor::execute(ProcessTask& proc_task, uint ergo_workers)


void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) { void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


// Is alive closure. // Is alive closure.
G1CMIsAliveClosure g1_is_alive(_g1h); G1CMIsAliveClosure g1_is_alive(_g1h);
Expand Down Expand Up @@ -1755,7 +1753,6 @@ class G1CMRemarkTask : public AbstractGangTask {
task->record_start_time(); task->record_start_time();
{ {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


G1RemarkThreadsClosure threads_f(G1CollectedHeap::heap(), task); G1RemarkThreadsClosure threads_f(G1CollectedHeap::heap(), task);
Threads::threads_do(&threads_f); Threads::threads_do(&threads_f);
Expand All @@ -1779,7 +1776,6 @@ class G1CMRemarkTask : public AbstractGangTask {


void G1ConcurrentMark::finalize_marking() { void G1ConcurrentMark::finalize_marking() {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


_g1h->ensure_parsability(false); _g1h->ensure_parsability(false);


Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp
Expand Up @@ -153,7 +153,7 @@ void G1ConcurrentMarkThread::run_service() {
GCTraceConcTime(Info, gc) tt("Concurrent Cycle"); GCTraceConcTime(Info, gc) tt("Concurrent Cycle");
{ {
ResourceMark rm; ResourceMark rm;
HandleMark hm;
double cycle_start = os::elapsedVTime(); double cycle_start = os::elapsedVTime();


{ {
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/g1/g1FullCollector.cpp
Expand Up @@ -277,7 +277,6 @@ void G1FullCollector::verify_after_marking() {
return; return;
} }


HandleMark hm; // handle scope
#if COMPILER2_OR_JVMCI #if COMPILER2_OR_JVMCI
DerivedPointerTableDeactivate dpt_deact; DerivedPointerTableDeactivate dpt_deact;
#endif #endif
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/gc/g1/g1HeapVerifier.cpp
Expand Up @@ -449,7 +449,6 @@ class G1ParVerifyTask: public AbstractGangTask {
} }


void work(uint worker_id) { void work(uint worker_id) {
HandleMark hm;
VerifyRegionClosure blk(true, _vo); VerifyRegionClosure blk(true, _vo);
_g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id); _g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
if (blk.failures()) { if (blk.failures()) {
Expand Down Expand Up @@ -619,7 +618,6 @@ double G1HeapVerifier::verify(G1VerifyType type, VerifyOption vo, const char* ms


if (should_verify(type) && _g1h->total_collections() >= VerifyGCStartAt) { if (should_verify(type) && _g1h->total_collections() >= VerifyGCStartAt) {
double verify_start = os::elapsedTime(); double verify_start = os::elapsedTime();
HandleMark hm; // Discard invalid handles created during verification
prepare_for_verify(); prepare_for_verify();
Universe::verify(vo, msg); Universe::verify(vo, msg);
verify_time_ms = (os::elapsedTime() - verify_start) * 1000; verify_time_ms = (os::elapsedTime() - verify_start) * 1000;
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/parallel/psParallelCompact.cpp
Expand Up @@ -1007,7 +1007,6 @@ void PSParallelCompact::pre_compact()
heap->ensure_parsability(true); // retire TLABs heap->ensure_parsability(true); // retire TLABs


if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) { if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("Before GC"); Universe::verify("Before GC");
} }


Expand Down Expand Up @@ -1788,7 +1787,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {


{ {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


const uint active_workers = const uint active_workers =
WorkerPolicy::calc_active_workers(ParallelScavengeHeap::heap()->workers().total_workers(), WorkerPolicy::calc_active_workers(ParallelScavengeHeap::heap()->workers().total_workers(),
Expand Down Expand Up @@ -1945,7 +1943,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
#endif // ASSERT #endif // ASSERT


if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("After GC"); Universe::verify("After GC");
} }


Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/parallel/psScavenge.cpp
Expand Up @@ -430,13 +430,11 @@ bool PSScavenge::invoke_no_policy() {
heap->ensure_parsability(true); // retire TLABs heap->ensure_parsability(true); // retire TLABs


if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) { if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("Before GC"); Universe::verify("Before GC");
} }


{ {
ResourceMark rm; ResourceMark rm;
HandleMark hm;


GCTraceCPUTime tcpu; GCTraceCPUTime tcpu;
GCTraceTime(Info, gc) tm("Pause Young", NULL, gc_cause, true); GCTraceTime(Info, gc) tm("Pause Young", NULL, gc_cause, true);
Expand Down Expand Up @@ -714,7 +712,6 @@ bool PSScavenge::invoke_no_policy() {
} }


if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("After GC"); Universe::verify("After GC");
} }


Expand Down
11 changes: 6 additions & 5 deletions src/hotspot/share/gc/shared/collectedHeap.cpp
Expand Up @@ -229,20 +229,21 @@ CollectedHeap::CollectedHeap() :
// heap lock is already held and that we are executing in // heap lock is already held and that we are executing in
// the context of the vm thread. // the context of the vm thread.
void CollectedHeap::collect_as_vm_thread(GCCause::Cause cause) { void CollectedHeap::collect_as_vm_thread(GCCause::Cause cause) {
assert(Thread::current()->is_VM_thread(), "Precondition#1"); Thread* thread = Thread::current();
assert(thread->is_VM_thread(), "Precondition#1");
assert(Heap_lock->is_locked(), "Precondition#2"); assert(Heap_lock->is_locked(), "Precondition#2");
GCCauseSetter gcs(this, cause); GCCauseSetter gcs(this, cause);
switch (cause) { switch (cause) {
case GCCause::_heap_inspection: case GCCause::_heap_inspection:
case GCCause::_heap_dump: case GCCause::_heap_dump:
case GCCause::_metadata_GC_threshold : { case GCCause::_metadata_GC_threshold : {
HandleMark hm; HandleMark hm(thread);
do_full_collection(false); // don't clear all soft refs do_full_collection(false); // don't clear all soft refs
break; break;
} }
case GCCause::_archive_time_gc: case GCCause::_archive_time_gc:
case GCCause::_metadata_GC_clear_soft_refs: { case GCCause::_metadata_GC_clear_soft_refs: {
HandleMark hm; HandleMark hm(thread);
do_full_collection(true); // do clear all soft refs do_full_collection(true); // do clear all soft refs
break; break;
} }
Expand Down Expand Up @@ -412,14 +413,14 @@ CollectedHeap::fill_with_object_impl(HeapWord* start, size_t words, bool zap)
void CollectedHeap::fill_with_object(HeapWord* start, size_t words, bool zap) void CollectedHeap::fill_with_object(HeapWord* start, size_t words, bool zap)
{ {
DEBUG_ONLY(fill_args_check(start, words);) DEBUG_ONLY(fill_args_check(start, words);)
HandleMark hm; // Free handles before leaving. HandleMark hm(Thread::current()); // Free handles before leaving.
fill_with_object_impl(start, words, zap); fill_with_object_impl(start, words, zap);
} }


void CollectedHeap::fill_with_objects(HeapWord* start, size_t words, bool zap) void CollectedHeap::fill_with_objects(HeapWord* start, size_t words, bool zap)
{ {
DEBUG_ONLY(fill_args_check(start, words);) DEBUG_ONLY(fill_args_check(start, words);)
HandleMark hm; // Free handles before leaving. HandleMark hm(Thread::current()); // Free handles before leaving.


// Multiple objects may be required depending on the filler array maximum size. Fill // Multiple objects may be required depending on the filler array maximum size. Fill
// the range up to that with objects that are filler_array_max_size sized. The // the range up to that with objects that are filler_array_max_size sized. The
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/shared/gcVMOperations.cpp
Expand Up @@ -130,7 +130,6 @@ bool VM_GC_HeapInspection::collect() {
} }


void VM_GC_HeapInspection::doit() { void VM_GC_HeapInspection::doit() {
HandleMark hm;
Universe::heap()->ensure_parsability(false); // must happen, even if collection does Universe::heap()->ensure_parsability(false); // must happen, even if collection does
// not happen (e.g. due to GCLocker) // not happen (e.g. due to GCLocker)
// or _full_gc being false // or _full_gc being false
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/shared/genCollectedHeap.cpp
Expand Up @@ -317,7 +317,6 @@ HeapWord* GenCollectedHeap::mem_allocate_work(size_t size,


// Loop until the allocation is satisfied, or unsatisfied after GC. // Loop until the allocation is satisfied, or unsatisfied after GC.
for (uint try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) { for (uint try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) {
HandleMark hm; // Discard any handles allocated in each iteration.


// First allocation attempt is lock-free. // First allocation attempt is lock-free.
Generation *young = _young_gen; Generation *young = _young_gen;
Expand Down Expand Up @@ -477,7 +476,6 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
log_trace(gc)("%s invoke=%d size=" SIZE_FORMAT, heap()->is_young_gen(gen) ? "Young" : "Old", gen->stat_record()->invocations, size * HeapWordSize); log_trace(gc)("%s invoke=%d size=" SIZE_FORMAT, heap()->is_young_gen(gen) ? "Young" : "Old", gen->stat_record()->invocations, size * HeapWordSize);


if (run_verification && VerifyBeforeGC) { if (run_verification && VerifyBeforeGC) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("Before GC"); Universe::verify("Before GC");
} }
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear()); COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
Expand All @@ -502,7 +500,6 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
// weak refs more uniform (and indeed remove such concerns // weak refs more uniform (and indeed remove such concerns
// from GCH). XXX // from GCH). XXX


HandleMark hm; // Discard invalid handles created during gc
save_marks(); // save marks for all gens save_marks(); // save marks for all gens
// We want to discover references, but not process them yet. // We want to discover references, but not process them yet.
// This mode is disabled in process_discovered_references if the // This mode is disabled in process_discovered_references if the
Expand Down Expand Up @@ -535,7 +532,6 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
update_gc_stats(gen, full); update_gc_stats(gen, full);


if (run_verification && VerifyAfterGC) { if (run_verification && VerifyAfterGC) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("After GC"); Universe::verify("After GC");
} }
} }
Expand Down
5 changes: 3 additions & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Expand Up @@ -654,8 +654,9 @@ class ShenandoahRefProcTaskProxy : public AbstractGangTask {
} }


void work(uint worker_id) { void work(uint worker_id) {
ResourceMark rm; Thread* current_thread = Thread::current();
HandleMark hm; ResourceMark rm(current_thread);
HandleMark hm(current_thread);
assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint"); assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint");
ShenandoahHeap* heap = ShenandoahHeap::heap(); ShenandoahHeap* heap = ShenandoahHeap::heap();
ShenandoahParallelWorkerSession worker_session(worker_id); ShenandoahParallelWorkerSession worker_session(worker_id);
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/interpreter/interpreterRuntime.cpp
Expand Up @@ -1103,8 +1103,6 @@ JRT_LEAF(void, InterpreterRuntime::verify_mdp(Method* method, address bcp, addre
address mdp2 = mdo->bci_to_dp(bci); address mdp2 = mdo->bci_to_dp(bci);
if (mdp != mdp2) { if (mdp != mdp2) {
ResourceMark rm; ResourceMark rm;
ResetNoHandleMark rnm; // In a LEAF entry.
HandleMark hm;
tty->print_cr("FAILED verify : actual mdp %p expected mdp %p @ bci %d", mdp, mdp2, bci); tty->print_cr("FAILED verify : actual mdp %p expected mdp %p @ bci %d", mdp, mdp2, bci);
int current_di = mdo->dp_to_di(mdp); int current_di = mdo->dp_to_di(mdp);
int expected_di = mdo->dp_to_di(mdp2); int expected_di = mdo->dp_to_di(mdp2);
Expand All @@ -1125,7 +1123,6 @@ JRT_END
JRT_ENTRY(void, InterpreterRuntime::update_mdp_for_ret(JavaThread* thread, int return_bci)) JRT_ENTRY(void, InterpreterRuntime::update_mdp_for_ret(JavaThread* thread, int return_bci))
assert(ProfileInterpreter, "must be profiling interpreter"); assert(ProfileInterpreter, "must be profiling interpreter");
ResourceMark rm(thread); ResourceMark rm(thread);
HandleMark hm(thread);
LastFrameAccessor last_frame(thread); LastFrameAccessor last_frame(thread);
assert(last_frame.is_interpreted_frame(), "must come from interpreter"); assert(last_frame.is_interpreted_frame(), "must come from interpreter");
MethodData* h_mdo = last_frame.method()->method_data(); MethodData* h_mdo = last_frame.method()->method_data();
Expand Down Expand Up @@ -1479,8 +1476,6 @@ JRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* threa
if (src_address == dest_address) { if (src_address == dest_address) {
return; return;
} }
ResetNoHandleMark rnm; // In a LEAF entry.
HandleMark hm;
ResourceMark rm; ResourceMark rm;
LastFrameAccessor last_frame(thread); LastFrameAccessor last_frame(thread);
assert(last_frame.is_interpreted_frame(), ""); assert(last_frame.is_interpreted_frame(), "");
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/interpreter/oopMapCache.cpp
Expand Up @@ -321,7 +321,6 @@ void OopMapCacheEntry::fill_for_native(const methodHandle& mh) {




void OopMapCacheEntry::fill(const methodHandle& method, int bci) { void OopMapCacheEntry::fill(const methodHandle& method, int bci) {
HandleMark hm;
// Flush entry to deallocate an existing entry // Flush entry to deallocate an existing entry
flush(); flush();
set_method(method()); set_method(method());
Expand Down

0 comments on commit a94b605

Please sign in to comment.