-
Notifications
You must be signed in to change notification settings - Fork 1.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
[GR-43934] Only build full FrameTree when OmitInlinedMethodDebugLineInfo is false. #6504
Conversation
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 comment
The reason will be displayed to describe this comment to others. Learn more.
If DebugCodeInfoMaxDepth
or DebugCodeInfoUseSourceMappings
are set explicitly by the user (-H:...
) they override any adjustment of the settings performed for OmitInlinedMethodDebugLineInfo
.
@adinn ideally I would want to switch to |
I tested with the example that caused most debuginfo generation time increase. And it turns out now with SourceMappings not being used anymore we can have dacapo-9-12-mr1-git+2baec49-fop-pgo-ee
vs. master
vs. master
|
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.
Thanks, Paul. This looks good modulo one opportunity to remove a small bit of technical debt.
@@ -1349,9 +1349,12 @@ private int writeInlineSubroutine(DebugContext context, Range caller, int depth, | |||
fileIndex = 1; |
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.
As a default using
-g
will create DebugLocationInfo only for the body of compiled method but not for any method inlined into the compiled method. Despite that we always produced a full FrameTree even though only the first two levels are only every visited in this mode. This is a huge waste of time in the debug info generation part of the image built time.This PR ensures that only when
-H:-OmitInlinedMethodDebugLineInfo
is used a full FrameTree gets created.