Skip to content
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

Extract data from -Yprofile during benchmark #43

Open
retronym opened this issue Nov 27, 2017 · 3 comments
Open

Extract data from -Yprofile during benchmark #43

retronym opened this issue Nov 27, 2017 · 3 comments
Assignees

Comments

@retronym
Copy link
Member

@rorygraves and @mkeskells have contributed internal profiling to scalac to capture some MXBean statistics during compilation and report these broken down by compiler phase.

There is some overlap with the built-in profilers in JMH, but we can't easily replicate the ability to drill down by phase with the JMH profilers.

Can we have our cake (standardized JMH benchmark execution and statistics) and eat it too (per-phase stats)?

Possible solutions:

  • Write a custom JMH profiler that reads/parses the file written by -Yprofile and presents them in the form understood by JMH.
  • Modify JMH to let the benchmarked program to trigger profiler snapshots before the phase transition, providing the phase name as an extra part of the result key.
@retronym
Copy link
Member Author

retronym commented Dec 19, 2017

WIP in https://github.com/retronym/compiler-benchmark/tree/topic/yprofile-parser.

I'm also collecting the output of -Ystatistics.

The same code can be used to scrape a build log of a multi-module project to get a bit spreadsheet of the stats indexed by (module, compiler phase).

/cc @jvican

@mkeskells
Copy link

the reporting from -Yprofile is pluggable, so you can write to file or an internal form that a JMH based reader could understand - csv and console are just sample outputs
-Yprofile is already running between the phases so could gather/trigger info from other JMH measures

I am not sure if you are looking to interrogate JMH based measures during a compile, or have JMH running the compile and have statistics and profile data added to the JMH report. JMH is not well suited to the latter I think, but I am not aware of what other measures we would look to gather

@mkeskells
Copy link

its would be good to be able to direct that statistics output to file via the command line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants