[llvm] [Bolt] Add a new hidden option to perf2bolt for testing purpose (PR #163785)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 08:39:31 PST 2025


================
@@ -115,6 +115,12 @@ cl::opt<std::string>
                             "perf-script output in a textual format"),
                    cl::ReallyHidden, cl::init(""), cl::cat(AggregatorCategory));
 
+cl::opt<bool>
+    ReadPerfScript("perfscript",
+                   cl::desc("skip perf and read perf-script trace created by "
+                            "Linux perf tool with script command"),
+                   cl::ReallyHidden, cl::cat(AggregatorCategory));
----------------
paschalis-mpeis wrote:

```suggestion
                   cl::Hidden, cl::cat(AggregatorCategory));
```

I believe we could make the new flag just `Hidden` instead, so it can appear with the below?

```
 perf2bolt --help-list-hidden
```

The old flag (`ReadPerfEvents`) was never really used from the CLI, only in a single unit test (PerfSpeEvents), since it was never fully implemented.

We could replace it and drop the old flag, given that we hardcode the parsing buffer to the values used by the relevant unit test? We could do a follow-up patch on this.

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


More information about the llvm-commits mailing list