RFR: 8268829: Provide an optimized way to walk the stack with Class object only [v8]
Mandy Chung
mchung at openjdk.org
Wed Aug 30 18:09:34 UTC 2023
On Wed, 30 Aug 2023 15:31:27 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/StackStreamFactory.java line 694:
>>
>>> 692: // no method information is available; should just filter
>>> 693: // "Continuation::yield0".
>>> 694: return classFrames[index].declaringClass() == Continuation.class;
>>
>> Is that going to be an issue if by chance the frame is some other method on continuation?
>> Could that comment be clarified a bit?
>> I am not sure what is meant by `should just filter "Continuation::yield0"`; Does it mean: that's what we should do, but we can't, so we filter any method on `Continuation` instead? Or does it mean: the only method we expect here if declaringClass is `Continuation` is `yield0`, so the line below should only filter out `Continuation::yield0`?
>
> The Continuation frames around enter and yielding are hidden. Continuation.yield0 was the only frame that required special handling here, it may need to be re-checked to see if it is still required when using SHOW_HIDDEN_FRAMES.
Looks like the filtering is not needed. https://bugs.openjdk.org/browse/JDK-8304919 marked those methods with `@Hidden`. If `SHOW_HIDDEN_FRAMES` is set, those frames should be included unless there is a reason not to.
I will update the patch to remove the filtering in both `StackFrameBuffer` and `ClassFrameBuffer`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15370#discussion_r1310645327
More information about the core-libs-dev
mailing list