File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -493,15 +493,16 @@ def compile_trampolines_for_all_functions():
493493
494494def _is_perf_version_at_least (major , minor ):
495495 # The output of perf --version looks like "perf version 6.7-3" but
496- # it can also be perf version "perf version 5.15.143"
496+ # it can also be perf version "perf version 5.15.143", or even include
497+ # a commit hash in the version string, like "6.12.9.g242e6068fd5c"
497498 try :
498499 output = subprocess .check_output (["perf" , "--version" ], text = True )
499500 except (subprocess .CalledProcessError , FileNotFoundError ):
500501 return False
501502 version = output .split ()[2 ]
502503 version = version .split ("-" )[0 ]
503504 version = version .split ("." )
504- version = tuple (map (int , version ))
505+ version = tuple (map (int , version [: 2 ] ))
505506 return version >= (major , minor )
506507
507508
You can’t perform that action at this time.
0 commit comments