-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8333182: Add truncated tracing mode for TraceBytecodes #19457
Conversation
👋 Welcome back redestad! A progress list of the required criteria for merging this PR into |
@cl4es This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 61 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised not to find a RFE to convert TraceBytecodes to Unified Logging. That would solve your problem as you could just reclassify the too-verbose "logging" statements. Not to put you on-the-spot @cl4es but do you have a sense for how difficult a conversion to UL would be? :)
The tracer code isn't all that large or convoluted, but some of the printing code is shared with Porting to UL also adds a bit of (optional) logging to each line, growing the output and requiring parser changes. Perhaps there are some ways to tame UL to output exactly - or almost exactly - the same thing, but regardless it definitely complicates parsing. That also begs the question if we need to retain I don't have a strong opinion. I do really want this feature in ASAP (to speed up my work and make the startup tracing useful on larger apps), but I have no idea how high of a priority it is to port this to UL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay it sounds like UL is not a feasible short term solution here., so being able to truncate the verbose output seems reasonable.
Thanks! |
Any second reviewer for this? Or is it trivial enough to go ahead with one? |
Its not really trivial. I'll have a look today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine. I had the same question that David did about using UL, but this is simpler. Most of the Trace* options in the runtime were converted to UL but where they have a specific format, it was too cumbersome so we didn't do it.
Thanks for reviewing, everyone! /integrate |
Going to push as commit 769b3e4.
Your commit was automatically rebased without conflicts. |
We routinely use
-XX:+TraceBytecodes
to instrument what's going on during application startup. However, much of the information traced in this mode is not really used, and adding a mode which truncates non-relevant information would be helpful to speed up instrumentation, especially on larger apps.To illustrate, running
-XX:+TraceBytecodes
on a version of netty can produce more than 844MB of output:A sample output block looks like this:
This PR add a develop flag,
TraceBytecodesTruncated
meant to be used in addition toTraceBytecodes
. It has the effect that all but the first bytecode in each method transition as well as returns and throws will be omitted. With the patch the output may look like this:This truncated output is sufficient for certain purposes such as when digesting the output with bytestacks.
Running the same application with the patch and the added flag,
-XX:+TraceBytecodes -XX:+TraceBytecodesTruncated
generates a file that is 177MB, and in about a third of the time:This enhancement would greatly speed up some of our diagnostics, and enable using these tools on even larger apps.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19457/head:pull/19457
$ git checkout pull/19457
Update a local copy of the PR:
$ git checkout pull/19457
$ git pull https://git.openjdk.org/jdk.git pull/19457/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19457
View PR using the GUI difftool:
$ git pr show -t 19457
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19457.diff
Webrev
Link to Webrev Comment