brintos

brintos / llvm-project-archived public Read only

0
0
Text · 252 B · 0fecf91 Raw
6 lines · plain
1import shutil2import subprocess3 4if shutil.which("perf") is not None and subprocess.run(["perf", "record", "-e", "cycles:u", "-o", "/dev/null", "--", "perf", "--version"], capture_output=True).returncode == 0:5    config.available_features.add("perf")6