Extract data from -Yprofile during benchmark · Issue #43 · scala/compiler-benchmark · GitHub
Skip to content

Extract data from -Yprofile during benchmark #43

Open

Description

@retronym

@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.

Activity

  1. self-assigned this
    on Dec 19, 2017
  2. retronym commented on Dec 19, 2017

    @retronym
    MemberAuthor

    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

  3. mkeskells commented on Dec 19, 2017

    @mkeskells

    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

  4. mkeskells commented on Dec 19, 2017

    @mkeskells

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions