RFR: 8337789: JEP 509: JFR CPU-Time Profiling (Experimental) [v47]

Johannes Bechberger jbechberger at openjdk.org
Thu May 15 13:32:06 UTC 2025


On Mon, 12 May 2025 18:02:37 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Simplify local trace stack
>
> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 678:
> 
>> 676: void JfrCPUTimeThreadSampler::on_safepoint(JavaThread* thread) {
>> 677:   JfrThreadLocal* jtl = thread->jfr_thread_local();
>> 678:   if (jtl == nullptr) {
> 
> Shouldn’t this be an assert that `jtl != nullptr`?

Good catch.

> src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 738:
> 
>> 736:   long max_chunk_size = JfrOptionSet::max_chunk_size() == 0 ? 12 * 1024 * 1024 : JfrOptionSet::max_chunk_size() / 2;
>> 737:   int max_size = max_chunk_size / 2 / wordSize / JfrOptionSet::stackdepth();
>> 738:   if (trace_stack_size < 20 * 4) {
> 
> Based on the above initialization `trace_stack_size` will be at least 100 so this should never happen.

Good catch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r2091179878
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r2091179228


More information about the hotspot-dev mailing list