-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8304089: Convert TraceDependencies to UL #13007
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
Conversation
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
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.
Looks good.
@coleenp 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 91 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 |
Thank you Vladimir. |
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.
Overall looks good. Just a couple of small tweaks needed.
Thanks.
@@ -3586,7 +3586,7 @@ static bool use_vm_log() { | |||
if (LogCompilation || !FLAG_IS_DEFAULT(LogFile) || | |||
PrintCompilation || PrintInlining || PrintDependencies || PrintNativeNMethods || | |||
PrintDebugInfo || PrintRelocations || PrintNMethods || PrintExceptionHandlers || | |||
PrintAssembly || TraceDeoptimization || TraceDependencies || | |||
PrintAssembly || TraceDeoptimization || log_is_enabled(Debug, dependencies) || |
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.
Now TraceDependencies is converted to UL I think it should just be deleted from this function. We don't need to enable LogVMOutput in that case.
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.
No, this is the right thing to do. If -Xlog:dependency - the compiler group also expects the dependency printed to the compiler log file. The logging is a separate mechanism, but should be enabled with -Xlog:dependency.
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.
Sorry I don't follow that. use_vm_log()
only affects non-product builds and forces LogVMOutput
to true. That in turn will cause defaultStream::init_log()
to execute which initializes the log file etc. But I don't see how that would cause UL logging for "dependencies" to also get written to the log file???
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.
See the function log_dependency()
jdk/src/hotspot/share/code/dependencies.cpp
Line 845 in 421b4ee
void Dependencies::DepStream::log_dependency(Klass* witness) { |
called from here (as one place).
jdk/src/hotspot/share/code/dependencies.cpp
Line 2071 in 421b4ee
log_dependency(witness); |
When TraceDependencies was true, the log file would be non-null and log_dependency would write to it. Keeping this with -Xlog:dependencies=debug retains what TraceDependencies did.
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.
Hmmm this seems broken to me then. We output the general dependency logging to one place based on UL configuration, but then we output log_dependency
to the log file. If these are meant to be related and always reported together then we have lost that. If they are actually unrelated then this may still need the TraceDependencies flag to control it.
@iwanowww can you comment on this please?
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.
Maybe we don't need this -Xlog test in this place, because this is also what PrintDependencies does.
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.
Yes, UL check doesn't help here. Irrespective of the check, UL output isn't automatically placed in VM log.
It's convenient for LogCompilation to have VM output along with other VM events present in the log.
Having said that, I'm fine with dropping TraceDependencies check here and improve the interaction between UL and LogVMOutput separately.
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 thank you.
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.
Nothing further from me - update is good. Thanks.
Thank you Vladimir and David. |
Going to push as commit ddf1e34.
Your commit was automatically rebased without conflicts. |
This change converts TraceDependencies to UL and removes the develop option. I think this provides further flexibility to add tags to only trace certain things in dependency analysis, as I did when trying to understand a PR for a deoptimization change. For now, the messages are the same and the option is -Xlog:dependencies=debug.
Tested with tier1-4
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13007/head:pull/13007
$ git checkout pull/13007
Update a local copy of the PR:
$ git checkout pull/13007
$ git pull https://git.openjdk.org/jdk.git pull/13007/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13007
View PR using the GUI difftool:
$ git pr show -t 13007
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13007.diff