Skip to content

Commit

Permalink
[GR-18411] Replace a deprecated legacy Graal option graal. with jdk.g…
Browse files Browse the repository at this point in the history
…raal. in jt.rb

PullRequest: truffleruby/4357
  • Loading branch information
andrykonchin authored and eregon committed Sep 13, 2024
2 parents 5ece463 + 71652e0 commit e1b8018
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ local part_definitions = {
"--extra-image-builder-argument=rubyvm:-H:+TruffleHostInliningPrintExplored",
"--extra-image-builder-argument=rubyvm:-H:MethodFilter=org.truffleruby.*.*",
"--extra-image-builder-argument=rubyvm:-H:-UnlockExperimentalVMOptions",
"--extra-image-builder-argument=rubyvm:-Dgraal.LogFile=host-inlining.txt",
"--extra-image-builder-argument=rubyvm:-Djdk.graal.LogFile=host-inlining.txt",
],
environment+: {
TRUFFLERUBY_HOST_INLINING_TEST: "1",
Expand Down
2 changes: 1 addition & 1 deletion mx.truffleruby/native-ee-host-inlining
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/vm-enterprise,/sulong-managed,/substratevm-enterprise,substratevm-enterprise-gcs
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,GraalVM enterprise license files,LLVM Runtime Native Enterprise,SubstrateVM Enterprise,Truffle Macro Enterprise,suite:substratevm-enterprise-gcs
NATIVE_IMAGES=lib:rubyvm
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-H:MethodFilter=org.truffleruby.*.* rubyvm:-H:-UnlockExperimentalVMOptions rubyvm:-Dgraal.LogFile=host-inlining.txt
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-H:MethodFilter=org.truffleruby.*.* rubyvm:-H:-UnlockExperimentalVMOptions rubyvm:-Djdk.graal.LogFile=host-inlining.txt
GENERATE_DEBUGINFO=false
# To also create the standalone
INSTALLABLES=TruffleRuby
Expand Down
2 changes: 1 addition & 1 deletion mx.truffleruby/native-host-inlining
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,Truffle Macro
NATIVE_IMAGES=lib:rubyvm
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-H:MethodFilter=org.truffleruby.*.* rubyvm:-H:-UnlockExperimentalVMOptions rubyvm:-Dgraal.LogFile=host-inlining.txt
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-H:MethodFilter=org.truffleruby.*.* rubyvm:-H:-UnlockExperimentalVMOptions rubyvm:-Djdk.graal.LogFile=host-inlining.txt
GENERATE_DEBUGINFO=false
# To also create the standalone
INSTALLABLES=TruffleRuby
Expand Down
2 changes: 1 addition & 1 deletion tool/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bench() {
if [[ $bench_mode == igv ]]; then
local dump_path=graal_dumps/$bench_name-$config
mkdir -p "$dump_path"
jt -u "$config" benchmark "$file" --time "$BENCH_TIME" -- --igv --vm.Dgraal.DumpPath="$dump_path"
jt -u "$config" benchmark "$file" --time "$BENCH_TIME" -- --igv --vm.Djdk.graal.DumpPath="$dump_path"
elif [[ $bench_mode == time ]]; then
jt -u "$config" benchmark "$file" --time "$BENCH_TIME" | tee /dev/tty | tail -n "$BENCH_TAIL" | \
datamash mean 1 median 1 | format_time "$bench_name-$config" >> perf.txt
Expand Down
28 changes: 14 additions & 14 deletions tool/jt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,9 @@ def help
--stress stress the compiler (compile immediately, foreground compilation, compilation exceptions are fatal)
--ea enable assertions
--asm show assembly
--igv dump select Graal graphs to graal_dumps/ (-Dgraal.Dump=Truffle:1)
--igv-full dump all Graal graphs to graal_dumps/ (-Dgraal.Dump=Truffle:2,TruffleHostInlining:0)
--igv-network dump to IGV directly through the network (-Dgraal.PrintGraph=Network)
--igv dump select Graal graphs to graal_dumps/ (-Djdk.graal.Dump=Truffle:1)
--igv-full dump all Graal graphs to graal_dumps/ (-Djdk.graal.Dump=Truffle:2,TruffleHostInlining:0)
--igv-network dump to IGV directly through the network (-Djdk.graal.PrintGraph=Network)
--infopoints show source location for each node in IGV
--fg disable background compilation
--trace show compilation information on stdout
Expand Down Expand Up @@ -1055,14 +1055,14 @@ def rebuild(*options)
when '--igv', '--igv-full'
truffleruby_compiler!
if arg == '--igv-full'
vm_args << '--vm.Dgraal.Dump=Truffle:2,TruffleHostInlining:0,TruffleInjectImmutableFrameFields:0'
vm_args << '--vm.Djdk.graal.Dump=Truffle:2,TruffleHostInlining:0,TruffleInjectImmutableFrameFields:0'
else
vm_args << '--vm.Dgraal.Dump=Truffle:1'
vm_args << '--vm.Djdk.graal.Dump=Truffle:1'
end
vm_args << '--vm.Dgraal.PrintBackendCFG=false'
vm_args << '--vm.Djdk.graal.PrintBackendCFG=false'
when '--igv-network'
truffleruby_compiler!
vm_args << '--vm.Dgraal.PrintGraph=Network'
vm_args << '--vm.Djdk.graal.PrintGraph=Network'
when '--exec'
options[:use_exec] = true
when /^--vm\./
Expand Down Expand Up @@ -2228,19 +2228,19 @@ def graph(*args)
"--engine.CompileOnly=#{method}",
'--engine.MultiTier=false',
'--compiler.NodeSourcePositions',
'--vm.Dgraal.PrintGraphWithSchedule=true',
*('--vm.Dgraal.PrintBackendCFG=true' if cfg2asm),
'--vm.Dgraal.Dump=Truffle:1',
'--vm.Djdk.graal.PrintGraphWithSchedule=true',
*('--vm.Djdk.graal.PrintBackendCFG=true' if cfg2asm),
'--vm.Djdk.graal.Dump=Truffle:1',
'--log.file=/dev/stderr', # suppress the Truffle log output help message
]

# As per https://github.com/Shopify/seafoam/blob/master/docs/getting-graphs.md
# GR-36849: needs #truffleruby_native_built? instead of #truffleruby_native?
simplify_vm_args = [
*('--vm.Dgraal.PartialUnroll=false' unless truffleruby_native_built?),
*('--vm.Dgraal.LoopPeeling=false' unless truffleruby_native_built?),
*('--vm.Dgraal.LoopUnswitch=false' unless truffleruby_native_built?),
'--vm.Dgraal.OptScheduleOutOfLoops=false',
*('--vm.Djdk.graal.PartialUnroll=false' unless truffleruby_native_built?),
*('--vm.Djdk.graal.LoopPeeling=false' unless truffleruby_native_built?),
*('--vm.Djdk.graal.LoopUnswitch=false' unless truffleruby_native_built?),
'--vm.Djdk.graal.OptScheduleOutOfLoops=false',
]

base_vm_args += simplify_vm_args if simplify
Expand Down

0 comments on commit e1b8018

Please sign in to comment.