On Thu, 22 Oct 2020 08:04:44 GMT, Robbin Ehn <r...@openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1390: >> >>> 1388: return JVMTI_ERROR_OUT_OF_MEMORY; >>> 1389: } >>> 1390: if (!eb.deoptimize_objects(0)) { >> >> Why is the depth 0 here? That makes no sense to me. My understanding of this >> is that we have extracted the object deopt that would "normally" (since last >> week?) be done in JvmtiEnvBase::check_top_frame. And it is walking 1 frame, >> so shouldn't the depth be 1? > > @reinrich did I mess something up when merging this in? Stack frames are counted beginning at 0. The top frame has depth 0. So object deoptimization happens in the top frame. Still the used method is not optimal because it assumes that objects of frames within the given depth are accessed and their escape state is changed. But potentially caller methods optimized on the escape state therefore it searches for caller frames passing ArgEscape objects and deoptimizes these too. With ForceEarlyReturn no objects are accessed but it is so uncommon that I did not bother optimizing this. Should I? ------------- PR: https://git.openjdk.java.net/jdk/pull/729