mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Update CPU profiling using perf
parent
94d28d9a64
commit
3ab22d5d13
@ -15,14 +15,14 @@ sudo dnf install perf flamegraph
|
||||
|
||||
Replace calls to `inferno` with `flamegraph.pl` if necessary.
|
||||
|
||||
1. *Optional* Enable profiling without `root` access:
|
||||
2. *Optional* Enable profiling without `root` access:
|
||||
|
||||
```sh
|
||||
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
|
||||
echo 0 | sudo tee /proc/sys/kernel/nmi_watchdog
|
||||
```
|
||||
|
||||
1. Ensure you have compiled `named` with debug symbols. Optionally, set up a prefix
|
||||
3. Ensure you have compiled `named` with debug symbols. Optionally, set up a prefix
|
||||
|
||||
```sh
|
||||
cd ~/Path/to/bind9/checkout
|
||||
@ -30,13 +30,13 @@ cd ~/Path/to/bind9/checkout
|
||||
make clean && make
|
||||
```
|
||||
|
||||
2. Install `named`. Normally `libtool` runs `named` through a wrapper shell script that can make perf results more difficult to read.
|
||||
4. Install `named`. Normally `libtool` runs `named` through a wrapper shell script that can make perf results more difficult to read.
|
||||
|
||||
```sh
|
||||
make install
|
||||
```
|
||||
|
||||
3. Run `named` under `perf`.
|
||||
5. Run `named` under `perf`.
|
||||
```sh
|
||||
perf record --compression-level=1 --user-callchains -g --call-graph=dwarf,65528 -e cycles:ppp --output=$OUTPUT_FILE -- $YOUR_NAMED_CMDLINE_GOES_HERE
|
||||
```
|
||||
@ -54,7 +54,7 @@ perf record --compression-level=1 --user-callchains -g --call-graph=dwarf,65528
|
||||
|
||||
`--output=$OUTPUT_FILE` Name of the output file. Otherwise it defaults to perf.data.
|
||||
|
||||
4. Generate a flamegraph with `inferno`:
|
||||
6. Generate a flamegraph with `inferno`:
|
||||
|
||||
```sh
|
||||
perf script --input=$INPUT_DATA | inferno-collapse-perf | inferno-flamegraph --width=1920 > $OUTPUT_SVG
|
||||
|
Loading…
x
Reference in New Issue
Block a user