8375534: Debug method 'pp' should support compressed oops#29280
8375534: Debug method 'pp' should support compressed oops#29280TobiHartmann wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back thartmann! A progress list of the required criteria for merging this PR into |
|
@TobiHartmann 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 209 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 |
|
@TobiHartmann The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
iwanowww
left a comment
There was a problem hiding this comment.
Overall, looks good.
BlockLocationPrinter<CollectedHeapT>::print_location() has very similar code, but uses a more elaborate check in place of Universe::heap()->is_in(o). Any particular reason LocationPrinter::is_valid_obj() doesn't fit pp()? Otherwise, it makes sense to unify the code.
|
Thanks for the review, Vladimir. You are right and when looking at the code again, I noticed that we can just call |
Arraying
left a comment
There was a problem hiding this comment.
This is a super useful change, thanks for doing it. One small comment.
| obj->print(); | ||
| } else { | ||
|
|
||
| if (!Universe::heap()->print_location(tty, p)) { |
There was a problem hiding this comment.
FYI, we also have os::print_location which adds a few extra goodies (nullcheck + code blob check). Its documentation mentions
// moved from debug.cpp (used to be find()) but still called from there
I'm happy with the current code and I'd also be okay with using the os version, I just wanted to point it out in case you think one is more appropriate than the other.
There was a problem hiding this comment.
Thanks for taking a look at this. Yes, I've seen that and it's already used by find and findpc. I think the intention of pp is that we already know/expect that the argument is a pointer into the Java heap and therefore want to limit the amount of checks (maybe for performance or stability reasons?) during debugging.
There was a problem hiding this comment.
Hi @franciscoarturorivera371-cyber, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user franciscoarturorivera371-cyber" for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
|
Thanks Vladimir! |
|
/integrate |
|
Going to push as commit 0f4d775.
Your commit was automatically rebased without conflicts. |
|
@TobiHartmann Pushed as commit 0f4d775. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The debug method
ppis currently not able to handle compressed oops. This should fix it. The code is similar toBlockLocationPrinter<CollectedHeapT>::print_location.Before:
After:
Thanks,
Tobias
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29280/head:pull/29280$ git checkout pull/29280Update a local copy of the PR:
$ git checkout pull/29280$ git pull https://git.openjdk.org/jdk.git pull/29280/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29280View PR using the GUI difftool:
$ git pr show -t 29280Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29280.diff
Using Webrev
Link to Webrev Comment