[llvm] Add initial support for SPE brstack format (PR #129231)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 02:15:40 PDT 2025


================
@@ -1560,10 +1585,17 @@ std::error_code DataAggregator::parseBranchEvents() {
     if (NumSamples && NumSamplesNoLBR == NumSamples) {
       // Note: we don't know if perf2bolt is being used to parse memory samples
       // at this point. In this case, it is OK to parse zero LBRs.
-      errs() << "PERF2BOLT-WARNING: all recorded samples for this binary lack "
-                "LBR. Record profile with perf record -j any or run perf2bolt "
-                "in no-LBR mode with -nl (the performance improvement in -nl "
-                "mode may be limited)\n";
+      if (!opts::ArmSPE)
+        errs()
+            << "PERF2BOLT-WARNING: all recorded samples for this binary lack "
----------------
paschalis-mpeis wrote:

When a user is on an older Linux/perf version, they may get zero samples.

Could you amend this message to note that too? Please also indicate which Linux version is required for support [1].

In those cases running `perf script -F pid,brstack --itrace=bl` only returns:
```
PID
1234
1234
1234
```

In other words, the brstack field is missing, in a silent failure.


---

[1] @Leo-Yan confirms that his brstack work landed on Linux Kernel v6.14. Thanks Leo! 

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


More information about the llvm-commits mailing list