Hi Dean,
Thank you a lot for looking at this! Just a couple of points from me (it is up to Alex to provide a full answer). I think, Alex in this RFR missed to tell that we knew about this issue that an incorrect frame will be popped. But after some discussion we decided to file a separate issue on this. Alex wanted to create a good stand-alone test case demonstrating this problem before filing it. Now, as I can see, the JDK-8195635 looks very close to a bug that we wanted to file. The only difference is that our scenario includes the SharedRuntime::resolve_static_call_C instead of the JavaCallWrapper::JavaCallWrapper as a helper for Java method invocation. If I understand corrctly (Alex will fix me if needed), the jtreg test we used to chase this issue did not catch a problem with the HotSpotJVMCIRuntime.adjustCompilationLevel. The suggested fix was to fix the mismatch in the TieredThresholdPolicy::even with the comment in the interpreter code: nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, address branch_bcp) { . . . if (nm != NULL && thread->is_interp_only_mode()) { // Normally we never get an nm if is_interp_only_mode() is true, because // policy()->event has a check for this and won't compile the method when // true. However, it's possible for is_interp_only_mode() to become true // during the compilation. We don't want to return the nm in that case // because we want to continue to execute interpreted. nm = NULL; } > So I think the fix needs to be in code like SharedRuntime::resolve_static_call_C(), > where it returns get_c2i_entry() if is_interp_only_mode() is true. I'm not sure, the adding this condition and returning the get_c2i_entry() is always correct. We need some help from the Compiler team to make it right. BTW, the interp_only_mode has been enabled only when some interp_only events are enabled. It is not set by either PopFrame or ForceEarlyReturn. But the popframe009 test enables single stepping, so we wanted to make this part right. Thanks, Serguei On 11/26/18 16:05, dean.l...@oracle.com wrote: How does this solve the problem of HotSpotJVMCIRuntime.adjustCompilationLevel being called? |
- RFR JDK-8195639: [Graal] nsk/jvmti/PopFrame/pop... Alex Menkov
- Re: RFR JDK-8195639: [Graal] nsk/jvmti/Pop... dean . long
- Re: RFR JDK-8195639: [Graal] nsk/jvmti... serguei.spit...@oracle.com
- Re: RFR JDK-8195639: [Graal] nsk/j... Alex Menkov
- Re: RFR JDK-8195639: [Graal] n... serguei . spitsyn
- Re: RFR JDK-8195639: [Gra... dean . long
- Re: RFR JDK-8195639: ... serguei . spitsyn
- Re: RFR JDK-81956... serguei . spitsyn
- Re: RFR JDK-81956... dean . long
- Re: RFR JDK-81956... serguei.spit...@oracle.com
- Re: RFR JDK-81956... Alex Menkov
- Re: RFR JDK-81956... dean . long
- Re: RFR JDK-81956... serguei.spit...@oracle.com