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

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 11 02:24:02 PDT 2025


================
@@ -1565,10 +1592,20 @@ 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 "
+               "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";
+      else
+        errs()
+            << "PERF2BOLT-WARNING: all recorded samples for this binary lack "
+               "SPE brstack entries. The minimum required version of "
+               "Linux-perf is v6.14 or higher for brstack support. "
+               "With an older Linux-perf you may get zero samples. "
+               "Plese also make sure about you recorded profile with: "
+               "perf record -e 'arm_spe_0/branch_filter=1/'.";
----------------
paschalis-mpeis wrote:

nit to match the LBR message and remove a typo:

PERF2BOLT-WARNING: All recorded samples for this binary lack
SPE brstack entries. Make sure you are running Linux perf 6.14 or later, otherwise you get zero samples. Record the profile with: perf record -e 'arm_spe_0/branch_filter=1/'

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


More information about the llvm-commits mailing list