8354257: xctracenorm profiler not working with JDK JMH benchmarks#24571
8354257: xctracenorm profiler not working with JDK JMH benchmarks#24571galderz wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back galder! A progress list of the required criteria for merging this PR into |
|
@galderz This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 444 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@magicus) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
The jmh-core jar file published in Maven central (https://repo.maven.apache.org/maven2/org/openjdk/jmh/jmh-core/1.37/jmh-core-1.37.jar), which is the one referenced from the devkit generator script, does not contain this Unfortunately, the original author of the JDK build logic for micro benchmarks isn't available atm. I don't know enough about JMH to say if this is a reasonable change. Maybe @shipilev can fill in with some knowledge? |
|
|
|
@shipilev Yes I'm using the latest JMH source code snapshot to try out xtrace profiler locally. |
|
My understanding here is that we unpack four different jars: jmh-core, jmh-generator-annprocess, jopt-simple and commons-math3. The removal of *.xml is done on the single directory where all of the jars were unpacked into, so the intended target could be xml files in any of these, not just jmh-core . |
|
With that said, it is very much unclear why this line is here at all. The removal of xml files is from the original integration of microbenchmarks, JDK-8061281, and the reason behind it is lost in time. But if this works, and does not break any existing microbenchmark tests, I don't see any problem. |
As I wrote above:
That was based on inspecting all 4 jars. I highly doubt there was anything more sinister or dangerous hidden in any of the jar files historically. These seemingly irrelevant files seem enough to have warranted this file removal to me at least. I do think it's a bug that JMH is bundling its checkstyle and findbugs configurations in its distribution jar, so perhaps we can suggest to a JMH maintainer to stop doing that. :) Regardless, the files should be benign so removing the |
I think that makes sense to me and I can try to do that. Both files could be moved to |
I've created CODETOOLS-7903998 to track this. |
magicus
left a comment
There was a problem hiding this comment.
I apparently missed to approve this. I think this fix looks sane, regardless of any upstream changes.
|
/integrate |
|
/sponsor |
|
Going to push as commit 772c970.
Your commit was automatically rebased without conflicts. |
FYI ^ is now fixed in JMH |
Avoid filtering out xml files at the root of the JMH folder, in order to get the
default.instruments.template.xmlfile bundled in the JMH core jar to support xtrace profiler.Progress
Warning
8354257: xctracenorm profiler not working with JDK JMH benchmarksIssue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24571/head:pull/24571$ git checkout pull/24571Update a local copy of the PR:
$ git checkout pull/24571$ git pull https://git.openjdk.org/jdk.git pull/24571/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24571View PR using the GUI difftool:
$ git pr show -t 24571Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24571.diff
Using Webrev
Link to Webrev Comment