Skip to content

Commit 3c7f0c3

Browse files
committed
[GR-53988] Remove legacy benchmarks.
PullRequest: graal/17684
2 parents 3af9381 + db2bcab commit 3c7f0c3

File tree

26 files changed

+1989
-3313
lines changed

26 files changed

+1989
-3313
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Directory | Description
2727
[`.github/`](.github/) | Configuration files for GitHub issues, workflows, ….
2828
[`compiler/`](compiler/) | [Graal compiler][reference-compiler], a modern, versatile compiler written in Java.
2929
[`espresso/`](espresso/) | [Espresso][java-on-truffle], a meta-circular Java bytecode interpreter for the GraalVM.
30-
[`java-benchmarks/`](java-benchmarks/) | Java benchmarks.
3130
[`regex/`](regex/) | TRegex, a regular expression engine for other GraalVM languages.
3231
[`sdk/`](sdk/) | [GraalVM SDK][graalvm-sdk], long-term supported APIs of GraalVM.
3332
[`substratevm/`](substratevm/) | Framework for ahead-of-time (AOT) compilation with [Native Image][native-image].

compiler/ci/ci_common/benchmark-builders.jsonnet

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
c.daily + hw.e3 + jdk + cc.libgraal + bench.microservice_benchmarks,
2323
c.weekly + hw.e3 + jdk + cc.libgraal + bench.micros_graal_whitebox,
2424
c.weekly + hw.e3 + jdk + cc.libgraal + bench.micros_graal_dist,
25-
c.weekly + hw.e3 + jdk + cc.libgraal + bench.micros_misc_graal_dist,
26-
c.weekly + hw.e3 + jdk + cc.libgraal + bench.micros_shootout_graal_dist,
2725
]
2826
for jdk in cc.product_jdks
2927
]),

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
groups:: {
1111
open_suites:: unique_suites([$.awfy, $.dacapo, $.scala_dacapo, $.renaissance]),
1212
spec_suites:: unique_suites([$.specjvm2008, $.specjbb2015]),
13-
jmh_micros_suites:: unique_suites([$.micros_graal_dist, $.micros_misc_graal_dist , $.micros_shootout_graal_dist]),
13+
jmh_micros_suites:: unique_suites([$.micros_graal_dist]),
1414
graal_internals_suites:: unique_suites([$.micros_graal_whitebox]),
1515
special_suites:: unique_suites([$.dacapo_size_variants, $.scala_dacapo_size_variants]),
1616
microservice_suites:: unique_suites([$.microservice_benchmarks]),
@@ -203,25 +203,5 @@
203203
timelimit: "5:00:00",
204204
min_jdk_version:: 8,
205205
max_jdk_version:: null
206-
},
207-
208-
micros_misc_graal_dist: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
209-
suite:: "micros-misc-graal-dist",
210-
run+: [
211-
self.benchmark_cmd + ["jmh-dist:GRAAL_BENCH_MISC", "--"] + self.extra_vm_args
212-
],
213-
timelimit: "3:00:00",
214-
min_jdk_version:: 8,
215-
max_jdk_version:: null
216-
},
217-
218-
micros_shootout_graal_dist: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
219-
suite:: "micros-shootout-graal-dist",
220-
run+: [
221-
self.benchmark_cmd + ["jmh-dist:GRAAL_BENCH_SHOOTOUT", "--"] + self.extra_vm_args
222-
],
223-
timelimit: "3:00:00",
224-
min_jdk_version:: 8,
225-
max_jdk_version:: null
226206
}
227207
}

compiler/mx.compiler/mx_compiler.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
import mx
4141
import mx_truffle
4242
import mx_sdk_vm
43+
from mx_sdk_benchmark import JVMCI_JDK_TAG, DaCapoBenchmarkSuite, ScalaDaCapoBenchmarkSuite, RenaissanceBenchmarkSuite
44+
import mx_graal_benchmark #pylint: disable=unused-import
4345

4446
import mx_gate
4547
from mx_gate import Task
@@ -59,10 +61,6 @@
5961

