Skip to content

Commit fb98635

Browse files
author
Andrija Kolic
committed
Explicitly fail with 'mx.abort' and a clear message in the case of the instrumented run exiting with a 0 return code but not generating the 'iprof' file.
1 parent 2e386db commit fb98635

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vm/mx.vm/mx_vm_benchmark.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,13 @@ def run_stage_instrument_run(self):
12481248
with self.get_stage_runner() as s:
12491249
exit_code = s.execute_command(self, image_run_cmd)
12501250
if exit_code == 0:
1251+
if not self.config.profile_path.exists():
1252+
# The shutdown hook does not trigger for certain apps (GR-60456)
1253+
mx.abort(
1254+
f"Profile file {self.config.profile_path} does not exist "
1255+
f"even though the instrument run terminated successfully with exit code 0. "
1256+
f"A workaround might be possible by setting the 'ProfilingDumpPeriod' runtime option."
1257+
)
12511258
print(f"Profile file {self.config.profile_path} sha1 is {mx.sha1OfFile(self.config.profile_path)}")
12521259
self._ensureSamplesAreInProfile(self.config.profile_path)
12531260
else:

0 commit comments

Comments
 (0)