File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -275,18 +275,21 @@ def libpythonvm_build_args():
275
275
if not os .environ .get ("GRAALPY_PGO_PROFILE" ) and mx .suite ('graalpython-enterprise' , fatalIfMissing = False ):
276
276
cmd = mx .command_function ('python-get-latest-profile' , fatalIfMissing = False )
277
277
if cmd :
278
+ profile = None
278
279
try :
279
280
profile = cmd ([])
280
281
except BaseException :
281
- mx . log ( f"Not using any PGO profile" )
282
- else :
282
+ pass
283
+ if profile and os . path . exists ( profile ) :
283
284
mx .log (f"Using PGO profile { profile } " )
284
285
build_args += [
285
286
f"--pgo={ profile } " ,
286
287
"-H:+UnlockExperimentalVMOptions" ,
287
288
"-H:+PGOPrintProfileQuality" ,
288
289
"-H:-UnlockExperimentalVMOptions" ,
289
290
]
291
+ else :
292
+ mx .log (f"Not using any PGO profile" )
290
293
return build_args
291
294
292
295
@@ -296,8 +299,6 @@ def graalpy_native_pgo_build_and_test(_):
296
299
then builds a PGO-optimized GraalPy native standalone with the collected profile.
297
300
The profile file will be named 'default.iprof' in native image build directory.
298
301
"""
299
- import tempfile
300
-
301
302
with set_env (GRAALPY_PGO_PROFILE = "" ):
302
303
mx .log (mx .colorize ("[PGO] Building PGO-instrumented native image" , color = "yellow" ))
303
304
build_home = graalpy_standalone_home ('native' , enterprise = True , build = True )
You can’t perform that action at this time.
0 commit comments