Skip to content

Commit b3a2cec

Browse files
committed
[GR-62802] Stop using -UseJVMCICompiler in jt test compiler clone-uninitialized-checks
PullRequest: truffleruby/4494
2 parents 48a0a62 + 65c9a47 commit b3a2cec

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

test/truffle/compiler/clone-uninitialized-checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ source test/truffle/common.sh.inc
55
export TRUFFLERUBY_CHECK_PREINITIALIZED_SPEC=false
66

77
# --always-clone-all covers more than just --core-always-clone, but is much slower (6 min vs 1 min)
8-
JT_SPECS_COMPILATION=false JT_SPECS_SPLITTING=true jt test fast -- --experimental-options --core-always-clone --check-clone-uninitialized-correctness
8+
jt test fast -- --experimental-options --engine.Compilation=false --core-always-clone --check-clone-uninitialized-correctness

tool/jt.rb

Lines changed: 20 additions & 15 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\./
@@ -1787,7 +1790,9 @@ def mspec(*args)
17871790
vm_args, ruby_args, parsed_options = ruby_options({}, ['--ea', *ruby_args])
17881791

17891792
if !JT_SPECS_COMPILATION && truffleruby_compiler? && truffleruby_jvm?
1790-
vm_args << '--vm.XX:-UseJVMCICompiler' << '--experimental-options' << '--engine.Compilation=false'
1793+
# Note: GR-62802: --vm.XX:-UseJVMCICompiler does not work for unchained standalones or needs --vm.Dpolyglotimpl.DisableVersionChecks=true
1794+
vm_args << '--vm.XX:-UseJVMCICompiler'
1795+
vm_args << '--experimental-options' << '--engine.Compilation=false'
17911796
vm_args << '--engine.Splitting=false' unless JT_SPECS_SPLITTING
17921797
end
17931798

@@ -2323,19 +2328,19 @@ def graph(*args)
23232328
"--engine.CompileOnly=#{method}",
23242329
'--engine.MultiTier=false',
23252330
'--compiler.NodeSourcePositions',
2326-
'--vm.Djdk.graal.PrintGraphWithSchedule=true',
2327-
*('--vm.Djdk.graal.PrintBackendCFG=true' if cfg2asm),
2328-
'--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",
23292334
'--log.file=/dev/stderr', # suppress the Truffle log output help message
23302335
]
23312336

23322337
# As per https://github.com/Shopify/seafoam/blob/master/docs/getting-graphs.md
23332338
# GR-36849: needs #truffleruby_native_built? instead of #truffleruby_native?
23342339
simplify_vm_args = [
2335-
*('--vm.Djdk.graal.PartialUnroll=false' unless truffleruby_native_built?),
2336-
*('--vm.Djdk.graal.LoopPeeling=false' unless truffleruby_native_built?),
2337-
*('--vm.Djdk.graal.LoopUnswitch=false' unless truffleruby_native_built?),
2338-
'--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",
23392344
]
23402345

23412346
base_vm_args += simplify_vm_args if simplify

0 commit comments

Comments
 (0)