Hi,

I noticed that VM_EnterInterpOnlyMode makes all compiled methods on stack 
not_entrant. To me this
seems unnecessary. I think it would be sufficient to patch the return pc of 
compiled frames and
let them return to their deopt handler. Or what would be the reason to make the 
compiled methods
not_entrant?

VM_EnterInterpOnlyMode::doit(): all compiled methods on stack that are not 
native methods get
marked.

Deoptimization::deoptimize_all_marked(): all marked methods are made 
not_entrant.

Maybe this is for historical reasons? If I remember correctly, many years ago, 
deoptimizing a
compiled frame used to require making the corresponding nmethod not_entrant. 
And making a nmethod
not_entrant meant overriding its code with a slide of nops that led to the 
deopt handler.

I'd like to change this and just apply Deoptimization::deoptimize() on every 
compiled frame on
stack. I've done this locally and tested the change without issues.

Thanks,
Richard.

Reply via email to