-
Notifications
You must be signed in to change notification settings - Fork 3.1k
add per-phase profiling to scalac #5848
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
Conversation
@@ -338,6 +338,16 @@ trait ScalaSettings extends AbsScalaSettings | |||
|
|||
def YstatisticsEnabled = Ystatistics.value.nonEmpty | |||
|
|||
val YprofileEnabled = BooleanSetting("-Yprofile-enabled", "Enable profiling.") |
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.
This whole pr is super useful. Thank you!
@@ -0,0 +1,17 @@ | |||
package scala.tools.nsc.profile; | |||
|
|||
/** |
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.
Can we simplify and make these docs clearer? There are typos, no capital letter and the actual meat of the docs is hidden under unnecessary words 😄.
/rebuild |
87b0f88
to
7677c90
Compare
- Wall Clock Time (ms) - wall clock time - Idle Time (ms) - time blocked - cpu time (ms) - reported cpu time - user time (ms) - reported user time - allocated (mb) - bytes allocated during phase - retainedHeap (mb) - retained heap after phase (enable GC for more accurate counts) - gcTime (ms) - time spent in GC. Adds four flags: -Yprofile-enabled Add per phase profiling information -Yprofile-destination:<file> Where to write profiling information (defaults to console if not set) -Yprofile-run-gc Run GC between phases to help gemerate more more accurate memory usage in profiling -Yprofile-external-tool:<phase> Enable calling of ExternalToolHook.before/after around the target phase
7677c90
to
e929236
Compare
Better description (from updated git commit):
|
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.
I have some ideas about ways to extend this, but I think its a great starting point and we can include in 2.12.3.
Future work:
- Rather than rendering the profile results to the logger after each compiler run, aggregate them over many runs of the compiler and present summary statistics at the end.
- Try to reuse some of the MXBean based profiler code from JMH rather than DIY (unfortunately this isn't straightforward with the current API of JMH)
Great.
I agree those are both good ideas.
… On 4 Jul 2017, at 00:27, Jason Zaugg ***@***.***> wrote:
@retronym approved this pull request.
I have some ideas about ways to extend this, but I think its a great starting point and we can include in 2.12.3.
Future work:
Rather than rendering the profile results to the logger after each compiler run, aggregate them over many runs of the compiler and present summary statistics at the end.
Try to reuse some of the MXBean based profiler code from JMH rather than DIY (unfortunately this isn't straightforward with the current API of JMH)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No description provided.