-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8368787: Error reporting: hs_err files should show instructions when referencing code in nmethods #27530
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
Closed
TheRealMDoerr
wants to merge
6
commits into
openjdk:master
from
TheRealMDoerr:8368787_hs_err_nmethod_code
Closed
8368787: Error reporting: hs_err files should show instructions when referencing code in nmethods #27530
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
660a388
8368787: Error reporting: hs_err files should print instructions when…
TheRealMDoerr 003680d
Always print hex dump. Plus disassembly when hsdis loaded.
TheRealMDoerr 4a05d40
Move printing code to nmethod.cpp.
TheRealMDoerr 81dd1c8
Use frame_complete_offset for better start address computation. Impro…
TheRealMDoerr db4c64a
Ensure to print at least 64 Bytes ahead in hex dump.
TheRealMDoerr 99c248f
Merge remote-tracking branch 'origin' into 8368787_hs_err_nmethod_code
TheRealMDoerr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
IIUC, the size of the printout is somewhat random. In the extreme cases, this may be either (close to) start-of-method to end-of-method, so almost the whole method. Or, it may be from an address very close to the address, so a very small snippet.
Tying the end address to a relocation is not strictly necessary, no? We could just print to `MIN2(code end, addr + 64)? Disassembler should be fine if the printout stops in the middle of an instruction, as long as instruction addresses are correct?
And could we start printing at the relocation preceding-or-at
addr - 64instead, to ensure we have at least 64 bytes of printout before the crash address?Uh oh!
There was an error while loading. Please reload this page.
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.
Right, the size is somewhat random. Relocations seem to be the most fine-grained information we currently have. In addition, they typically point to some meaningful points in the code. This PR disassembles the smallest possible snippet around the given address using relocations as start and end.
Right, having a relocation as end address is technically not strictly required. However, I've seen that the disassembler on x86 produced garbage as well when the end is not an instruction boundary.
I agree with you that we usually want at least 64 Bytes ahead. On the other hand, some people don't want too much, either. See JDK-8274986.
So, I changed only the hex dump for which we can afford printing more without bloating the hs_err file too much. Please take a look at my new commit.
Btw.
addris typically not a crash address, but one which is referenced by a register and somehow related to a crash.