Go to file
csilvers ee5805f129 Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com>
* Decrease fragmentation in tcmalloc (lefevere)
	* Support for ARM in some of the thread-specific code (markus)
	* Turn off heap-checker for statically-linked binaries, which
	  cause error leak reports now (etune)
	* Many pprof improvements, including a command-line interface (jeff)
	* CPU profiling now automatically affects all threads in linux 2.6.
	  (Kernel bugs break CPU profiling and threads in linux 2.4 a bit.)
	  ProfilerEnable() and ProfilerDisable() are deprecated.  (sanjay)
	* tcmalloc now correctly intercepts memalign (m3b, maxim)
	* Syntax fix: added missing va_end()s.  Helps non-gcc compiling (etune)
	* Fixed a few coredumper bugs: race condition after PTRACE_DETACH,
	  ignore non-aligned stackframe pointers (markus, menage)
	* 64-bit cleanup, especially for spinlock code (etune) and mmap (sanjay)
	* Better support for finding threads in linux (markus)
	* tcmalloc now tracks those stack traces that allocate memory (sanjay)
	* Work around a weird setspecific problem (sanjay)
	* Fix tcmalloc overflow problems when an alloc is close to 2G/4G (sanjay)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@15 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2007-03-22 04:44:18 +00:00
doc Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
docs Import of HTML documentation from SourceForge. 2006-12-28 22:39:33 +00:00
packages Tue May 31 08:14:38 2005 Google Inc. <opensource@google.com> 2007-03-22 03:28:56 +00:00
src Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
aclocal.m4 Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
AUTHORS Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
ChangeLog Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
compile Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
config.guess Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
config.sub Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
configure Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
configure.ac Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
COPYING Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
depcomp Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
INSTALL Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
install-sh Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
ltmain.sh Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
Makefile.am Wed Oct 26 15:19:16 2005 Google Inc. <opensource@google.com> 2007-03-22 04:44:18 +00:00
Makefile.in Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
missing Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
mkinstalldirs Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
NEWS Tue Feb 8 09:57:17 2005 El Goog <opensource@google.com> 2007-03-22 03:00:33 +00:00
README Tue May 31 08:14:38 2005 Google Inc. <opensource@google.com> 2007-03-22 03:28:56 +00:00
TODO Tue May 31 08:14:38 2005 Google Inc. <opensource@google.com> 2007-03-22 03:28:56 +00:00

CPU PROFILER
------------
See doc/cpu-profiler.html for information about how to use the CPU
profiler and analyze its output.

As a quick-start, do the following after installing this package:

1) Link your executable with -lprofiler
2) Run your executable with the CPUPROFILE environment var set:
     $ CPUPROFILE=/tmp/prof.out <path/to/binary> [binary args]
3) Run pprof to analyze the CPU usage
     $ pprof <path/to/binary> /tmp/prof.out      # -pg-like text output
     $ pprof --gv <path/to/binary> /tmp/prof.out # really cool graphical output

There are other environment variables, besides CPUPROFILE, you can set
to adjust the cpu-profiler behavior; cf "ENVIRONMENT VARIABLES" below.


TCMALLOC
--------
Just link in -ltcmalloc to get the advantages of tcmalloc.  See below
for some environment variables you can use with tcmalloc, as well.


HEAP PROFILER
-------------
See doc/heap-profiler.html for information about how to use tcmalloc's
heap profiler and analyze its output.

As a quick-start, do the following after installing this package:

1) Link your executable with -ltcmalloc
2) Run your executable with the HEAPPROFILE environment var set:
     $ HEAPROFILE=/tmp/heapprof <path/to/binary> [binary args]
3) Run pprof to analyze the heap usage
     $ pprof <path/to/binary> /tmp/heapprof.0045.heap  # run 'ls' to see options
     $ pprof --gv <path/to/binary> /tmp/heapprof.0045.heap

You can also use LD_PRELOAD to heap-profile an executable that you
didn't compile.

There are other environment variables, besides HEAPPROFILE, you can
set to adjust the heap-profiler behavior; cf "ENVIRONMENT VARIABLES"
below.


HEAP CHECKER
------------
See doc/heap-checker.html for information about how to use tcmalloc's
heap checker.

In order to catch all heap leaks, tcmalloc must be linked *last* into
your executable.  The heap checker may mischaracterize some memory
accesses in libraries listed after it on the link line.  For instance,
it may report these libraries as leaking memory when they're not.
(See the source code for more details.)

Here's a quick-start for how to use:

As a quick-start, do the following after installing this package:

1) Link your executable with -ltcmalloc
2) Run your executable with the HEAPCHECK environment var set:
     $ HEAPCHECK=1 <path/to/binary> [binary args]

Other values for HEAPCHECK: normal (equivalent to "1"), strict, draconian

You can also use LD_PRELOAD to heap-check an executable that you
didn't compile.

IMPORTANT NOTE: pthreads handling is currently incomplete.  Heap leak
checks will fail with bogus leaks if there are pthreads live at
construction or leak checking time.  One solution, for global
heap-checking, is to make sure all threads but the main thread have
exited at program-end time.  We hope (as of March 2005) to have a fix
soon.


ENVIRONMENT VARIABLES
---------------------
The cpu profiler, heap checker, and heap profiler will lie dormant,
using no memory or CPU, until you turn them on.  (Thus, there's no
harm in linking -lprofiler into every application, and also -ltcmalloc
assuming you're ok using the non-libc malloc library.)

The easiest way to turn them on is by setting the appropriate
environment variables.  We have several variables that let you
enable/disable features as well as tweak parameters.

CPUPROFILE=<file> -- turns on cpu profiling and dumps data to this file.
PROFILESELECTED=1 -- if set, cpu-profiler will only profile regions of code
                     surrounded with ProfilerEnable()/ProfilerDisable().
PROFILEFREQUENCY=x-- how many interrupts/second the cpu-profiler samples.

HEAPPROFILE=<pre> -- turns on heap profiling and dumps data using this prefix
HEAPCHECK=<type>  -- turns on heap checking with strictness 'type'

TCMALLOC_DEBUG=<level> -- the higher level, the more messages malloc emits
MALLOCSTATS=<level>    -- prints memory-use stats at program-exit

---
16 March 2005