mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-15 05:59:57 +00:00
Update cheatsheets
This commit is contained in:
30
tldr/linux/sprof
Normal file
30
tldr/linux/sprof
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# sprof
|
||||
|
||||
> Read and display shared object profiling data.
|
||||
> Note: Requires profile data generated via the `$LD_PROFILE` environment variable.
|
||||
> More information: <https://manned.org/sprof>.
|
||||
|
||||
- Generate a flat profile and call graph (default output):
|
||||
|
||||
`sprof {{path/to/library.so}} {{path/to/library.so.profile}}`
|
||||
|
||||
- Generate a flat profile with counts and ticks:
|
||||
|
||||
`sprof {{[-p|--flat-profile]}} {{path/to/library.so}} {{path/to/library.so.profile}}`
|
||||
|
||||
- Generate a call graph:
|
||||
|
||||
`sprof {{[-q|--graph]}} {{path/to/library.so}} {{path/to/library.so.profile}}`
|
||||
|
||||
- Print call pairs and their usage counts:
|
||||
|
||||
`sprof {{[-c|--call-pairs]}} {{path/to/library.so}} {{path/to/library.so.profile}}`
|
||||
|
||||
- Use profile data from current directory (auto-detected by soname):
|
||||
|
||||
`sprof {{path/to/library.so}}`
|
||||
Reference in New Issue
Block a user