File: README.pgo.md

package info (click to toggle)
libvpx 1.15.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,004 kB
  • sloc: ansic: 252,377; cpp: 115,241; asm: 22,233; sh: 5,289; python: 4,391; perl: 2,010; makefile: 431
file content (24 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Using Profile Guided Optimizations to identify compiler optimization failures

When using Clang, the `-Rpass-missed` flag enables the verbose log of failed
compiler optimizations. However, the extensive log messages can obscure
potential optimization opportunities.

Use the following steps to generate a more transparent optimization report
using a previously created PGO profile file. The report also includes code
hotness diagnostics:

```bash
$ ../libvpx/configure --use-profile=perf.profdata \
  --extra-cflags="-fsave-optimization-record -fdiagnostics-show-hotness"
```

Convert the generated YAML files into a detailed HTML report using the
[optviewer2](https://github.com/OfekShilon/optview2) tool:

```bash
$ opt-viewer.py --output-dir=out/ --source-dir=libvpx .
```

The HTML report displays each code line's relative hotness, cross-referenced
with the failed compiler optimizations.