6062
_suite = mx.suite('compiler')
6163

62-
if 'java-benchmarks' in (s.name for s in _suite.suite_imports):
63-
# allows removing the static import of `java-benchmarks` from source code bundles
64-
import mx_java_benchmarks
65-
import mx_graal_benchmark #pylint: disable=unused-import
6664

6765
""" Prefix for running the VM. """
6866
_vm_prefix = None
@@ -572,7 +570,7 @@ def compiler_gate_benchmark_runner(tasks, extraVMarguments=None, prefix='', task
572570
bmSuiteArgs = ["--jvm", "server"]
573571
benchVmArgs = bmSuiteArgs + _remove_empty_entries(extraVMarguments)
574572

575-
dacapo_suite = mx_java_benchmarks.DaCapoBenchmarkSuite()
573+
dacapo_suite = DaCapoBenchmarkSuite()
576574
dacapo_gate_iterations = {
577575
k: default_iterations for k, v in dacapo_suite.daCapoIterations().items() if v > 0
578576
}
@@ -610,7 +608,7 @@ def compiler_gate_benchmark_runner(tasks, extraVMarguments=None, prefix='', task
610608

611609
# run Scala DaCapo benchmarks #
612610
###############################
613-
scala_dacapo_suite = mx_java_benchmarks.ScalaDaCapoBenchmarkSuite()
611+
scala_dacapo_suite = ScalaDaCapoBenchmarkSuite()
614612
scala_dacapo_gate_iterations = {
615613
k: default_iterations for k, v in scala_dacapo_suite.daCapoIterations().items() if v > 0
616614
}
@@ -635,7 +633,7 @@ def compiler_gate_benchmark_runner(tasks, extraVMarguments=None, prefix='', task
635633

636634
# run Renaissance benchmarks #
637635
###############################
638-
renaissance_suite = mx_java_benchmarks.RenaissanceBenchmarkSuite()
636+
renaissance_suite = RenaissanceBenchmarkSuite()
639637
renaissance_gate_iterations = {
640638
k: default_iterations for k, v in renaissance_suite.renaissanceIterations().items() if v > 0
641639
}
@@ -1135,14 +1133,13 @@ def run_java(args, out=None, err=None, addDefaultArgs=True, command_mapper_hooks
11351133
if metrics_file:
11361134
collate_metrics([metrics_file])
11371135

1138-
_JVMCI_JDK_TAG = 'jvmci'
11391136

11401137
class GraalJVMCIJDKConfig(mx.JDKConfig):
11411138
"""
11421139
A JDKConfig that configures Graal as the JVMCI compiler.
11431140
"""
11441141
def __init__(self):
1145-
mx.JDKConfig.__init__(self, jdk.home, tag=_JVMCI_JDK_TAG)
1142+
mx.JDKConfig.__init__(self, jdk.home, tag=JVMCI_JDK_TAG)
11461143

11471144
def run_java(self, args, **kwArgs):
11481145
return run_java(args, **kwArgs)
@@ -1553,7 +1550,7 @@ def profdiff(args):
15531550
mx.add_argument('--no-jacoco-exclude-truffle', action='store_false', dest='jacoco_exclude_truffle', help="Don't exclude Truffle classes from jacoco annotations.")
15541551

15551552
def mx_post_parse_cmd_line(opts):
1556-
mx.addJDKFactory(_JVMCI_JDK_TAG, jdk.javaCompliance, GraalJDKFactory())
1553+
mx.addJDKFactory(JVMCI_JDK_TAG, jdk.javaCompliance, GraalJDKFactory())
15571554
mx.add_ide_envvar('JVMCI_VERSION_CHECK')
15581555
for dist in _suite.dists:
15591556
if hasattr(dist, 'set_archiveparticipant'):

compiler/mx.compiler/mx_graal_benchmark.py

Lines changed: 3 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -31,95 +31,12 @@
3131
import mx
3232
import mx_benchmark
3333
import mx_sdk_benchmark
34-
import mx_compiler
35-
from mx_java_benchmarks import DaCapoBenchmarkSuite, ScalaDaCapoBenchmarkSuite
3634
from mx_benchmark import DataPoints
37-
from mx_sdk_benchmark import SUCCESSFUL_STAGE_PATTERNS, Stage
35+
from mx_sdk_benchmark import DaCapoBenchmarkSuite, ScalaDaCapoBenchmarkSuite
36+
from mx_sdk_benchmark import JvmciJdkVm, SUCCESSFUL_STAGE_PATTERNS, Stage
3837

3938
_suite = mx.suite('compiler')
4039

41-
class JvmciJdkVm(mx_benchmark.OutputCapturingJavaVm):
42-
def __init__(self, raw_name, raw_config_name, extra_args):
43-
super(JvmciJdkVm, self).__init__()
44-
self.raw_name = raw_name
45-
self.raw_config_name = raw_config_name
46-
self.extra_args = extra_args
47-
48-
def name(self):
49-
return self.raw_name
50-
51-
def config_name(self):
52-
return self.raw_config_name
53-
54-
def post_process_command_line_args(self, args):
55-
return [arg if not callable(arg) else arg() for arg in self.extra_args] + args
56-
57-
def get_jdk(self):
58-
tag = mx.get_jdk_option().tag
59-
if tag and tag != mx_compiler._JVMCI_JDK_TAG:
60-
mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
61-
self.name(), self.config_name(), mx_compiler._JVMCI_JDK_TAG))
62-
return mx.get_jdk(tag=mx_compiler._JVMCI_JDK_TAG)
63-
64-
def run_java(self, args, out=None, err=None, cwd=None, nonZeroIsFatal=False):
65-
return self.get_jdk().run_java(
66-
args, out=out, err=out, cwd=cwd, nonZeroIsFatal=nonZeroIsFatal, command_mapper_hooks=self.command_mapper_hooks)
67-
68-
def generate_java_command(self, args):
69-
return self.get_jdk().generate_java_command(self.post_process_command_line_args(args))
70-
71-
def rules(self, output, benchmarks, bmSuiteArgs):
72-
rules = super(JvmciJdkVm, self).rules(output, benchmarks, bmSuiteArgs)
73-
return rules
74-
75-
76-
def add_or_replace_arg(option_key, value, vm_option_list):
77-
"""
78-
Determines if an option with the same key as option_key is already present in vm_option_list.
79-
If so, it replaces the option value with the given one. If not, it appends the option
80-
to the end of the list. It then returns the modified list.
81-
82-
For example, if arg_list contains the argument '-Djdk.graal.CompilerConfig=community', and this function
83-
is called with an option_key of '-Djdk.graal.CompilerConfig' and a value of 'economy', the resulting
84-
argument list will contain one instance of '-Djdk.graal.CompilerConfig=economy'.
85-
"""
86-
arg_string = option_key + '=' + value
87-
idx = next((idx for idx, arg in enumerate(vm_option_list) if arg.startswith(option_key)), -1)
88-
if idx == -1:
89-
vm_option_list.append(arg_string)
90-
else:
91-
vm_option_list[idx] = arg_string
92-
return vm_option_list
93-
94-
def build_jvmci_vm_variants(raw_name, raw_config_name, extra_args, variants, include_default=True, suite=None, priority=0, hosted=True):
95-
prefixes = [('', ['-XX:+UseJVMCICompiler'])]
96-
if hosted:
97-
prefixes.append(('hosted-', ['-XX:-UseJVMCICompiler']))
98-
for prefix, args in prefixes:
99-
extended_raw_config_name = prefix + raw_config_name
100-
extended_extra_args = extra_args + args
101-
if include_default:
102-
mx_benchmark.add_java_vm(
103-
JvmciJdkVm(raw_name, extended_raw_config_name, extended_extra_args), suite, priority)
104-
for variant in variants:
105-
compiler_config = None
106-
if len(variant) == 2:
107-
var_name, var_args = variant
108-
var_priority = priority
109-
elif len(variant) == 3:
110-
var_name, var_args, var_priority = variant
111-
elif len(variant) == 4:
112-
var_name, var_args, var_priority, compiler_config = variant
113-
else:
114-
raise TypeError("unexpected tuple size for jvmci variant {} (size must be <= 4)".format(variant))
115-
116-
variant_args = extended_extra_args + var_args
117-
if compiler_config is not None:
118-
variant_args = add_or_replace_arg('-Djdk.graal.CompilerConfiguration', compiler_config, variant_args)
119-
120-
mx_benchmark.add_java_vm(
121-
JvmciJdkVm(raw_name, extended_raw_config_name + '-' + var_name, variant_args), suite, var_priority)
122-
12340

12441
_graal_variants = [
12542
('no-tiered-comp', ['-XX:-TieredCompilation'], 0),
@@ -143,7 +60,7 @@ def build_jvmci_vm_variants(raw_name, raw_config_name, extra_args, variants, inc
14360
('avx2', ['-XX:UseAVX=2'], 11),
14461
('avx3', ['-XX:UseAVX=3'], 11),
14562
]
146-
build_jvmci_vm_variants('server', 'graal-core', ['-server', '-XX:+EnableJVMCI', '-Djdk.graal.CompilerConfiguration=community', '-Djvmci.Compiler=graal'], _graal_variants, suite=_suite, priority=15)
63+
mx_sdk_benchmark.build_jvmci_vm_variants('server', 'graal-core', ['-server', '-XX:+EnableJVMCI', '-Djdk.graal.CompilerConfiguration=community', '-Djvmci.Compiler=graal'], _graal_variants, suite=_suite, priority=15)
14764

14865
# On 64 bit systems -client is not supported. Nevertheless, when running with -server, we can
14966
# force the VM to just compile code with C1 but not with C2 by adding option -XX:TieredStopAtLevel=1.

compiler/mx.compiler/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"subdir": True
3131
},
3232
{
33-
"name" : "java-benchmarks",
34-
"subdir": True,
33+
"name" : "sdk",
34+
"subdir": True
3535
}
3636
]
3737
},

