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

Adapt to SPI changes in JMH #4

Merged
merged 1 commit into from
Apr 13, 2015
Merged

Conversation

retronym
Copy link
Contributor

Only tested with JMH 1.8.

The following changesets touched ProfilerInterface since JMH 1.3.1:

1160:ea66b1770352e0f5b44f09f1fbe23775dfb087a5   20/03/15 01:54  shade   7901346: Profilers should be able to know the actual warmup/measurement durations
1125:61fd51cdd7ebac4de48bbe718563a279afabf4bb   13/02/15 06:15  shade   7901293: Windows/xperf support in perfasm...

Only tested with JMH 1.8.

The following changesets touched `ProfilerInterface` since JMH 1.3.1:

```
1160:ea66b1770352e0f5b44f09f1fbe23775dfb087a5	20/03/15 01:54	shade	7901346: Profilers should be able to know the actual warmup/measurement durations
1125:61fd51cdd7ebac4de48bbe718563a279afabf4bb	13/02/15 06:15	shade	7901293: Windows/xperf support in perfasm...
```
@retronym
Copy link
Contributor Author

Hi @biboudis. Not sure if jhm-profilers is active or was just a proof of concept. Hoping it is the former; as such I've updated to JMH 1.8.

biboudis added a commit that referenced this pull request Apr 13, 2015
Adapt to SPI changes in JMH.
@biboudis biboudis merged commit b776591 into biboudis:master Apr 13, 2015
@biboudis
Copy link
Owner

Thank you @retronym!! Yes, it is active. Please let me know if you want to add some additional profiler that cannot be contributed directly to JMH.

@biboudis
Copy link
Owner

BTW @retronym, I have used it with sbt-jmh a while back. It isn't something sophisticated, rather than a proof that it worked with sbt-jmh + sbt (+ the UnlockCommercialFeatures is you are eligible to do so).

https://github.com/biboudis/scala-streams/blob/master/build.sbt

Do you want me to release a new version at the maven central?

@retronym
Copy link
Contributor Author

Yes, that would be great. I'm not super familiar with JMH internals, and just made the changes by responding to the type errors, so you might want to give it a sanity check first.

But for now, I've just copied the profiler's source into that project so I can experiment. So I'm not blocked waiting for a new release.

Here's my build that incorporates JFR: https://github.com/retronym/scala-jmh-suite. I found I had to propagate -XX:Unlock... to forked run tasks. Maybe sbt-jmh has changed since you used it.

I'm still experimenting with what is possible / sensible with using JMH for scalac benchmarking. Looking forward to seeing how the professionals do this once https://bugs.openjdk.java.net/browse/JDK-8050952 (JEP 230: Microbenchmark Suite) is made public.

I was thinking it might be interesting to stop flight recorder when in JMH infrastructure code, and only record during execution of the code-under-test. But I couldn't figure out how to do this with the internal APIs of JFR.

It might also be handy to interrogate the flight recording data programmatically, e.g. to display the top 10 hot methods without needing to open JMC.

@retronym
Copy link
Contributor Author

BTW, if you are interested in helping out with helping to measure and improve scalac performance, let me know. I'm collecting notes on methodology/tools https://gist.github.com/retronym/86ec6ad9ccd2c22f6148 and candidate patches https://github.com/scala/scala/compare/2.11.x...retronym:topic/opt-rawinfo?expand=1

@biboudis
Copy link
Owner

The new version is up, https://oss.sonatype.org/content/repositories/releases/com/github/biboudis/jmh-profilers/ but still hasn't appeared in central. 😢

Yes, the Microbenchmark Suite will be an amazing addition and it is great that you will be working on the corresponding one for scalac.

I will take a look at your optimization ideas section. It seems very interesting.

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

Successfully merging this pull request may close these issues.

2 participants