jeprof - analyze and print jemalloc's heap profile dumps
jeprof can be used to parse, analyze and generate user-readable
output from jemalloc's memory profile dumps. Refer to jemalloc(3) or
the jemalloc website <http://jemalloc.net/> about jemalloc and the
opt.prof option.
jeprof is based on pprof(1) that is developed as part of
the <https://github.com/gperftools/gperftools> gperftools package.
Common usage:
- jeprof
[options] <program> <profiles>
- Interactive mode. <profiles> is a space separated list of
profile names.
- jeprof
[options] <symbolized-profiles>
- <symbolized-profiles> is a list of profile files where each
file contains the necessary symbol mappings as well as profile data
(likely generated with --raw).
- jeprof
[options] <profile>
- <profile> is a remote form. Each name can be:
- /path/to/profile
- a path to a profile file
- host:port[/<service]>
- a location of a service to get the profile from.
/<service> can be /pprof/heap, /pprof/profile,
/pprof/pmuprofile, /pprof/growth, /pprof/contention, /pprof/wall,
/pprof/censusprofile, or /pprof/filteredprofile.
For instance:
jeprof http://myserver.example.com:80/pprof/heap
If /<service> is omitted, the service defaults to
/pprof/profile (CPU profiling).
- jeprof
--symbols program
- Maps addresses to symbol names. In this mode, stdin should be a list of
library mappings, in the same format as is found in the heap- and
CPU-profile files (this loosely matches that of /proc/self/maps on Linux),
followed by a list of hex addresses to map, one per line.
- --cum
- Sort by cumulative data.
- --base=base
- Subtract <base> from <profile> before display.
- --interactive
- Run in interactive mode. (interactive "help" gives help)
[default]
- --seconds=n
- Length of time for dynamic profiles. [default=30 secs]
- --add_lib=file
- Read additional symbols and line info from the given library.
- --lib_prefix=dir
- Comma separated list of library path prefixes.
- --text
- Generate text report.
- --callgrind
- Generate callgrind format to stdout.
- --gv
- Generate Postscript and display.
- --evince
- Generate PDF and display.
- --web
- Generate SVG and display.
- --list=regexp
- Generate source listing of matching routines.
- --disasm=regexp
- Generate disassembly of matching routines.
- --symbols
- Print demangled symbol names found at given addresses.
- --dot
- Generate DOT file to stdout.
- --ps
- Generate PostScript to stdout.
- --pdf
- Generate PDF to stdout.
- --svg
- Generate SVG to stdout.
- --gif
- Generate GIF to stdout.
- --raw
- Generate symbolized jeprof data (useful with remote fetch).
The following environment variables affect the execution of
jeprof:
- JEPROF_TMPDIR
- Profiles directory. Defaults to $HOME/jeprof.
- JEPROF_TOOLS
- Prefix for object tools pathnames.