-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
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... ```
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. |
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. |
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? |
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 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. |
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 |
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. |
Only tested with JMH 1.8.
The following changesets touched
ProfilerInterface
since JMH 1.3.1: