mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8342958: Use jvmArgs consistently in microbenchmarks
Reviewed-by: ecaspole, jvernee
This commit is contained in:
parent
d49f21043b
commit
90bd544512
142 changed files with 202 additions and 202 deletions
|
@ -50,37 +50,37 @@ public class ObjectHashCode {
|
|||
// Experimental hashCode generation schemes. See synchronizer.cpp get_next_hash
|
||||
/*
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=0"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=0"})
|
||||
public int mode_0() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=1"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=1"})
|
||||
public int mode_1() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=2"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=2"})
|
||||
public int mode_2() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=3"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=3"})
|
||||
public int mode_3() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=4"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=4"})
|
||||
public int mode_4() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@Fork(jvmArgsPrepend = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=5"})
|
||||
@Fork(jvmArgs = {"-XX:+UnlockExperimentalVMOptions", "-XX:hashCode=5"})
|
||||
public int mode_5() {
|
||||
return System.identityHashCode(new Object());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue