[llvm] [BOLT][Perf2bolt] Add support to generate pre-parsed perf data (PR #171144)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 06:13:36 PST 2026


================
@@ -449,6 +469,51 @@ class DataAggregator : public DataReader {
   /// an external tool.
   std::error_code parsePreAggregatedLBRSamples();
 
+  /// Dump pre-parsed perf profile data into a single file.
+  /// The generator relies on the aggregator work to spawn the required
+  /// perf-script jobs based on the the aggregation type, and merges
+  /// their results into a single file.
+  /// This hybrid profile contains all required events such as BuildID,
+  /// MMAP, TASK, MAIN (brstack or basic samples), or MEM for the aggregation.
+  /// The generator also creates a file header, where these events
+  /// are listed along with the length information of their contents.
+  /// The given length numbers in the header are in bytes, they are used
+  /// as an offset int the pre-parsed profile.
+  /// Some of these events are essential to be presented in the file.
+  /// Please see a short summary below:
+  /// MEM: Optional. Parsing memory profile is enabled by default, unless
+  /// '--itrace' aggregation is set. In the latter case MEM profile
+  /// won't be added into the pre-parsed profile. Note that, currently
+  /// mem events only supported if they were gathered on X86_64.
+  /// MMAP: Compulsory, the mmap data is required to be in the file.
+  /// BUILDID: Ignored (you should use --ignore-build-id),
+  /// if buildid information doesn't exist in the input profile.
----------------
paschalis-mpeis wrote:

nit:
```suggestion
  /// BUILDID: Ignored when buildid information doesn't exist in the input profile. In that case, must use `--ignore-build-id`.
```

(not sure if the above fully aligns to your text)

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


More information about the llvm-commits mailing list