Import pprof from google-perftools, svn r91.

Fix divide-by-zero error in pprof.  It is possible for sample contexts
to currently have no associated objects, but the cumulative statistics
are still useful, depending on how the user invokes pprof.  Since
jemalloc intentionally does not filter such contexts, take care not to
divide by 0 when re-scaling for v2 heap sampling.

Install pprof as part of 'make install'.

Update pprof documentation.
This commit is contained in:
Jason Evans 2010-04-02 13:50:53 -07:00
parent 18ad8234b6
commit a91f210929
4 changed files with 4358 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
/jemalloc/autom4te.cache/ /jemalloc/autom4te.cache/
/jemalloc/bin/
/jemalloc/cfghdrs.stamp /jemalloc/cfghdrs.stamp
/jemalloc/cfgoutputs.stamp /jemalloc/cfgoutputs.stamp
/jemalloc/config.log /jemalloc/config.log

View File

@ -12,6 +12,7 @@ CC := @CC@
# Configuration parameters. # Configuration parameters.
DESTDIR = DESTDIR =
BINDIR := $(DESTDIR)@BINDIR@
INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@ INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
LIBDIR := $(DESTDIR)@LIBDIR@ LIBDIR := $(DESTDIR)@LIBDIR@
MANDIR := $(DESTDIR)@MANDIR@ MANDIR := $(DESTDIR)@MANDIR@
@ -33,6 +34,7 @@ endif
REV := 0 REV := 0
# Lists of files. # Lists of files.
BINS := @srcroot@bin/pprof
CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \ CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
@objroot@include/jemalloc/jemalloc_defs@install_suffix@.h @objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/base.c \ CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/base.c \
@ -67,6 +69,13 @@ $(DSOS): $(CSRCS:@srcroot@%.c=@objroot@%.o)
ln -sf libjemalloc@install_suffix@.so.$(REV) lib/libjemalloc@install_suffix@.so ln -sf libjemalloc@install_suffix@.so.$(REV) lib/libjemalloc@install_suffix@.so
ar crus @objroot@lib/libjemalloc@install_suffix@_pic.a $+ ar crus @objroot@lib/libjemalloc@install_suffix@_pic.a $+
install_bin:
install -d $(BINDIR)
@for b in $(BINS); do \
echo "install -m 755 $$b $(BINDIR)"; \
install -m 755 $$b $(BINDIR); \
done
install_include: install_include:
install -d $(INCLUDEDIR)/jemalloc install -d $(INCLUDEDIR)/jemalloc
@for h in $(CHDRS); do \ @for h in $(CHDRS); do \
@ -87,7 +96,7 @@ install_man:
install -m 644 $$m $(MANDIR)/man3; \ install -m 644 $$m $(MANDIR)/man3; \
done done
install: install_include install_lib install_man install: install_bin install_include install_lib install_man
check: check:

4346
jemalloc/bin/pprof Executable file

File diff suppressed because it is too large Load Diff

View File

@ -376,8 +376,8 @@ will disable dirty page purging.
@roff_prof@option for information on interval-triggered profile dumping, and the @roff_prof@option for information on interval-triggered profile dumping, and the
@roff_prof@.Dq U @roff_prof@.Dq U
@roff_prof@option for information on high-water-triggered profile dumping. @roff_prof@option for information on high-water-triggered profile dumping.
@roff_prof@Profile output is compatible with the pprof Perl script, which is @roff_prof@Profile output is compatible with the included pprof Perl script,
@roff_prof@part of the google-perftools package @roff_prof@which originates from the google-perftools package
@roff_prof@(http://code.google.com/p/google-perftools/). @roff_prof@(http://code.google.com/p/google-perftools/).
@roff_tcache@.It G @roff_tcache@.It G
@roff_tcache@Double/halve the approximate interval (counted in terms of @roff_tcache@Double/halve the approximate interval (counted in terms of