[all-commits] [llvm/llvm-project] 4c68b9: [BOLT][AArch64] Introduce SPE mode in BasicAggrega...

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Thu Feb 27 05:05:50 PST 2025


  Branch: refs/heads/users/paschalis-mpeis/bolt-spe-mode
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c68b93dc29533877a25eb56f892500dd23de5ce
      https://github.com/llvm/llvm-project/commit/4c68b93dc29533877a25eb56f892500dd23de5ce
  Author: Paschalis Mpeis <paschalis.mpeis at arm.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M bolt/include/bolt/Profile/DataAggregator.h
    M bolt/lib/Profile/DataAggregator.cpp
    A bolt/test/perf2bolt/AArch64/perf2bolt-spe.test
    A bolt/test/perf2bolt/X86/perf2bolt-spe.test
    M bolt/tools/driver/llvm-bolt.cpp
    M bolt/unittests/Profile/CMakeLists.txt
    A bolt/unittests/Profile/PerfSpeEvents.cpp

  Log Message:
  -----------
  [BOLT][AArch64] Introduce SPE mode in BasicAggregation

BOLT gains the ability to process branch target information generated by
Arm SPE data, using the `BasicAggregation` format.

Example usage is:
```bash
perf2bolt -p perf.data -o perf.boltdata --nl --spe BINARY
```

New branch data and compatibility:
---
SPE branch entries in perf data contain a branch pair (`IP` -> `ADDR`)
for the source and destination branches. DataAggregator processes those
by creating two basic samples. Any other event types will have `ADDR`
field set to `0x0`. For those a single sample will be created. Such
events can be either SPE or non-SPE, like `l1d-access` and `cycles`
respectively.

The format of the input perf entries is:
```
PID   EVENT-TYPE   ADDR   IP
```

When on SPE mode and:
- host is not `AArch64`, BOLT will exit with a relevant message
- `ADDR` field is unavailable, BOLT will exit with a relevant message
- no branch pairs were recorded, BOLT will present a warning

Examples of generating profiling data for the SPE mode:
---
Profiles can be captured with perf on AArch64 machines with SPE enabled.
They can be combined with other events, SPE or not.

Capture only SPE branch data events:
```bash
perf record -e 'arm_spe_0/branch_filter=1/u' -- BINARY
```

Capture any SPE events:
```bash
perf record -e 'arm_spe_0//u' -- BINARY
```

Capture any SPE events and cycles
```bash
perf record -e 'arm_spe_0//u' -e cycles:u -- BINARY
```

More filters, jitter, and specify count to control overheads/quality.
```bash
perf record -e 'arm_spe_0/branch_filter=1,load_filter=0,store_filter=0,jitter=1/u' -c 10007 -- BINARY
```


  Commit: 078291179006f0d75dd2ebaf87cd3d36d61b729c
      https://github.com/llvm/llvm-project/commit/078291179006f0d75dd2ebaf87cd3d36d61b729c
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M bolt/include/bolt/Profile/DataAggregator.h

  Log Message:
  -----------
  clang-format fix


  Commit: e74d2ae7618e2868a8201abb57dfedf83fd22f2a
      https://github.com/llvm/llvm-project/commit/e74d2ae7618e2868a8201abb57dfedf83fd22f2a
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M bolt/include/bolt/Utils/CommandLineOpts.h
    M bolt/lib/Profile/DataAggregator.cpp
    M bolt/tools/driver/llvm-bolt.cpp
    M bolt/unittests/Profile/PerfSpeEvents.cpp

  Log Message:
  -----------
  Addressing reviewers (1)


  Commit: 47a986de762147c4f27a20ff9b1d75f9f5a50bdc
      https://github.com/llvm/llvm-project/commit/47a986de762147c4f27a20ff9b1d75f9f5a50bdc
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M bolt/test/perf2bolt/X86/perf2bolt-spe.test
    M bolt/tools/driver/llvm-bolt.cpp

  Log Message:
  -----------
  Addressing reviewers (2)


Compare: https://github.com/llvm/llvm-project/compare/10f721917c3c...47a986de7621

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list