8292681: Add JMH for ProtectionDomain#9950
8292681: Add JMH for ProtectionDomain#9950ericcaspole wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back ecaspole! A progress list of the required criteria for merging this PR into |
|
@ericcaspole The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
| @Warmup(iterations = 15) | ||
| @Measurement(iterations = 15) |
There was a problem hiding this comment.
Given the recent work to reduce microbenchmark runtimes, does this actually need this many iterations and time to get a stable microbenchmark?
There was a problem hiding this comment.
You are right, I changed it back to throughput mode and 5/2. Also the main work is in the Setup and it can be done per Trial, not per Iteration.
| return new String("public class B" + count + " {" | ||
| + " static int intField;" | ||
| + " public static void compiledMethod() { " | ||
| + " intField++;" | ||
| + " }" | ||
| + "}"); |
There was a problem hiding this comment.
Curious why copying to new String? Is this to try to avoid string deduplication? Could it be simplified?
| return new String("public class B" + count + " {" | |
| + " static int intField;" | |
| + " public static void compiledMethod() { " | |
| + " intField++;" | |
| + " }" | |
| + "}"); | |
| return "public class B" + count + " {" | |
| + " static int intField;" | |
| + " public static void compiledMethod() { " | |
| + " intField++;" | |
| + " }" | |
| + "}"; |
|
|
||
| for (int i = 0; i < numberOfClasses; i++) { | ||
| classNames[i] = "B" + i; | ||
| compiledClasses[i] = InMemoryJavaCompiler.compile(classNames[i], B(i)); |
There was a problem hiding this comment.
Is it possible to use the existing jdk.test.lib.compiler.InMemoryJavaCompiler class instead of writing a new one?
There was a problem hiding this comment.
It needs to be added into the benchmarks.jar, and there are already 2 copies of it in different test suites so it seems like this is how it's done.
|
@ericcaspole 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 132 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. ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
Going to push as commit 5d6779f.
Your commit was automatically rebased without conflicts. |
|
@ericcaspole Pushed as commit 5d6779f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Add a JMH for ProtectionDomain related to current work on JDK-8292375. Also, add the InMemoryJavaCompiler to the JMH jar, to generate the classes needed for this test and will be useful for future class loading JMH too.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9950/head:pull/9950$ git checkout pull/9950Update a local copy of the PR:
$ git checkout pull/9950$ git pull https://git.openjdk.org/jdk pull/9950/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9950View PR using the GUI difftool:
$ git pr show -t 9950Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9950.diff