LLVM-PROFGEN(1)

πŸ’– LLVM-PROFGEN πŸ’–

okay bestie, so this is the page for llvm-profgen from the LLVM manual β€” yes, that LLVM. it's a whole vibe and it's lowkey iconic, so let's get into it ✨


🌸 NAME 🌸

llvm-profgen β€” the LLVM SPGO profile generation tool. it makes profiles. that's the whole thing. slay πŸ’…


✨ SYNOPSIS ✨

llvm-profgen [commands] [options]

no cap, that's it. commands first, options after, go off 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that llvm-profgen works is: it takes perf script data files you already have, and it generates a profile data file out of them, for sample-based profile guided optimization β€” which the cool kids call SPGO. that's the entire job description, and it ate πŸ’–


πŸŽ€ COMMANDS πŸŽ€

bestie listen. you need at least one of these. it's not optional. the tool literally cannot function without one of them. periodt.
  • --perfscript=<string[,string,...]> β€” path (or paths, comma-separated) of the perf-script trace, the one Linux perf made with the script command. ⚠️ important little detail: the raw perf.data should have been profiled with -b. don't forget the -b, i'm begging 😭
  • --binary=<string[,string,...]> β€” path (or paths, comma-separated) of the input profiled binary files. the main characters of this whole operation fr fr πŸ‘‘
  • --output=<string> β€” path of the output profile file. where your hard work goes to live 🌈

πŸ‘‘ OPTIONS πŸ‘‘

llvm-profgen supports these options, and yes we're doing all of them:

  • --format=[text|binary|extbinary|compbinary|gcc] β€” picks the format of the generated profile. the supported formats are text, binary, extbinary, compbinary, and gcc β€” and if you want the full tea on what each one means, go check out llvm-profdata, it explains them. iykyk πŸ“–
  • --show-mmap-events β€” prints mmap events. that's the whole thing, she's simple and she's thriving 🌸
  • --show-disassembly β€” prints disassembled code. disassembly girlies rise πŸ™ˆ
  • --x86-asm-syntax=[att|intel] β€” picks whether the assembly code gets printed in AT&T syntax (which is the default, just so you know) or in Intel syntax. choose your fighter βš”οΈ

πŸ’œ AUTHOR πŸ’œ

maintained by the LLVM Team</> β€” their link is https://llvm.org/ and they are, frankly, carrying the entire compiler ecosystem on their backs 🫢


2003-2025, LLVM Project β€” two whole decades of this, iconic behaviour honestly πŸ‘‘


and that's the page bestie!! πŸ’– this was LLVM-PROFGEN(1) from the LLVM manual, sitting pretty at version 14, dated 2025-05-22, brought to you by the LLVM Project. go generate some profiles, you absolute legend πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from