8221539: [metaspace] Improve MetaspaceObj::is_metaspace_obj() and friends

Reviewed-by: adinn, coleenp, mdoerr
This commit is contained in:
Thomas Stuefe 2019-03-27 14:13:34 +01:00
parent f65be307bf
commit 1baf5289c5
13 changed files with 222 additions and 28 deletions

View file

@ -63,7 +63,8 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext,
if (ret_frame.is_interpreted_frame()) {
frame::z_ijava_state* istate = ret_frame.ijava_state_unchecked();
if ((stack_base() >= (address)istate && (address)istate > stack_end()) || !((Method*)(istate->method))->is_metaspace_object()) {
if ((stack_base() >= (address)istate && (address)istate > stack_end()) ||
MetaspaceObj::is_valid((Method*)(istate->method)) == false) {
return false;
}
uint64_t reg_bcp = uc->uc_mcontext.gregs[13/*Z_BCP*/];