Emit detailed compiler trace under -Yprofile-trace#7364
Merged
adriaanm merged 1 commit intoscala:2.12.xfrom Oct 31, 2018
Merged
Emit detailed compiler trace under -Yprofile-trace#7364adriaanm merged 1 commit intoscala:2.12.xfrom
adriaanm merged 1 commit intoscala:2.12.xfrom
Conversation
3c0f632 to
583c3ef
Compare
4 tasks
Member
Author
|
/rebuild |
583c3ef to
38f7a85
Compare
Member
Author
|
FTR, the OSGi test failure: Turned out to be a usage of |
59cdc98 to
3202908
Compare
Suitable for viewing directly in chrome://tracing, or post processing with https://github.com/retronym/chrome-trace-to-flamegraph Co-Authored-By: Mike Skells <mike.skells@talk21.com>
3202908 to
856c111
Compare
Member
Author
|
/cc @dragos |
WojciechMazur
added a commit
to scala/scala3
that referenced
this pull request
Oct 22, 2024
* Scala 2 tracing profiler backport from scala/scala#7364 extended with more Scala 3 idiomatic syntax based on inlined methods * Fixes the `context.profiler` which could have been `null`, now it's initially a NoOp Profiler * Check dependencies of `-Yprofile-enabled` dependent tasks, now we get an error if `-Yprofile-trace` is set without `-Yprofile-enabled`
tgodzik
pushed a commit
to scala/scala3-lts
that referenced
this pull request
Feb 7, 2025
* Scala 2 tracing profiler backport from scala/scala#7364 extended with more Scala 3 idiomatic syntax based on inlined methods * Fixes the `context.profiler` which could have been `null`, now it's initially a NoOp Profiler * Check dependencies of `-Yprofile-enabled` dependent tasks, now we get an error if `-Yprofile-trace` is set without `-Yprofile-enabled`
tgodzik
added a commit
to scala/scala3-lts
that referenced
this pull request
Feb 7, 2025
* Scala 2 tracing profiler backport from scala/scala#7364 extended with more Scala 3 idiomatic syntax based on inlined methods * Fixes the `context.profiler` which could have been `null`, now it's initially a NoOp Profiler * Check dependencies of `-Yprofile-enabled` dependent tasks, now we get an error if `-Yprofile-trace` is set without `-Yprofile-enabled` [Cherry-picked ecc332f][modified]
tgodzik
pushed a commit
to scala/scala3-lts
that referenced
this pull request
Feb 13, 2025
* Scala 2 tracing profiler backport from scala/scala#7364 extended with more Scala 3 idiomatic syntax based on inlined methods * Fixes the `context.profiler` which could have been `null`, now it's initially a NoOp Profiler * Check dependencies of `-Yprofile-enabled` dependent tasks, now we get an error if `-Yprofile-trace` is set without `-Yprofile-enabled`
tgodzik
added a commit
to scala/scala3-lts
that referenced
this pull request
Feb 13, 2025
* Scala 2 tracing profiler backport from scala/scala#7364 extended with more Scala 3 idiomatic syntax based on inlined methods * Fixes the `context.profiler` which could have been `null`, now it's initially a NoOp Profiler * Check dependencies of `-Yprofile-enabled` dependent tasks, now we get an error if `-Yprofile-trace` is set without `-Yprofile-enabled` [Cherry-picked ecc332f][modified]
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Suitable for viewing directly in chrome://tracing, or post processing
with https://github.com/retronym/chrome-trace-to-flamegraph
Co-Authored-By: Mike Skells mike.skells@talk21.com
Demo
Editing an SBT build to add these settings to each project.
Compiling the project will create:
These can be loaded individually into
chrome://tracingin Chrome.Post process to aggregate, split events when GC occurs or when lazy type completion occurs
combined.tracecan be viewed inchrome:/tracing.Generate flame graphs.
UPDATE
speedscope.app can now import the
compile.tracefile directly and render both the trace view (what happens over time) and the flamegraph view.