-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Filter out configuration file from compile commands #131099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-clang Author: Konrad Kleine (kwk) ChangesThe commands to run the compilation when printed with
Full diff: https://github.com/llvm/llvm-project/pull/131099.diff 1 Files Affected:
diff --git a/clang/utils/perf-training/perf-helper.py b/clang/utils/perf-training/perf-helper.py
index 80c6356d0497c..29904aded5ab0 100644
--- a/clang/utils/perf-training/perf-helper.py
+++ b/clang/utils/perf-training/perf-helper.py
@@ -237,6 +237,7 @@ def get_cc1_command_for_args(cmd, env):
or ln.startswith("InstalledDir:")
or ln.startswith("LLVM Profile Note")
or ln.startswith(" (in-process)")
+ or ln.startswith("Configuration file:")
or " version " in ln
):
continue
|
The commands to run the compilation when printed with `-###` contain various irrelevant lines for the perf-training. Most of them are filtered out already but when configured with `CLANG_CONFIG_FILE_SYSTEM_DIR` a new line like the following is added and needs to be filtered out: `Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg`
db5d475 to
e43271e
Compare
|
@aaupov ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the filtering of verbosity in compile commands by excluding configuration file paths output when using CLANG_CONFIG_FILE_SYSTEM_DIR.
- Added a new filter condition to ignore lines starting with "Configuration file:"
- Updates the filtering logic in the perf-helper.py script to reduce irrelevant output
| or ln.startswith("InstalledDir:") | ||
| or ln.startswith("LLVM Profile Note") | ||
| or ln.startswith(" (in-process)") | ||
| or ln.startswith("Configuration file:") |
Copilot
AI
Jun 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider consolidating similar filter conditions into a configurable array or list to simplify future modifications and improve readability.
The commands to run the compilation when printed with `-###` contain various irrelevant lines for the perf-training. Most of them are filtered out already but when configured with `CLANG_CONFIG_FILE_SYSTEM_DIR` a new line like the following is added and needs to be filtered out: `Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg`
The commands to run the compilation when printed with
-###containvarious irrelevant lines for the perf-training. Most of them are
filtered out already but when configured with
CLANG_CONFIG_FILE_SYSTEM_DIRa new line like the following isadded and needs to be filtered out:
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg