[clang] [perf-training][merge-fdata] Clean up input fdata files (PR #139650)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 12 17:57:44 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Amir Ayupov (aaupov)

<details>
<summary>Changes</summary>

BOLT AArch64 worker has been running out of disk space due to excessive
fdata files being produced from clang-bolt builder. Delete merged fdata
files to counter disk space waste.

Test Plan: TBD


---
Full diff: https://github.com/llvm/llvm-project/pull/139650.diff


1 Files Affected:

- (modified) clang/utils/perf-training/perf-helper.py (+5-3) 


``````````diff
diff --git a/clang/utils/perf-training/perf-helper.py b/clang/utils/perf-training/perf-helper.py
index 80c6356d0497c..b3698111e4917 100644
--- a/clang/utils/perf-training/perf-helper.py
+++ b/clang/utils/perf-training/perf-helper.py
@@ -65,9 +65,11 @@ def merge_fdata(args):
             + "\tMerges all fdata files from path into output."
         )
         return 1
-    cmd = [args[0], "-o", args[1]]
-    cmd.extend(findFilesWithExtension(args[2], "fdata"))
-    subprocess.check_call(cmd)
+    inputs = findFilesWithExtension(args[2], "fdata")
+    subprocess.check_call([args[0], inputs, "-o", args[1]])
+    # Remove input fdata files to save space.
+    for filename in inputs:
+        os.remove(filename)
     return 0
 
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/139650


More information about the cfe-commits mailing list