On Fri, 30 Oct 2020 00:58:06 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> Thanks for having a look coleen. In fact, not doing the JRT_BLOCK for the 
>> exception entry is intentional, because that entry goes through a different 
>> JRT_ENTRY (not JRT_BLOCK_ENTRY), that already transitions. So if I do the 
>> JRT_BLOCK for the exception path, it asserts saying hey you are already in 
>> VM.
>
> Oh that's actually horrible.   I wonder if it's possible to hoist saving the 
> result oop into the InterpreterRuntime entry.  And pass the Handle into 
> JvmtiExport::post_method_exit().

I tried that first, and ended up with a bunch of non-trivial code duplication 
instead, as reading the oop is done in both paths but for different reasons. 
One to preserve/restore it (interpreter remove_activation entry), but also 
inside of JvmtiExport::post_method_exit() so that it can be passed into the 
MethodExit. I will give it another shot and see if it is possible to refactor 
it in a better way.

-------------

PR: https://git.openjdk.java.net/jdk/pull/930

Reply via email to