On Tue, 29 Sep 2026 22:44:56 GMT, Andrei Pangin <[email protected]> wrote:

>> This PR adds a new JFR frame type - for native (non-Java) frames.
>> Native stack walking can be enabled with a new `FlightRecorderOption`.
>> Only `jdk.CPUTimeSample` event can have native frames for now, but this can 
>> be extended to other events in the future.
>> 
>> More details in https://bugs.openjdk.org/browse/JDK-8373791
>> 
>> Existing JFR tests pass.
>> Added a new jtreg test that verifies sanity of collected native frames.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Andrei Pangin has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Added FlightRecorderOption to configure maximum native stack depth

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 613:

> 611: 
> 612:   u4 count = 0;
> 613:   while (count < max_frames) {

Hi, @apangin 
Even though 128 is very generous, I think it's still possible that we see a 
deeper native traces. In other words, there're more than max_frames before LJF.

Current implementation just truncates silently. Do we need to emit a warning 
message or an error code to remind end-users? or they have to realize that from 
flamegraph.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32524#discussion_r4319718640

Reply via email to