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

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Fri Dec 20 06:55:59 PST 2024


  Branch: refs/heads/users/paschalis-mpeis/bolt-spe-mode
  Home:   https://github.com/llvm/llvm-project
  Commit: dbd86f1b90d4cbf66240b85c885e9811aafa6cb1
      https://github.com/llvm/llvm-project/commit/dbd86f1b90d4cbf66240b85c885e9811aafa6cb1
  Author: Paschalis Mpeis <paschalis.mpeis at arm.com>
  Date:   2024-12-20 (Fri, 20 Dec 2024)

  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
```



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