-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GR-43934] Only build full FrameTree when OmitInlinedMethodDebugLineInfo is false. #6504
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b70c640
Only build full FrameTree when OmitInlinedMethodDebugLineInfo is false
olpaw f79c0a5
Do not use SourceMappings for DebugCodeInfo generation per-default
olpaw 00eaa8e
Make -H:-OmitInlinedMethodDebugLineInfo the default
olpaw abdb630
Handle missing caller FileEntry in DwarfInfoSectionImpl.writeInlineSu…
olpaw 13ff344
[GR-45807] Dwarf debuginfo generation makes only sense when LIR backe…
olpaw 5e6ceb5
Use unboxed int
olpaw 969971c
Make dependency to old DebugInfo explicit in expression
olpaw 6430425
Remove -H:-OmitInlinedMethodDebugLineInfo since it's now the default
olpaw 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1246,12 +1246,24 @@ public Stream<DebugLocationInfo> locationInfoProvider() { | |
if (fileName().length() == 0) { | ||
return Stream.empty(); | ||
} | ||
final CallNode root = new Builder(debugContext, compilation.getTargetCodeSize(), true).build(compilation); | ||
boolean omitInline = SubstrateOptions.OmitInlinedMethodDebugLineInfo.getValue(); | ||
int maxDepth = SubstrateOptions.DebugCodeInfoMaxDepth.getValue(); | ||
boolean useSourceMappings = SubstrateOptions.DebugCodeInfoUseSourceMappings.getValue(); | ||
if (omitInline) { | ||
if (!SubstrateOptions.DebugCodeInfoMaxDepth.hasBeenSet()) { | ||
/* TopLevelVisitor will not go deeper than level 2 */ | ||
maxDepth = 2; | ||
} | ||
if (!SubstrateOptions.DebugCodeInfoUseSourceMappings.hasBeenSet()) { | ||
/* Skip expensive CompilationResultFrameTree building with SourceMappings */ | ||
useSourceMappings = false; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If |
||
} | ||
final CallNode root = new Builder(debugContext, compilation.getTargetCodeSize(), maxDepth, useSourceMappings, true).build(compilation); | ||
if (root == null) { | ||
return Stream.empty(); | ||
} | ||
final List<DebugLocationInfo> locationInfos = new ArrayList<>(); | ||
final boolean omitInline = SubstrateOptions.OmitInlinedMethodDebugLineInfo.getValue(); | ||
int frameSize = getFrameSize(); | ||
final Visitor visitor = (omitInline ? new TopLevelVisitor(locationInfos, frameSize) : new MultiLevelVisitor(locationInfos, frameSize)); | ||
// arguments passed by visitor to apply are | ||
|
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.
Local var fileIndex is declared a few lines up as an Integer, a legacy of an earlier version where the index for a given source dir was stored in a per-CU (i.e. per ClassEntry) map. This no longer applies with the latest code where the file index is defined globally across all classes, hence stored as an int in the FileEntry. It would be good to take the opportunity to clean this up by declaring fileIndex as an int.