Skip to content

Commit 4ce74c8

Browse files
committed
easy config to run benchmarks with igv dump
1 parent 0629b84 commit 4ce74c8

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ protected List<String> preprocessArguments(List<String> givenArgs, Map<String, S
200200
case "-dump":
201201
if (wantsExperimental) {
202202
subprocessArgs.add("Dgraal.Dump=");
203+
subprocessArgs.add("Dgraal.TraceTruffleCompilation=true");
204+
subprocessArgs.add("Dgraal.TraceTruffleInlining=true");
205+
subprocessArgs.add("Dgraal.TraceTruffleTransferToInterpreter=true");
206+
subprocessArgs.add("Dgraal.TruffleBackgroundCompilation=false");
203207
inputArgs.remove("-dump");
204208
} else {
205209
unrecognized.add(arg);

mx.graalpython/mx_graalpython.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from mx_gate import Task
4343
from mx_graalpython_bench_param import PATH_MESO, BENCHMARKS
4444
from mx_graalpython_benchmark import PythonBenchmarkSuite, python_vm_registry, CPythonVm, PyPyVm, GraalPythonVm, \
45-
CONFIGURATION_DEFAULT, CONFIG_EXPERIMENTAL_SPLITTING, CONFIGURATION_SANDBOXED, CONFIGURATION_NATIVE
45+
CONFIGURATION_DEFAULT, CONFIG_EXPERIMENTAL_SPLITTING, CONFIGURATION_SANDBOXED, CONFIGURATION_NATIVE, CONFIGURATION_DUMP
4646

4747
SUITE = mx.suite('graalpython')
4848
SUITE_COMPILER = mx.suite("compiler", fatalIfMissing=False)
@@ -1000,6 +1000,9 @@ def _register_vms(namespace):
10001000
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_NATIVE, extra_polyglot_args=[
10011001
"--llvm.sandboxed=false"
10021002
]), SUITE, 10)
1003+
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_DUMP, extra_polyglot_args=[
1004+
"--experimental-options", "-dump"
1005+
]), SUITE, 10)
10031006

10041007

10051008
def _register_bench_suites(namespace):

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
CONFIGURATION_NATIVE = "native"
5959
CONFIG_EXPERIMENTAL_SPLITTING = "experimental_splitting"
6060
CONFIGURATION_SANDBOXED = "sandboxed"
61+
CONFIGURATION_DUMP = "dump"
6162

6263
DEFAULT_ITERATIONS = 10
6364

@@ -311,7 +312,7 @@ def rules(self, output, benchmarks, bm_suite_args):
311312
]
312313

313314
def runAndReturnStdOut(self, benchmarks, bmSuiteArgs):
314-
# host-vm rewrite rules
315+
# host-vm rewrite rules
315316
ret_code, out, dims = super(PythonBenchmarkSuite, self).runAndReturnStdOut(benchmarks, bmSuiteArgs)
316317

317318
def _replace_host_vm(key):

0 commit comments

Comments
 (0)