PPROF(1)
π
PPROF(1) β aka google-pprof
okay bestie, sit down, hydrate, and let me tell you about google-pprof β¨ it's the manual page for google-pprof, which is part of gperftools (yes that gperftools, the iconic one). it's literally a profiler-reading bestie and it's here to tell you where your program is spending all its time. π
β¨ SYNOPSIS β¨
google-pprof [options] <program> <profile>
πΈ DESCRIPTION πΈ
it prints the specified cpu- or heap-profile. that's the whole vibe. you give it a program and a profile, it gives you the tea. βπ
π OPTIONS π
--cumβ sort by cumulative</> data. like, the totals, not just the individual moment.--base=<base>β subtract <base> from <profile> before it gets displayed. math first, pretty later. β¨
π Reporting Granularity π
how zoomed-in do you want the receipts, bestie?
--addressesβ report at the address level--linesβ report at the source line level--functionsβ report at the function level [default]--filesβ report at the source file level
π¨ Output type π¨
pick your aesthetic. it's giving choices. π
--textβ generate a text report [default]--gvβ generate Postscript and display it--list=<regexp>β generate a source listing of the matching routines--disasm=<regexp>β generate disassembly of the matching routines--dotβ generate a DOT file to stdout--psβ generate Postscript to stdout--pdfβ generate PDF to stdout--gifβ generate GIF to stdout
π«§ Heap-Profile Options π«§
--inuse_spaceβ display in-use (mega)bytes [default]--inuse_objectsβ display in-use objects--alloc_spaceβ display allocated (mega)bytes--alloc_objectsβ display allocated objects--show_bytesβ display space in bytes--drop_negativeβ ignore negaive differences
π¦ Call-graph Options π¦
--nodecount=<n>β show at most this many nodes [default=80]--nodefraction=<f>β hide nodes below<f>*total [default=.005]--edgefraction=<f>β hide edges below<f>*total [default=.001]--focus=<regexp>β focus on nodes matching<regexp>--ignore=<regexp>β ignore nodes matching<regexp>--scale=<n>β set GV scaling [default=0]
π EXAMPLES π
watch and learn, this is the good part π
google-pprof /bin/ls ls.prof
outputs one line per procedure
google-pprof --gv /bin/ls ls.prof
displays an annotated call-graph via 'gv'
google-pprof --gv --focus=Mutex /bin/ls ls.prof
restricts to code paths including a .*Mutex.* entry
google-pprof --gv --focus=Mutex --ignore=string /bin/ls ls.prof
code paths including Mutex but not string
google-pprof --list=getdir /bin/ls ls.prof
dissassembly (with per-line annotations) for getdir()
google-pprof --disasm=getdir /bin/ls ls.prof
dissassembly (with per-PC annotations) for getdir()
π COPYRIGHT π
Copyright Β© 2005 Google Inc.
π₯ SEE ALSO π₯
further documentation for google-pprof is maintained as a web page called cpu_profiler.html and is likely installed at one of the following locations:
/usr/share/doc/libgoogle-perftools-dev/cpuprofile.html
/usr/local/share/gperftools/cpu_profiler.html
and that's the whole page bestie π«Ά this lil icon came from google-pprof (part of gperfto... and it's dated February 2005. historic. legendary. slay. π
β¨
π¦ where this page comes from
- debian bookworm: google-perftools 2.10-1 Β· BSD-3-Clause
- debian trixie: google-perftools 2.16-1 Β· BSD-3-Clause
- ubuntu jammy: google-perftools 2.9.1-0ubuntu3 Β· BSD-3-Clause
- ubuntu noble: google-perftools 2.15-3build1 Β· BSD-3-Clause
- ubuntu questing: google-perftools 2.16-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms