Skip to content

Commit

Permalink
[GR-49960] Adapt to renaming Graal options prefix to jdk.graal.
Browse files Browse the repository at this point in the history
PullRequest: mx/1707
  • Loading branch information
dougxc committed Nov 11, 2023
2 parents 054b0ef + a7bb1f3 commit da3cc66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19247,7 +19247,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.1.0") # mx fetch-jdk --skip-digest-check
version = VersionSpec("7.1.1") # GR-49960 put Graal options under jdk.graal prefix

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down
16 changes: 8 additions & 8 deletions src/mx/_impl/mx_proftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ def profrecord(args):
if options.with_bb_info:
if is_native_image or not vm_has_bb_dumping(options.command[0]):
mx.abort('The given vm does not allow dumpling of basic block information!')
vm_extra_args = [f'-Dgraal.DumpPath={files.create_dump_dir()}', '-Dgraal.PrintBBInfo=true']
vm_extra_args = [f'-Djdk.graal.DumpPath={files.create_dump_dir()}', '-Djdk.graal.PrintBBInfo=true']

if is_native_image:
full_cmd = build_capture_args(files, options=options, is_native_image=True)[0] + options.command
Expand Down Expand Up @@ -1671,11 +1671,11 @@ def profrecord(args):
top = assembly.top_methods(include=lambda x: not x.generated and x.total_period > 0)[:options.limit]
dump_path = files.create_dump_dir()
method_filter = ','.join([x.methods[0].method_filter_format() for x in top])
dump_arguments = [f'-Dgraal.Dump=:{options.dump_level}',
'-Dgraal.MethodFilter=' + method_filter,
'-Dgraal.DumpPath=' + dump_path]
dump_arguments = [f'-Djdk.graal.Dump=:{options.dump_level}',
'-Djdk.graal.MethodFilter=' + method_filter,
'-Djdk.graal.DumpPath=' + dump_path]
if options.with_bb_info:
dump_arguments.append('-Dgraal.PrintBBInfo=true')
dump_arguments.append('-Djdk.graal.PrintBBInfo=true')

# rerun the program with the new options capturing the dump in the experiment directory.
# This overwrites the original profile information with a new profile that might be different
Expand Down Expand Up @@ -1742,7 +1742,7 @@ def build_capture_args(files, extra_vm_args=None, options=None, is_native_image=
else:
jvmti_asm_file = files.get_jvmti_asm_filename()
vm_args = [f'-agentpath:{find_jvmti_asm_agent()}={jvmti_asm_file}', '-XX:+UnlockDiagnosticVMOptions',
'-XX:+DebugNonSafepoints', '-Dgraal.TrackNodeSourcePosition=true', '-XX:+LogCompilation',
'-XX:+DebugNonSafepoints', '-Djdk.graal.TrackNodeSourcePosition=true', '-XX:+LogCompilation',
f'-XX:LogFile={files.get_log_compilation_filename()}']
if extra_vm_args:
vm_args += extra_vm_args
Expand Down Expand Up @@ -2018,8 +2018,8 @@ def additional_options(self, dump_path):
files.create_native_image_tag()
perf_cmd, vm_args = build_capture_args(files, is_native_image=True)
else:
extra_vm_args = ["-Dgraal.PrintBBInfo=true",
f"-Dgraal.DumpPath={files.create_dump_dir()}"] if self.with_bb_info else None
extra_vm_args = ["-Djdk.graal.PrintBBInfo=true",
f"-Djdk.graal.DumpPath={files.create_dump_dir()}"] if self.with_bb_info else None
perf_cmd, vm_args = build_capture_args(files, extra_vm_args=extra_vm_args)

# reset the next item name since it has just been consumed
Expand Down
4 changes: 2 additions & 2 deletions src/mx/_impl/mx_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,12 @@ def _run_vm(vmArgs, mainClass, mainClassArgs):
For example:
mx unittest -Dgraal.Dump= -Dgraal.MethodFilter=BC_aload -Dgraal.PrintCFG=true BC_aload
mx unittest -Djdk.graal.Dump= -Djdk.graal.MethodFilter=BC_aload -Djdk.graal.PrintCFG=true BC_aload
will run all JUnit test classes that contain 'BC_aload' in their
fully qualified name and will pass these options to the VM:
-Dgraal.Dump= -Dgraal.MethodFilter=BC_aload -Dgraal.PrintCFG=true
-Djdk.graal.Dump= -Djdk.graal.MethodFilter=BC_aload -Djdk.graal.PrintCFG=true
To get around command line length limitations on some OSes, the
JUnit class names to be executed are written to a file that a
Expand Down

0 comments on commit da3cc66

Please sign in to comment.