OS Manuals

/usr/bin/llvm-profgen

Low-level virtual machine 23 - core frameworks

From llvm-23 23.1.5-r0 (os), captured 2026-11-05 by running llvm-profgen --help (exit 0). permalink

OVERVIEW: llvm SPGO profile generator

USAGE: llvm-profgen [options]

OPTIONS:

Color Options:

  --color                                         - Use colors in output (default=autodetect)

Generic Options:

  --help                                          - Display available options (--help-hidden for more)
  --help-list                                     - Display list of available options (--help-list-hidden for more)
  --version                                       - Display the version of this program

ProfGen Options:

  --binary=<binary>                               - Path of profiled executable binary.
  --csprof-max-cold-context-depth=<uint>          - Keep the last K contexts while merging cold profile. 1 means the context-less base profile
  --csprof-max-context-depth=<int>                - Keep the last K contexts while merging profile. -1 means no depth limit.
  --csprof-max-unsymbolized-context-depth=<int>   - Keep the last K contexts while merging unsymbolized profile. -1 means no depth limit.
  --csprof-merge-cold-context                     - If the total count of context profile is smaller than the threshold, it will be merged into context-less base profile.
  --data-access-perftrace=<data-access-perftrace> - File path of a Linux perf raw trace (generated by `perf report -D`) consisting of memory access events.
  --debug-binary=<debug-binary>                   - Path of debug info binary, llvm-profgen will load the DWARF info from it instead of the executable binary.
  --disassemble-functions=<string>                - List of functions to print disassembly for. Accept demangled names only. Only work with show-disassembly-only
  --dwp=<string>                                  - Path of .dwp file. When not specified, it will be <binary>.dwp in the same directory as the main binary.
  --etm=<etm>                                     - Path of raw ETM trace file
  --etm-trace-id=<uint>                           - CoreSight Trace ID (CSID) used to route ETM trace data.
  --format=<value>                                - Format of output profile
    =binary                                       -   Binary encoding (default)
    =extbinary                                    -   Extensible binary encoding
    =text                                         -   Text encoding
    =gcc                                          -   GCC encoding (only meaningful for -sample)
  --ignore-stack-samples                          - Ignore call stack samples for hybrid samples and produce context-insensitive profile.
  --infer-missing-frames                          - Infer missing call frames due to compiler tail call elimination.
  --kernel                                        - Generate the profile for Linux kernel binary.
  --llvm-sample-profile=<llvm sample profile>     - Path of the LLVM sample profile. Cannot be used with--perfscript, --perfdata, or --unsymbolized-profile
  --load-function-from-symbol                     - Gather additional binary function info from symbols (e.g. symtab) in case dwarf info is incomplete.
  --max-search-depth=<uint>                       - The maximum levels the DFS-based missing frame search should go with
  --output=<output>                               - Output profile file
  --perfdata=<perfdata>                           - Path of raw perf data created by Linux perf tool (it should be profiled with -b). Cannot be used with --perfscript, --unsymbolized-profile, or --llvm-sample-profile.
  --perfscript=<perfscript>                       - Path of perf-script trace created by Linux perf tool with `script` command(the raw perf.data should be profiled with -b). Cannot be used with --perfdata, --unsymbolized-profile, or --llvm-sample-profile.
  --pid=<process Id>                              - Process Id for the profiled executable binary.
  --profile-density-cutoff-hot=<int>              - Total samples cutoff for functions used to calculate profile density.
  --profile-density-threshold=<number>            - If the profile density is below the given threshold, it will be suggested to increase the sampling rate.
  --show-canonical-fname                          - Print canonical function name.
  --show-density                                  - show profile density details
  --show-detailed-warning                         - Show detailed warning message.
  --show-disassembly-only                         - Print disassembled code.
  --show-mmap-events                              - Print binary load events.
  --show-pseudo-probe                             - Print pseudo probe section and disassembled info.
  --show-source-locations                         - Print source locations.
  --skip-symbolization                            - Dump the unsymbolized profile to the output file. It will show unwinder output for CS profile generation.
  --target-triple=<triple>                        - Override the target triple for the binary
  --time-profgen                                  - Time llvm-profgen phases
  --trim-cold-profile                             - If the total count of the profile is smaller than threshold, it will be trimmed.
  --unsymbolized-profile=<unsymbolized profile>   - Path of the unsymbolized profile created by `llvm-profgen` with `--skip-symbolization`. Cannot be used with --perfscript, --perfdata, or --llvm-sample-profile.
  --update-total-samples                          - Update total samples by accumulating all its body samples.
  --use-dwarf-correlation                         - Use dwarf for profile correlation even when binary contains pseudo probe.
  --use-first-loadable-segment-as-base            - Use first loadable segment address as base address for offsets in unsymbolized profile. By default first executable segment address is used
  --use-offset                                    - Work with `--skip-symbolization` or `--unsymbolized-profile` to write/read the offset instead of virtual address.
Options (43)
OptionDescriptionSource
--color- Use colors in output (default=autodetect)help
--help- Display available options (--help-hidden for more)help
--help-list- Display list of available options (--help-list-hidden for more)help
--version- Display the version of this programhelp
--binary binary- Path of profiled executable binary.help
--csprof-max-cold-context-depth uint- Keep the last K contexts while merging cold profile.help
--csprof-max-context-depth int- Keep the last K contexts while merging profile.help
--csprof-max-unsymbolized-context-depth int- Keep the last K contexts while merging unsymbolized profile.help
--csprof-merge-cold-context- If the total count of context profile is smaller than the threshold, it will be merged into context-less base profile.help
--debug-binary debug-binary- Path of debug info binary, llvm-profgen will load the DWARF info from it instead of the executable binary.help
--disassemble-functions string- List of functions to print disassembly for.help
--dwp string- Path of .dwp file.help
--etm etm- Path of raw ETM trace filehelp
--etm-trace-id uint- CoreSight Trace ID (CSID) used to route ETM trace data.help
--format value- Format of output profile =binary - Binary encoding (default) =extbinary - Extensible binary encoding =text - Text encoding =gcc - GCC encoding (only meaningful for -sample)help
--ignore-stack-samples- Ignore call stack samples for hybrid samples and produce context-insensitive profile.help
--infer-missing-frames- Infer missing call frames due to compiler tail call elimination.help
--kernel- Generate the profile for Linux kernel binary.help
--llvm-sample-profile llvm- Path of the LLVM sample profile.help
--load-function-from-symbol- Gather additional binary function info from symbols (e.g. symtab) in case dwarf info is incomplete.help
--max-search-depth uint- The maximum levels the DFS-based missing frame search should go withhelp
--output output- Output profile filehelp
--perfdata perfdata- Path of raw perf data created by Linux perf tool (it should be profiled with -b).help
--perfscript perfscript- Path of perf-script trace created by Linux perf tool with `script` command(the raw perf.data should be profiled with -b).help
--pid process- Process Id for the profiled executable binary.help
--profile-density-cutoff-hot int- Total samples cutoff for functions used to calculate profile density.help
--profile-density-threshold number- If the profile density is below the given threshold, it will be suggested to increase the sampling rate.help
--show-canonical-fname- Print canonical function name.help
--show-density- show profile density detailshelp
--show-detailed-warning- Show detailed warning message.help
--show-disassembly-only- Print disassembled code.help
--show-mmap-events- Print binary load events.help
--show-pseudo-probe- Print pseudo probe section and disassembled info.help
--show-source-locations- Print source locations.help
--skip-symbolization- Dump the unsymbolized profile to the output file.help
--target-triple triple- Override the target triple for the binaryhelp
--time-profgen- Time llvm-profgen phaseshelp
--trim-cold-profile- If the total count of the profile is smaller than threshold, it will be trimmed.help
--unsymbolized-profile unsymbolized- Path of the unsymbolized profile created by `llvm-profgen` with `--skip-symbolization`.help
--update-total-samples- Update total samples by accumulating all its body samples.help
--use-dwarf-correlation- Use dwarf for profile correlation even when binary contains pseudo probe.help
--use-first-loadable-segment-as-base- Use first loadable segment address as base address for offsets in unsymbolized profile.help
--use-offset- Work with `--skip-symbolization` or `--unsymbolized-profile` to write/read the offset instead of virtual address.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.