Skip to content

Port per-phase profiling from scalac #2909

Closed
@smarter

Description

@smarter

This seems like something we could use, I especially like the external tool hook allowing profilers such as Yourkit to instrument a single phase: scala/scala#5848

Add support for phase profiling generating inforamtion per phase:
  - 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions