Skip to content

Commit 65c9a47

Browse files
committed
We need to use -Dgraal and not -Djdk.graal to test unchained standalones
1 parent 7db18a5 commit 65c9a47

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

tool/jt.rb

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
LTS_JDK_VERSION = '21'
8484
DEFAULT_JDK_VERSION = 'latest'
8585

86+
# Not yet 'jdk.graal' as we test against 21 and 21 does not know 'jdk.graal'
87+
GRAAL_OPTION_PREFIX = 'graal'
88+
8689
MRI_TEST_RELATIVE_PREFIX = 'test/mri/tests'
8790
MRI_TEST_PREFIX = "#{TRUFFLERUBY_DIR}/#{MRI_TEST_RELATIVE_PREFIX}"
8891
MRI_TEST_CEXT_DIR = "#{MRI_TEST_PREFIX}/cext-c"
@@ -825,9 +828,9 @@ def help
825828
--stress stress the compiler (compile immediately, foreground compilation, compilation exceptions are fatal)
826829
--ea enable assertions
827830
--asm show assembly
828-
--igv dump select Graal graphs to graal_dumps/ (-Djdk.graal.Dump=Truffle:1)
829-
--igv-full dump all Graal graphs to graal_dumps/ (-Djdk.graal.Dump=Truffle:2,TruffleHostInlining:0)
830-
--igv-network dump to IGV directly through the network (-Djdk.graal.PrintGraph=Network)
831+
--igv dump select Graal graphs to graal_dumps/ (-D#{GRAAL_OPTION_PREFIX}.Dump=Truffle:1)
832+
--igv-full dump all Graal graphs to graal_dumps/ (-D#{GRAAL_OPTION_PREFIX}.Dump=Truffle:2,TruffleHostInlining:0)
833+
--igv-network dump to IGV directly through the network (-D#{GRAAL_OPTION_PREFIX}.PrintGraph=Network)
831834
--infopoints show source location for each node in IGV
832835
--fg disable background compilation
833836
--trace show compilation information on stdout
@@ -1071,14 +1074,14 @@ def rebuild(*options)
10711074
when '--igv', '--igv-full'
10721075
truffleruby_compiler!
10731076
if arg == '--igv-full'
1074-
vm_args << '--vm.Djdk.graal.Dump=Truffle:2,TruffleHostInlining:0,TruffleInjectImmutableFrameFields:0'
1077+
vm_args << "--vm.D#{GRAAL_OPTION_PREFIX}.Dump=Truffle:2,TruffleHostInlining:0,TruffleInjectImmutableFrameFields:0"
10751078
else
1076-
vm_args << '--vm.Djdk.graal.Dump=Truffle:1'
1079+
vm_args << "--vm.D#{GRAAL_OPTION_PREFIX}.Dump=Truffle:1"
10771080
end
1078-
vm_args << '--vm.Djdk.graal.PrintBackendCFG=false'
1081+
vm_args << "--vm.D#{GRAAL_OPTION_PREFIX}.PrintBackendCFG=false"
10791082
when '--igv-network'
10801083
truffleruby_compiler!
1081-
vm_args << '--vm.Djdk.graal.PrintGraph=Network'
1084+
vm_args << "--vm.D#{GRAAL_OPTION_PREFIX}.PrintGraph=Network"
10821085
when '--exec'
10831086
options[:use_exec] = true
10841087
when /^--vm\./
@@ -2325,19 +2328,19 @@ def graph(*args)
23252328
"--engine.CompileOnly=#{method}",
23262329
'--engine.MultiTier=false',
23272330
'--compiler.NodeSourcePositions',
2328-
'--vm.Djdk.graal.PrintGraphWithSchedule=true',
2329-
*('--vm.Djdk.graal.PrintBackendCFG=true' if cfg2asm),
2330-
'--vm.Djdk.graal.Dump=Truffle:1',
2331+
"--vm.D#{GRAAL_OPTION_PREFIX}.PrintGraphWithSchedule=true",
2332+
*("--vm.D#{GRAAL_OPTION_PREFIX}.PrintBackendCFG=true" if cfg2asm),
2333+
"--vm.D#{GRAAL_OPTION_PREFIX}.Dump=Truffle:1",
23312334
'--log.file=/dev/stderr', # suppress the Truffle log output help message
23322335
]
23332336

23342337
# As per https://github.com/Shopify/seafoam/blob/master/docs/getting-graphs.md
23352338
# GR-36849: needs #truffleruby_native_built? instead of #truffleruby_native?
23362339
simplify_vm_args = [
2337-
*('--vm.Djdk.graal.PartialUnroll=false' unless truffleruby_native_built?),
2338-
*('--vm.Djdk.graal.LoopPeeling=false' unless truffleruby_native_built?),
2339-
*('--vm.Djdk.graal.LoopUnswitch=false' unless truffleruby_native_built?),
2340-
'--vm.Djdk.graal.OptScheduleOutOfLoops=false',
2340+
*("--vm.D#{GRAAL_OPTION_PREFIX}.PartialUnroll=false" unless truffleruby_native_built?),
2341+
*("--vm.D#{GRAAL_OPTION_PREFIX}.LoopPeeling=false" unless truffleruby_native_built?),
2342+
*("--vm.D#{GRAAL_OPTION_PREFIX}.LoopUnswitch=false" unless truffleruby_native_built?),
2343+
"--vm.D#{GRAAL_OPTION_PREFIX}.OptScheduleOutOfLoops=false",
23412344
]
23422345

23432346
base_vm_args += simplify_vm_args if simplify

0 commit comments

Comments
 (0)