Skip to content

Conversation

@roberttoyonaga
Copy link
Collaborator

JEP 520 introduced JFR method tracing and timing. This is a feature we do not support yet because it involves significant changes in Hotspot. If we substitute related classes we can reduce code size and image heap.

Using a basic Quarkus quickstart app this change results in a 0.92 MB code size decrease and a 1.31 MB image heap size decrease.

Before
image
After
image

I see a similar reduction when using a simple hello world app:

Before
image

After
image

If a user tries to use JFR method tracing and timing from the command line they will receive a warning log then JFR will continue working as normal:

$  ./simplebusywait -XX:StartFlightRecording=filename=rec.jfr,method-timing=::java.util.HashMap::resize
[warn][jfr,start] The .jfc option/setting 'method-timing' doesn't exist or is not supported.

If they try to use method tracing and timing by using a JFR configuration file (.jfc) instead, they will also get a warning:

$ ./simplebusywait -XX:StartFlightRecording=filename=rec.jfr,settings=custom.jfc
[warn][jfr,setting] Method timing and tracing is not supported yet.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 7, 2025
@roberttoyonaga roberttoyonaga marked this pull request as ready for review November 7, 2025 16:14
@christianhaeubl christianhaeubl changed the title Reduce JFR RSS contribution by substituting method tracing and timing classes [GR-71287] Reduce JFR RSS contribution by substituting method tracing and timing classes Nov 10, 2025
@christianhaeubl
Copy link
Member

Thanks, your PR should get integrated in the next few days.

@christianhaeubl christianhaeubl self-assigned this Nov 10, 2025
@roberttoyonaga
Copy link
Collaborator Author

@christianhaeubl Can this be backported to the GraalVM for JDK 25 branch? I can open the backport request if you agree.

@christianhaeubl
Copy link
Member

Should be safe to backport, feel free to open a the backport request.

@graalvmbot graalvmbot merged commit 9d8c720 into oracle:master Nov 10, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

native-image native-image-jfr OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants