Commit Graph

92 Commits

Author SHA1 Message Date
Aliaksey Kandratsenka
689e4a5bb4 bumped version to 2.4 2015-01-10 12:26:51 -08:00
Aliaksey Kandratsenka
3f5f1bba0c bumped version to 2.4rc 2014-12-28 18:28:18 -08:00
Raphael Moreira Zinsly
b8b027d09a Make PPC64 use 64K of internal page size for tcmalloc by default
This patch set the default tcmalloc internal page size to 64K when
built on PPC.
2014-12-23 10:51:54 -08:00
Raphael Moreira Zinsly
3f55d874be New configure flags to set the alignment and page size of tcmalloc
Added two new configure flags, --with-tcmalloc-pagesize and
--with-tcmalloc-alignment, in order to set the tcmalloc internal page
size and tcmalloc allocation alignment without the need of a compiler
directive and to make the choice of the page size independent of the
allocation alignment.
2014-12-23 10:51:51 -08:00
Aliaksey Kandratsenka
463a619408 bumped version to 2.3 2014-12-07 12:53:35 -08:00
Raphael Moreira Zinsly
8eb4ed785a Added option to disable libunwind linking
This patch adds a configure option to enable or disable libunwind linking.
The patch also disables libunwind on ppc by default.
2014-11-27 12:51:33 -08:00
Aliaksey Kandratsenka
e7d5e512b0 bumped version to 2.3rc 2014-11-02 20:13:33 -08:00
Aliaksey Kandratsenka
1108d83cf4 implemented cpu-profiling mode that profiles threads separately
Default mode of operation of cpu profiler uses itimer and
SIGPROF. This timer is by definition per-process and no spec defines
which thread is going to receive SIGPROF. And it provides correct
profiles only if we assume that probability of picking threads will be
proportional to cpu time spent by threads.

It is easy to see, that recent Linux (at least on common SMP hardware)
doesn't satisfy that assumption. Quite big skews of SIGPROF ticks
between threads is visible. I.e. I could see as big as 70%/20%
division instead of 50%/50% for pair of cpu-hog threads. (And I do see
it become 50/50 with new mode)

Fortunately POSIX provides mechanism to track per-thread cpu time via
posix timers facility. And even more fortunately, Linux also provides
mechanism to deliver timer ticks to specific threads.

Interestingly, it looks like FreeBSD also has very similar facility
and seems to suffer from same skew.  But due to difference in a way
how threads are identified, I haven't bothered to try to support this
mode on FreeBSD.

This commit implements new profiling mode where every thread creates
posix timer which tracks thread's cpu time. Threads also also set up
signal delivery to itself on overflows of that timer.

This new mode requires every thread to be registered in cpu
profiler. Existing ProfilerRegisterThread function is used for that.

Because registering threads requires application support (or suitable
LD_PRELOAD-able wrapper for thread creation API), new mode is off by
default. And it has to be manually activated by setting environment
variable CPUPROFILE_PER_THREAD_TIMERS.

New mode also requires librt symbols to be available. Which we do not
link to due to librt's dependency on libpthread.  Which we avoid due
to perf impact of bringing in libpthread to otherwise single-threaded
programs. So it has to be either already loaded by profiling program
or LD_PRELOAD-ed.
2014-11-02 18:29:55 -08:00
Aliaksey Kandratsenka
714bd93e42 drop workaround for too old redhat 7
Note that this is _not_ RHEL7 but original redhat 7 from early 2000s.
2014-11-02 18:29:55 -08:00
Aliaksey Kandratsenka
2e90b6fd72 bumped version to 2.2.1 2014-06-21 15:52:34 -07:00
Aliaksey Kandratsenka
846b775dfa bumped version to 2.2 2014-05-03 18:01:12 -07:00
Aliaksey Kandratsenka
facd7e83b3 bumped version to 2.1.90 2014-04-19 13:16:20 -07:00
Aliaksey Kandratsenka
125e5ed58b don't enable backtrace() for stacktrace capturing by default
Because we don't yet have a treatment for deadlocks that are caused by
(recursive) use of malloc from within that facility.
2014-04-12 18:05:37 -07:00
Aliaksey Kandratsenka
8b2e5ee831 issue-614: use tc_memalign in ReallocAfterMemalloc test
Because some OSes lack plain memalign. And we really need to test our
implementation which is always available via tc_malloc.
2014-04-07 12:29:35 -07:00
Aliaksey Kandratsenka
fe56631426 unbreak building with libunwind
Caused by premature merging of previous patch.

