You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/bolt/_index.md
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,16 @@ minutes_to_complete: 30
5
5
6
6
who_is_this_for: This is an introductory topic for software developers who want to learn how to use BOLT on an Arm executable.
7
7
8
-
learning_objectives:
9
-
- Build an application which is ready to be optimized by BOLT
8
+
learning_objectives:
9
+
- Build an application which is ready to be optimized by BOLT
10
10
- Profile an application and collect performance information
11
-
- Run BOLT to create an optimized executable
11
+
- Run BOLT to create an optimized executable
12
12
13
13
prerequisites:
14
-
- An Arm based system running Linux with [BOLT](/install-guides/bolt/) and [Linux Perf](/install-guides/perf/) installed. The Linux kernel should be version 5.15 or later. Earlier kernel versions can be used, but some Linux Perf features may be limited or not available.
14
+
- An Arm based system running Linux with [BOLT](/install-guides/bolt/) and [Linux Perf](/install-guides/perf/) installed. The Linux kernel should be version 5.15 or later. Earlier kernel versions can be used, but some Linux Perf features may be limited or not available. For [SPE](./bolt-spe) the version should be 6.14 or later.
15
15
- (Optional) A second, more powerful Linux system to build the software executable and run BOLT.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/bolt/bolt-spe.md
+36-25Lines changed: 36 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,60 +1,66 @@
1
1
---
2
-
title: Using BOLT with SPE
2
+
title: Use BOLT with SPE
3
3
weight: 6
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
9
## BOLT with SPE
10
+
The steps to use BOLT with Perf SPE are listed below.
10
11
11
-
The steps to optimize an executable with BOLT using Perf SPE is below.
12
+
### Collect Perf data with SPE
12
13
13
-
### Collect Perf data with SPE
14
+
First, make sure you are using Linux Perf version v6.14 or later, which supports the 'brstack' field and captures all branch information.
14
15
15
-
Run your executable in the normal use case and collect a SPE performance profile. This will output a `perf.data` file containing the profile and will be used to optimize the executable.
16
+
```bash { output_lines = "2" }
17
+
perf --version
18
+
perf version 6.14
19
+
```
20
+
21
+
Next, run your executable in the normal use case to collect an SPE performance profile. This generates a `perf.data` file containing the profile, which will be used to optimize the executable.
16
22
17
-
Record samples while running your application. Substitute the actual name of your application for `executable`:
23
+
Record samples while running your application, replacing `executable` below:
18
24
19
25
```bash { target="ubuntu:latest" }
20
-
perf record -e arm_spe/branch_filter=1/u -o perf.data-- ./executable
26
+
perf record -e 'arm_spe/branch_filter=1/u' -o perf.data-- ./executable
21
27
```
28
+
Once the execution is complete, perf will print a summary that includes the size of the `perf.data` file:
22
29
23
-
Perf prints the size of the `perf.data` file:
24
-
25
-
```output
30
+
```bash { target="ubuntu:latest" }
26
31
[ perf record: Woken up 79 times to write data ]
27
32
[ perf record: Captured and wrote 4.910 MB perf.data ]
28
33
```
29
34
30
-
### Convert the Profile into BOLT format
35
+
The `-jitter=1` flag can help avoid resonance, while `-c`/`--count` controls the sampling period.
31
36
32
-
`perf2bolt` converts the profile into a BOLT data format. For the given sample data, `perf2bolt` finds all instruction pointers in the profile, maps them back to the assembly instructions, and outputs a count of how many times each assembly instruction was sampled.
37
+
### Convert the Profile to BOLT format
33
38
34
-
If you application is named `executable`, run the commend below to convert the profile data:
39
+
`perf2bolt` converts the profile into BOLT's data format. It maps branch events from the profile to assembly instructions and outputs branch execution traces with sample counts.
40
+
41
+
If you application is named `executable`, run the command below to convert the profile data:
0 commit comments