xref: /llvm-project/llvm/docs/CommandGuide/llvm-profgen.rst (revision 1f05b1a9f527e19fb1d7cf17689c41b7951af056)
1a94fa862Swleillvm-profgen - LLVM SPGO profile generation tool
2d8ffb1f6SMarek Kurdej================================================
3a94fa862Swlei
4a94fa862Swlei.. program:: llvm-profgen
5a94fa862Swlei
6a94fa862SwleiSYNOPSIS
7a94fa862Swlei--------
8a94fa862Swlei
9a94fa862Swlei:program:`llvm-profgen` [*commands*] [*options*]
10a94fa862Swlei
11a94fa862SwleiDESCRIPTION
12a94fa862Swlei-----------
13a94fa862Swlei
14a94fa862SwleiThe :program:`llvm-profgen` utility generates a profile data file
15a94fa862Swleifrom given perf script data files for sample-based profile guided
16a94fa862Swleioptimization(SPGO).
17a94fa862Swlei
18a94fa862SwleiCOMMANDS
19a94fa862Swlei--------
20a94fa862SwleiAt least one of the following commands are required:
21a94fa862Swlei
22a94fa862Swlei.. option:: --perfscript=<string[,string,...]>
23a94fa862Swlei
24a94fa862Swlei  Path of perf-script trace created by Linux perf tool with `script`
25a94fa862Swlei  command(the raw perf.data should be profiled with -b).
26a94fa862Swlei
2732221694Swlei.. option:: --binary=<string[,string,...]>
2832221694Swlei
2932221694Swlei  Path of the input profiled binary files.
3032221694Swlei
31a94fa862Swlei.. option:: --output=<string>
32a94fa862Swlei
33a94fa862Swlei  Path of the output profile file.
34a94fa862Swlei
35a94fa862SwleiOPTIONS
36a94fa862Swlei-------
37a94fa862Swlei:program:`llvm-profgen` supports the following options:
38a94fa862Swlei
39*1f05b1a9Swlei.. option:: --format=[text|binary|extbinary|compbinary|gcc]
40*1f05b1a9Swlei
41*1f05b1a9Swlei  Specify the format of the generated profile. Supported <format>  are `text`,
42*1f05b1a9Swlei  `binary`, `extbinary`, `compbinary`, `gcc`, see `llvm-profdata` for more
43*1f05b1a9Swlei  descriptions of the format.
44*1f05b1a9Swlei
45a94fa862Swlei.. option:: --show-mmap-events
46a94fa862Swlei
47a94fa862Swlei  Print mmap events.
4832221694Swlei
4932221694Swlei.. option:: --show-disassembly
5032221694Swlei
5132221694Swlei  Print disassembled code.
5232221694Swlei
5332221694Swlei.. option:: --x86-asm-syntax=[att|intel]
5432221694Swlei
5532221694Swlei  Specify whether to print assembly code in AT&T syntax (the default) or Intel
5632221694Swlei  syntax.
57