When we're searching for backtrace in libexecinfo and don't find it,
we should not reset UNWIND_LIBS to empty value.

Correct fix is to first search for backtrace in libunwind and then to
search for it in libexecinfo.
2014-03-01 12:45:03 -08:00
Thomas Klausner
9117996149 Look for backtrace() in libexecinfo as well.
Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
2014-03-01 11:34:04 -08:00
Thomas Klausner
fd3379a213 Fix unportable test(1) construct.
Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
2014-03-01 11:29:22 -08:00
Thomas Klausner
a7223c2a14 Test for memalign in configure.ac. Disable a test that uses memalign if it is not found.
Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
2014-03-01 11:26:27 -08:00
Aliaksey Kandratsenka
7be2edfe7f issue-525: only warn if --enable-frame-pointers are not given
This fixes issue when frame pointers warning is given even if frame
pointers are enabled
2014-02-22 12:14:11 -08:00
Aliaksey Kandratsenka
b5e584dfdc issue-525: warn user on lack of libunwind but don't fail
Because we now have access to other backtrace capturing method(s) at
runtime.
2014-02-16 19:41:37 -08:00
Aliaksey Kandratsenka
90ba15d1f2 issue-604: implement runtime-selectable stacktrace capturing
We're now building all supported stacktrace capturing methods. And
there's now a way to select at runtime which method is used.
2014-02-16 19:22:06 -08:00
Aliaksey Kandratsenka
6de1f38b68 chmod -x configure.ac
Because configure.ac is not really executable. And because it
interferes with tab completion of configure.
2014-02-08 14:09:44 -08:00
Aliaksey Kandratsenka
e98371540d eliminated gcc warning on __thread configure snippet
gcc complained about lack of matching ' in code that force-fails
__thread detection on mingw
2014-01-11 16:28:15 -08:00
xiaoyur347
60b12171bc fix GCC version detect for platforms other than X86/X64
[alk@tut.by: commented why we're disabling __thread not just for x86]

Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
2014-01-11 16:24:59 -08:00
Aliaksey Kandratsenka
4c274b9e20 issue-592: handle recent mingw with C++11 threads
Somehow it's c++ headers (like string) define pthread symbols without
even us asking for. That breaks old assumption that pthread symbols
are not available on windows.

In order to fix that we detect this condition in configure.ac and
avoid defining windows versions of pthread symbols.
2014-01-04 18:28:36 -08:00
Aliaksey Kandratsenka
f8a2163b51 Added AM_MAINTAINER_MODE to disable Makefile rebuild rules
Some people might want to check-in unpacked result on make dist into
git. But because git doesn't preserve timestamps it would cause those
automatic "auto-retool" rules to trigger. Sometimes even causing build
breakage if system's autotools version don't match autotools version
used for make dist.

Easiest way around this problem is to simply disable those unnecessary
"maintainer" rebuild rules. Especially given that source is always
freely available via git and therefore there should be no reason to
regenerate any of autotools products in 'make dist'-produced sources.
2013-12-06 12:29:14 -08:00
Aliaksey Kandratsenka
f216317a87 use AC_PROG_LIBTOOL to summon libtool
So that older autotools of rhel 5 can be used
2013-11-16 15:44:52 -08:00
Aliaksey Kandratsenka
819a2b051f issue-413: disable __thread usage on OSX
Because it was found that __thread variables access is compiled into
calls to tlv_get_addr which was found to call malloc. Because we
actually use thread-local storage from inside malloc it leads to stack
overflow. So we'll continue using pthreads API for that which is known
to work on OSX.
2013-08-29 19:41:25 +03:00
Aliaksey Kandratsenka
4380908093 lowered autoconf requirement
Autoconf 2.59 works. And most notably it will not affect our releases
which are all prepared with newer autoconf.
2013-08-29 19:40:51 +03:00
alkondratenko@gmail.com
674fcd94a8 bump version to 2.1
git-svn-id: http://gperftools.googlecode.com/svn/trunk@236 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-07-30 09:14:20 +00:00
alkondratenko@gmail.com
60ab178aeb bump version number for 2.1rc
git-svn-id: http://gperftools.googlecode.com/svn/trunk@225 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-07-20 21:37:01 +00:00
alkondratenko@gmail.com
d8e12e94ea issue-549: handle most recent mingw that has sleep and nanosleep
I.e. we have to check their presence in configure and in case of their
presence we have to avoid re-defining then in window's port.h



git-svn-id: http://gperftools.googlecode.com/svn/trunk@223 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-07-20 21:35:14 +00:00
alkondratenko@gmail.com
7896dcb9db issue-504: disable tls on mingw
Which is known to fail.



git-svn-id: http://gperftools.googlecode.com/svn/trunk@207 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-03-11 19:16:47 +00:00
alkondratenko@gmail.com
8bf4522aa5 issue-504: do not define HAVE_MMAP on mingw
Because, clearly, windows doesn't have one



git-svn-id: http://gperftools.googlecode.com/svn/trunk@206 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-03-11 19:15:46 +00:00
alkondratenko@gmail.com
05b100d9d4 issue-503: removed checked in configure and other auto* products
So that it's easier to contribute and review contributions.

People wishing to build gperftools from svn checkout should run
autogen.sh first which will create those files and then ./configure &&
make as usual

INSTALL file has updated instructions too.



git-svn-id: http://gperftools.googlecode.com/svn/trunk@200 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-03-11 18:32:05 +00:00
chappedm@gmail.com
bd3b3a7e9a issue-496: Fixes an issue where tcmalloc might deadlock in a thread calling fork
tcmalloc contained a bug where some internal locks were left in a undefined state
between fork, leaving the child process in a deadlock state. This patch fixes the
issue by introducing stricter locking between the parent nd child while forking.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@196 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2013-03-10 20:17:21 +00:00
chappedm@gmail.com
84b983c8d4 issue-465: Adding automagic support for __builtin_expect
Previously __builtin_ expect was based on a macro check against gcc version.
Now we perform the check via AM which is a cleaner approach. There are also
a number of code changes here to utilize LIKELY/UNLIKELY macros based on
__builtin_expect to improve performance.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@189 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 20:06:47 +00:00
chappedm@gmail.com
86a55316ba issue-449: Disables mmap check when cross compiling since it is meaningless anyways
git-svn-id: http://gperftools.googlecode.com/svn/trunk@179 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 19:12:42 +00:00
chappedm@gmail.com
1363bc6955 issue-475: Re-applying changes made originally for r150 and r151
- Used aclocal, autoupdate, autoconf, and automake to correctly apply changes made to Makefile.am. Detailed instructions on this procedure can be found here http://inti.sourceforge.net/tutorial/libinti/autotoolsproject.html.
- Fixed a number of error/warning messages due to use of newer aclocal, autoconf, and automake utilities.
- Directly and indirectly related to issue-385 and issue-480.



git-svn-id: http://gperftools.googlecode.com/svn/trunk@173 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 17:21:00 +00:00
chappedm@gmail.com
1243295cdc issue-475: Amend of r151 and r150
In revisions 151 and 150 an attempt was made to enable frame pointers by default for i386. However, in the process of doing so a number of files were inadvertently touched as a result of running autogen.sh. As a result, I have needed to roll back these revisions so that I can reattempt the change.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@172 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 15:59:08 +00:00
chappedm@gmail.com
c566266b10 issue-480: duplicate of issue-385 fixed in r150 however some of the comments in the code
regarding frame pointers needed to be clarified.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@165 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 14:13:21 +00:00
chappedm@gmail.com
cd723b43ff issue-385: updates to automake to pick up the explicit setting of the -fno-omit-frame-pointer for i386
git-svn-id: http://gperftools.googlecode.com/svn/trunk@151 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-05-16 12:24:13 +00:00
csilvers
4e9432c509 Fri Feb 03 15:40:45 2012 Google Inc. <google-perftools@googlegroups.com>
* gperftools: version 2.0
	* Renamed the project from google-perftools to gperftools (csilvers)
	* Renamed the .deb/.rpm packagse from google-perftools to gperftools too
	* Renamed include directory from google/ to gperftools/ (csilvers)
	* Changed the 'official' perftools email in setup.py/etc
	* Renamed google-perftools.sln to gperftools.sln
	* PORTING: Removed bash-isms & grep -q in heap-checker-death_unittest.sh
	* Changed copyright text to reflect Google's relinquished ownership


git-svn-id: http://gperftools.googlecode.com/svn/trunk@142 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-02-04 00:07:36 +00:00
csilvers
0afb078b34 Tue Jan 31 10:43:50 2012 Google Inc. <opensource@google.com>
* google-perftools: version 1.10 release
	* PORTING: Support for patching assembly on win x86_64! (scott.fr...)
	* PORTING: Work around atexit-execution-order bug on freebsd (csilvers)
	* PORTING: Patch _calloc_crt for windows (roger orr)
	* PORTING: Add C++11 compatibility method for stl allocator (jdennett)
	* PORTING: use MADV_FREE, not MADV_DONTNEED, on freebsd (csilvers)
	* PORTING: Don't use SYS_open when not supported on solaris (csilvers)
	* PORTING: Do not assume uname() returns 0 on success (csilvers)
	* LSS: Improved ARM support in linux-syscall-support (dougkwan)
	* LSS: Get rid of unused syscalls in linux-syscall-support (csilvers)
	* LSS: Fix broken mmap wrapping for ppc (markus)
	* LSS: Emit .cfi_adjust_cfa_offset when appropriate (ppluzhnikov)
	* LSS: Be more accurate in register use in __asm__ (markus)
	* LSS: Fix __asm__ calls to compile under clang (chandlerc)
	* LSS: Fix ARM inline assembly bug around r7 and swi (lcwu)
	* No longer log when an allocator fails (csilvers)
	* void* -> const void* for MallocExtension methods (llib)
	* Improve HEAP_PROFILE_MMAP and fix bugs with it (dmikurube)
	* Replace int-based abs with more correct fabs in a test (pmurin)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@135 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-01-31 19:11:26 +00:00
csilvers
e0eaf5981e * PORTING: Support for patching assembly on win x86_64! (scott.fr...)
* PORTING: Work around atexit-execution-order bug on freebsd (csilvers)
	* PORTING: Patch _calloc_crt for windows (roger orr)
	* PORTING: Add C++11 compatibility method for stl allocator (jdennett)
	* PORTING: use MADV_FREE, not MADV_DONTNEED, on freebsd (csilvers)
	* PORTING: Don't use SYS_open when not supported on solaris (csilvers)
	* PORTING: Do not assume uname() returns 0 on success (csilvers)
	* LSS: Improved ARM support in linux-syscall-support (dougkwan)
	* LSS: Get rid of unused syscalls in linux-syscall-support (csilvers)
	* LSS: Fix broken mmap wrapping for ppc (markus)
	* LSS: Emit .cfi_adjust_cfa_offset when appropriate (ppluzhnikov)
	* LSS: Be more accurate in register use in __asm__ (markus)
	* LSS: Fix __asm__ calls to compile under clang (chandlerc)
	* LSS: Fix ARM inline assembly bug around r7 and swi (lcwu)
	* No longer log when an allocator fails (csilvers)
	* void* -> const void* for MallocExtension methods (llib)
	* Improve HEAP_PROFILE_MMAP and fix bugs with it (dmikurube)
	* Replace int-based abs with more correct fabs in a test (pmurin)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@134 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-01-28 00:13:43 +00:00
csilvers
4fa02db374 Ready to release perftools 1.9.1 :-/
Added the ARM stacktrace file to the tarball (for 'make dist')


git-svn-id: http://gperftools.googlecode.com/svn/trunk@132 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2011-12-24 01:00:32 +00:00
csilvers
2a7b3b8837 Thu Dec 22 16:22:45 2011 Google Inc. <opensource@google.com>
* google-perftools: version 1.9 release
	* Lightweight check for double-frees (blount)
	* BUGFIX: Fix pprof to exit properly if run with no args (dagitses)
	* Suggest ASan as a way to diagnose buggy code (ppluzhnikov)
	* Get rid of unused CACHELINE_SIZE (csilvers)
	* Replace atexit() calls with global dtors; helps freebsd (csilvers)
	* Disable heap-checker under AddressSanitizer (kcc)
	* Fix bug in powerpc stacktracing (ppluzhnikov)
	* PERF: Use exponential backoff waiting for spinlocks (m3b)
	* Fix 64-bit nm on 32-bit binaries in pprof (csilvers)
	* Add ProfileHandlerDisallowForever (rsc)
	* BUGFIX: Shell escape when forking in pprof (csilvers)
	* No longer combine overloaded functions in pprof (csilvers)
	* Fix address-normalizing bug in pprof (csilvers)
	* More consistently call abort() instead of exit() on failure (csilvers)
	* Allow NoGlobalLeaks to be safely called more than once (csilvers)
	* PORTING/BUGFIX: Fix ARM cycleclock to use volatile asm (dougkwan)
	* PORTING: 64-bit atomic ops for ARMv7 (dougkwan)
	* PORTING: Implement stacktrace for ARM (dougkwan)
	* PORTING: Fix malloc_hook_mmap_linux for ARM (dougkwan)
	* PORTING: Update linux_syscall_support.h for ARM/etc (evannier, sanek)
	* PORTING: Fix freebsd to work on x86_64 (chapp...@gmail.com)
	* PORTING: Added additional SYS_mmap fixes for FreeBSD (chappedm)
	* PORTING: Allow us to compile on OS X 10.6 and run on 10.5 (raltherr)
	* PORTING: Check for mingw compilers that *do* define timespec
	* PORTING: Add "support" for MIPS cycletimer
	* PORTING: Fix fallback cycle-timer to work with Now (dougkwan)
	* PERF: Move stack trace collecting out of the mutex (taylorc)
	* PERF: Get the deallocation stack trace outside the mutex (sean)
	* Make PageHeap dynamically allocated for leak checks (maxim)
	* BUGFIX: Fix probing of nm -f behavior in pprof (dpeng)
	* BUGFIX: Fix a race with the CentralFreeList lock before main (sanjay)
	* Support /pprof/censusprofile url arguments (rajatjain)
	* Change IgnoreObject to return its argument (nlewycky)
	* Update malloc-hook files to support more CPUs
	* BUGFIX: write our own strstr to avoid libc problems (csilvers)
	* Use simple callgrind compression facility in pprof
	* Print an error message when we can't run pprof to symbolize (csilvers)
	* Die in configure when g++ is't installed (csilvers)
	* DOC: Beef up the documentation a bit about using libunwind (csilvers)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@130 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2011-12-23 00:45:49 +00:00
csilvers
a6076edd17 * Get the deallocation stack trace outside the lock (sean)
* Make PageHeap dynamically allocated for leak checks (maxim)
	* BUGFIX: Fix probing of nm -f behavior in pprof (dpeng)
	* PORTING: Add "support" for MIPS cycletimer
	* BUGFIX: Fix a race with the CentralFreeList lock (sanjay)
	* Allow us to compile on OS X 10.6 and run on 10.5 (raltherr)
	* Support /pprof/censusprofile url arguments (rajatjain)
	* Die in configure when g++ is't installed (csilvers)
	* Change IgnoreObject to return its argument (nlewycky)
	* Update malloc-hook files to support more CPUs
	* Move stack trace collecting out of the mutex (taylorc)
	* BUGFIX: write our own strstr to avoid libc problems (csilvers)
	* use simple callgrind compression facility in pprof
	* print an error message when we can't run pprof to symbolize (csilvers)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@120 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2011-10-18 20:57:45 +00:00
csilvers
c2eedce2a7 Fri Aug 26 13:29:25 2011 Google Inc. <opensource@google.com>
* google-perftools: version 1.8.3 release
	* Added back the 'pthreads unsafe early' #define, needed for FreeBSD


git-svn-id: http://gperftools.googlecode.com/svn/trunk@117 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2011-08-26 21:08:59 +00:00
csilvers
f633b40ba5 Thu Aug 11 15:01:47 2011 Google Inc. <opensource@google.com>
* google-perftools: version 1.8.2 release
	* Fixed calculation of patchlevel, 'make check' should all pass again


git-svn-id: http://gperftools.googlecode.com/svn/trunk@115 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2011-08-11 22:06:22 +00:00