sprof
linux
Read and display shared object profiling data. Note: Requires profile data generated via the `$LD_PROFILE` environment variable.
More info →Options (3)
-p, --flat-profilebooleanGenerate a flat profile with counts and ticks
Example:
sprof {{[-p|--flat-profile]}} {{path/to/library.so}} {{path/to/library.so.profile}}-q, --graphbooleanGenerate a call graph
Example:
sprof {{[-q|--graph]}} {{path/to/library.so}} {{path/to/library.so.profile}}-c, --call-pairsbooleanPrint call pairs and their usage counts
Example:
sprof {{[-c|--call-pairs]}} {{path/to/library.so}} {{path/to/library.so.profile}}Examples (5)
Generate a flat profile and call graph (default output)
sprof path/to/library.so path/to/library.so.profileGenerate a flat profile with counts and ticks
sprof [-p|--flat-profile] path/to/library.so path/to/library.so.profileGenerate a call graph
sprof [-q|--graph] path/to/library.so path/to/library.so.profilePrint call pairs and their usage counts
sprof [-c|--call-pairs] path/to/library.so path/to/library.so.profileUse profile data from current directory (auto-detected by soname)
sprof path/to/library.somade by @shridhargupta | data from tldr-pages