LLVM-PROFGEN(1)

πŸ’… LLVM-PROFGEN(1) β€” the LLVM manual, bestie edition

okay so you found the llvm-profgen page, and honestly? iconic of you. this is the LLVM manual, and we're gonna walk through it together like it's a group chat at 2am. no cap, every flag stays, every path stays, nothing gets skipped. let's get into it 🫢


✨ NAME ✨

llvm-profgen β€” the LLVM SPGO profile generation tool. that's it, that's the whole vibe. it generates profiles. slay.


🌸 SYNOPSIS 🌸

llvm-profgen [commands] [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” the llvm-profgen utility generates a profile data file from given perf script data files, and it does this for sample-based profile guided optimization, aka SPGO. that's the entire job description. it takes your perf script data and turns it into a profile. main character energy fr fr πŸ’–


πŸŽ€ COMMANDS πŸŽ€

so here's the part where you actually have to participate: at least one of these commands is required. not zero. at least one. the tool is not gonna do your homework for you, bestie 😭

  • --perfscript=<string[,string,...]> β€” path of the perf-script trace, the one created by the Linux perf tool with the script command. heads up tho: the raw perf.data should be profiled with -b. don't forget the -b, i'm literally begging πŸ™ˆ
  • --binary=<string[,string,...]> β€” path of the input profiled binary files. plural. comma-separated. you can absolutely feed it more than one, go off πŸ‘‘
  • --output=<string> β€” path of the output profile file. this is where your beautiful little profile gets written. manifest it ✨

πŸ’… OPTIONS πŸ’…

llvm-profgen supports the following options, and yes we're covering every single one, because we do not skip. periodt.

  • --format=[text|binary|extbinary|compbinary|gcc] β€” specify the format of the generated profile. the supported <format> values are text, binary, extbinary, compbinary, and gcc. if you want the full descriptions of what each format actually means, go check llvm-profdata β€” it's got you 🫢
  • --show-mmap-events β€” print mmap events. that's it. mmap events. printed. πŸ”₯
  • --show-disassembly β€” print disassembled code. for when you wanna see the assembly, bestie, and honestly? valid.
  • --x86-asm-syntax=[att|intel] β€” specify whether to print assembly code in AT&T syntax β€” which is the default, no cap β€” or Intel syntax. so if you say nothing, you get AT&T. that's just the rules πŸ’œ

🌈 Author 🌈

Maintained by the LLVM Team (https://llvm.org/). they're the ones holding this whole thing down, we love them for it ⭐


2003-2026, LLVM Project


real talk though: remember that at least one command from COMMANDS is required, and remember -b when you profile that raw perf.data. the tool is not being mean, it just needs the info πŸ™ˆ

and that's the whole page, bestie!! LLVM, dated 2026-07-16, page 22 of the manual β€” you read it, you understood it, you ate. πŸ’…βœ¨ no crumbs. go generate some profiles πŸ‘‘πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from