espresso/ci/ci_common/common.jsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ local benchmark_suites = ['dacapo', 'renaissance', 'scala-dacapo'];
6565
"<graal>/tools/**",
6666
"<graal>/regex/**",
6767
"<graal>/sulong/**",
68-
"<graal>/java-benchmarks/**",
6968
] + base.basic_guard_includes + (if with_compiler then [
7069
"<graal>/common.json",
7170
"<graal>/compiler/**",

espresso/mx.espresso/mx_espresso_benchmarks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import mx_espresso
2929

3030
from mx_benchmark import GuestVm, JavaVm
31-
from mx_java_benchmarks import ScalaDaCapoBenchmarkSuite
32-
from mx_java_benchmarks import _daCapoScalaConfig
31+
from mx_sdk_benchmark import ScalaDaCapoBenchmarkSuite
32+
from mx_sdk_benchmark import _daCapoScalaConfig
3333

3434

3535
_suite = mx.suite('espresso')

espresso/mx.espresso/suite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"subdir": True,
7676
},
7777
{
78-
"name" : "java-benchmarks",
78+
"name" : "sdk",
7979
"subdir": True,
8080
},
8181
],
@@ -319,7 +319,7 @@
319319
"subDir": "src",
320320
"sourceDirs": ["src"],
321321
"dependencies": [
322-
"java-benchmarks:DACAPO_SCALA",
322+
"sdk:DACAPO_SCALA",
323323
],
324324
"javaCompliance": "8+",
325325
"checkstyle": "com.oracle.truffle.espresso",
@@ -656,7 +656,7 @@
656656
"subDir": "src",
657657
"dependencies": [
658658
"com.oracle.truffle.espresso.dacapo",
659-
"java-benchmarks:DACAPO_SCALA",
659+
"sdk:DACAPO_SCALA",
660660
],
661661
"testDistribution": True,
662662
"manifestEntries" : {

java-benchmarks/java/org.graalvm.bench.console/src/bench/console/HelloWorld.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)