On Tue, 20 Sep 2022 22:34:59 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiExport.cpp line 1055:
>> 
>>> 1053:   if (JavaThread::current()->is_in_tmp_VTMS_transition()) {
>>> 1054:     return false;
>>> 1055:   }
>> 
>> You mentioned this in the PR description. However, it's not clear to me why 
>> this is ok.  Also, it should be commented.
>> 
>> Same thing for changes in JvmtiExport::post_class_load() and 
>> JvmtiExport::post_class_prepare().
>
> I initially wanted to consult on this with Alan. It feels like it'd be better 
> if I did it before posting this PR.
> We have just two possible approaches here. The best approach is to move any 
> class loading out of the temporary transition code path. Then we already have 
> the relevant asserts in place. However, this is not that easy to solve. Alan 
> already suggested a couple of patches which I've tested but new places with 
> class loads were discovered. Another approach is to skip all ClassLoad, 
> ClassPrepare and CFLH events in context of temporary transitions. It is hard 
> to estimate how acceptable it is. At least, I've not found any failing tests 
> because of it which means it most likely does not impact the debugger. My 
> current suggestion is to file a bug and try to address it later as Alan may 
> need more time for analysis.

We touched this issue with Alan and made a couple of updates. However, it 
occurred much harder to get rid of all class loading in context of temporary 
transitions. My current suggestion is still on the table. It is to file a 
separate bug and attempt to fix it later. NO test failures were discovered 
because of the skipped ClassLoad, ClassPrepare and CFLH events.

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

PR: https://git.openjdk.org/jdk/pull/10321

Reply via email to