On Tue, 20 Oct 2026 23:13:57 GMT, Xin Liu <[email protected]> wrote:

>> Well, there are as many opinions as there are people. While [one 
>> feedback](https://github.com/openjdk/jdk/pull/32524#discussion_r3958462315) 
>> suggests that 8 frames should be sufficient, another says that 128 may not 
>> be enough.
>> 
>> 128 was my conscious choice for multiple reasons:
>> - From my experience of async-profiling, I don't recall seeing native stacks 
>> deeper than that in _Java_ applications, except for cases when stack walking 
>> was broken. Deep recursion in native code is of course possible, but getting 
>> full stack traces in such edge cases adds little value and is not practical.
>> - We can't really use much more than 1KB (128*8) of stack inside a signal 
>> handler safely.
>> - Linux's own perf stack depth (kernel.perf_event_max_stack) is capped by 
>> 127 by default.
>> 
>> Printing a warning is not permitted inside a signal handler. JFR does not 
>> print anything today wihen it truncates Java stack traces, and its existing 
>> `truncated` flag (which is about reaching root frame) does not fit our use 
>> case.
>
> okay. I forget we can't emit anything inside of a signal handler. it's okay 
> to me that we truncate here. 
>  
> Can we leave a comment here? just say the truncation is by design.

I'll add a comment in the next revision.

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

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

Reply via email to