Commit Graph

147 Commits

Author SHA1 Message Date
Adhemerval Zanella 7495af7b7f Fix getpc_test for PPC64v2 LE
This patch fix the PPC64 guard to get the function address for PPC64v2.
It removes the use of an indirection (to get the ODP text address),
since the PPCv2 does not have function descriptors.
2014-02-02 19:32:37 -02:00
Adhemerval Zanella fb76964876 Add support for PPC64LE in configure 2014-02-02 19:32:13 -02:00
Adhemerval Zanella 93a69c4df2 issue-491: Fix lost wakeups in spinlock
In uncontended cases, SpinLock::{Lock,Unlock} have an overhead of 13ns.
In cases where the lock is contended, SpinLock::Unlock has a bug where
it can fail to wakeup waiters, causing the overhead of
SpinLock::{Lock,Unlock} to blow up from 13ns to as high as 256ms. In
cases of heavy lock contention, this can cause applications to sleep
for minutes at a time without doing anything, appearing to hang.

The following fix slows down SpinLock::Unlock by 2ns in the uncontended
case, but speeds up SpinLock::Lock by up to almost 256ms in the
contended case where a wakeup ix mixed.
2014-02-02 19:31:34 -02:00
Adhemerval Zanella 4f9eba24ff issue-490: Add support to {Acquire,Release}_AtomicExchange 2014-02-02 19:30:31 -02:00
Adhemerval Zanella 23abe4d284 Fix compiler warnings 2014-02-02 19:29:39 -02:00
Adhemerval Zanella 05c33f5308 issue-496: Fix possible deadlock in thread+fork
This patch adds a pthread_atfork handler to set the internal
locks in consistent state.
2014-02-02 19:21:53 -02:00
Adhemerval Zanella 73ccf4d1b9 Update README with PowerPC specifics notes 2014-02-02 19:19:04 -02:00
Adhemerval Zanella 3d45096108 issue-443: Tune object number transfered between lists
This patch increases the number of object transfered from central
list to thread list from 32 to 32678. This increases performance
in most cases, especially on multiple allocations of the same size.
It also adds the environment variable TCMALLOC_TRANSFER_NUM_OBJ
to tune its value.
2014-02-02 19:13:16 -02:00
Adhemerval Zanella 62c887142c Fix page_heap testcase for 64K pages
This patch fixes the page_heap testcase 32-bit build when
TCMALLOC_LARGE_PAGES64K is defined.
2014-02-02 19:08:44 -02:00
Adhemerval Zanella d8b21a8086 RSS usage tuning for 64K pages
This patch lowers TCMalloc RSS usage when TCMALLOC_LARGE_PAGES64K is
defined by tuning page scavenge values.
2014-02-02 18:35:30 -02:00
chappedm@gmail.com b96203b591 issue-461: Fix to malloc_extension.h so that it builds with -std=gnu++98
git-svn-id: http://gperftools.googlecode.com/svn/trunk@190 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 20:14:08 +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 a5dacccd6a issue-466: Clarified stats output and comments for ExtractStats() and GetThreadStats()
git-svn-id: http://gperftools.googlecode.com/svn/trunk@188 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 19:06:35 +00:00
chappedm@gmail.com 09d97533b0 issue-467: Fixed issue with allocation size being narrowed to 32-bit
git-svn-id: http://gperftools.googlecode.com/svn/trunk@187 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 19:02:52 +00:00
chappedm@gmail.com 990889e623 issue-470: Allows the default system allocator to be overidden
This is useful when you run into cases where you need an allocator
before tcmalloc has been fully initialized.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@186 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 18:53:18 +00:00
chappedm@gmail.com 3bf5f55d78 issue-482: Adds support for CACHELINE_ALIGNED value for arm based devices
Hardcoded the cacheline size to 32 because this value is supported by several
arm devices, however a better logic needs to be implemented at some point to
handle more arm devices.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@185 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 18:38:48 +00:00
chappedm@gmail.com 6856d1d1b2 issue-488: Performance improvement for initialization checks
These came in from the Google-internal version of tcmalloc. They saw some
decent speed improvements, both on microbenchmarks and big programs. The
idea is to improve the speed of the "Is everything initialized?" type of
code, that's at the start of all allocations and deallocations.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@184 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 18:34:43 +00:00
chappedm@gmail.com ad5aa05838 issue-483: Speed up accesses to ClassIndex()
Making its return type unsigned can save a conversion from
signed to unsigned, and getting rid of the ternary operators
seems to help a little bit as well. Various gcc versions weren't
generating conditional moves for them as one would expect.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@183 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-12-22 18:25:58 +00:00
chappedm@gmail.com 8de78fd85b issue-452: Adds a control mechanism to the cpu profiler to be switched on and off using a user defined signal.
CPUPROFILESIGNAL - Takes a signal number between the value of 1 and 64 inclusive which represents a signal
                   number as defined by signal.h. The signal must not be in use by the program. Sending this
                   signal to the program turns profiling on and off like a switch. By default the switch is
                   off when the program starts. Successive profiles are suffixed with a monotonically increasing
                   number.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@182 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-05 04:45:01 +00:00
chappedm@gmail.com 46f06ca0db issue-451: Fixed incorrect assembly for 64-bit barrier load and store on windows platforms.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@181 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 23:08:17 +00:00
chappedm@gmail.com 5fe91d5623 issue-450: Move includes for struct mallinfo from tcmalloc.cc to tcmalloc.h to fix compiler warnings from clang.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@180 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 22:53:01 +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 6f6c2bf685 issue-448: New environment setting that allows you to set an explicit heap limit
TCMALLOC_HEAP_LIMIT_MB - The maximum amount of heap memory that tcmalloc can use.
TCMALLOC_DISABLE_MEMORY_RELEASE - emulate platform with no MADV_DONTNEED support (generally for testing purposes).


git-svn-id: http://gperftools.googlecode.com/svn/trunk@178 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 19:02:15 +00:00
chappedm@gmail.com 644b1c6e35 issue-445: Fix for wrong cmpx instruction in OSAtomicCompareAndSwap64 for ppc64
git-svn-id: http://gperftools.googlecode.com/svn/trunk@177 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 18:30:05 +00:00
chappedm@gmail.com e32bb2d9a7 issue-444: Fix for invalid conversion build error in signal handler code
git-svn-id: http://gperftools.googlecode.com/svn/trunk@176 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 18:24:46 +00:00
chappedm@gmail.com abeaf46028 issue-430: Introduces 8-byte alignment support for tcmalloc
git-svn-id: http://gperftools.googlecode.com/svn/trunk@175 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 18:15:11 +00:00
chappedm@gmail.com baaf018829 issue-473: Fix for make install error regarding src/windows/google/tcmalloc.h
git-svn-id: http://gperftools.googlecode.com/svn/trunk@174 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-04 17:41:47 +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 5c17459c5e issue-476: Amendment to r152:issue-437 to fix a build error due to PR_SET_TRACER not being defined in older glibc releases.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@171 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 16:14:25 +00:00
chappedm@gmail.com 6287bbbbad issue-477: Fix clang compilation errors regarding format specifiers
git-svn-id: http://gperftools.googlecode.com/svn/trunk@170 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 15:56:27 +00:00
chappedm@gmail.com 87699c97cc issue-478: Added the heap profiler tunnable setting HEAP_PROFILER_TIME_INTERVAL used to dump heap profiles on a specified time interval.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@169 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 15:40:01 +00:00
chappedm@gmail.com 4eb6946d68 issue-479: Replaced sscanf usage while iterating proc maps entries to fix a deadlock introduced by glibc-2.15.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@168 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 15:27:58 +00:00
chappedm@gmail.com 5dd53ab6cb issue-481: Replaced test mechanism for distinct address spaces with a more reliable mechanism
Rather than using sys_ptrace+PTRACE_PEEK_DATA to determine whether address spaces are distinct, we now use sys_waitpid+__WCLONE. See issue-481 for a more detailed rationale.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@167 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 14:52:42 +00:00
chappedm@gmail.com 6c43620352 amend-r165: forgot to regenrate configure and Makefile.in
git-svn-id: http://gperftools.googlecode.com/svn/trunk@166 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-11-03 14:36:33 +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 4f325fbcc9 issue-424: Updated heap profiler documentation that had mispelling for the heap profiler mmap only environment setting (HEAP_PROFILE_ONLY_MMAP)
git-svn-id: http://gperftools.googlecode.com/svn/trunk@164 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-10-28 19:45:03 +00:00
chappedm@gmail.com a828c0a8ff issue-417: This commit removed the fatal error message printed along with the pprof usage information when pprof is run with no arguments.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@163 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-10-28 19:30:23 +00:00
chappedm@gmail.com e5b095abdc issue-411: This commit adds additional logging to the cpu profiler to warn when the profiler is run and no CPUPROFILE environment setting can be found. It also adds a new environment variable PERFTOOLS_UNITTEST to allow certain modules to take action when running under the umbrella of a unit test.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@162 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-10-28 18:28:21 +00:00
chappedm@gmail.com 57c48e9b5f issue-405: backed out original commit made in revision 147 due to the fact that it didn't work as intended
git-svn-id: http://gperftools.googlecode.com/svn/trunk@161 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-10-28 14:51:41 +00:00
chappedm@gmail.com 3e296c28c3 issue-442: Fixes an issue encountered on PPC with undefined conversions from 'base::subtle::Atomic64*' to 'const volatile Atomic32*'
git-svn-id: http://gperftools.googlecode.com/svn/trunk@160 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 02:47:24 +00:00
chappedm@gmail.com 1f59bb34d3 Adding support for CPU frequencies for Linux on PowerPC
git-svn-id: http://gperftools.googlecode.com/svn/trunk@159 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 02:33:00 +00:00
chappedm@gmail.com a2fec7c694 issue-446: Fixes compatability issues in malloc_hook_test for PPC64
git-svn-id: http://gperftools.googlecode.com/svn/trunk@158 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 01:43:02 +00:00
chappedm@gmail.com b05b6fc765 issue-458: Optimizes malloc hooks for weakly consistent memory architectures
git-svn-id: http://gperftools.googlecode.com/svn/trunk@157 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 01:27:34 +00:00
chappedm@gmail.com 00edf667f6 issue-456: Adds support for CACHELINE_ALIGNED values for PPC
git-svn-id: http://gperftools.googlecode.com/svn/trunk@156 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 01:18:15 +00:00
chappedm@gmail.com 731d0932a0 issue-455: Adds another size for large pages in tcmalloc through the new define TCMALLOC_LARGE_PAGES64K
git-svn-id: http://gperftools.googlecode.com/svn/trunk@155 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 00:59:16 +00:00
chappedm@gmail.com 771b6bcf68 issue-457: Fixed an issue where the 'getpc' testcase was using the wrong PPC64 preprocessor directive
git-svn-id: http://gperftools.googlecode.com/svn/trunk@154 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 00:52:13 +00:00
chappedm@gmail.com 711232a1ef issue-453 Added support to get the timebase register value using just one instruction and also adjusts the PPC32 code to the recent GLIBC one that implements the same functionality
git-svn-id: http://gperftools.googlecode.com/svn/trunk@153 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 00:42:23 +00:00
chappedm@gmail.com fa0209f261 issue-437 Fixed issues related to new glibc shipped with Ubuntu 10.10
1. ptrace permissions were modifed to be a bit more strict which required
   us to programatically set the permissions while syncing up to the profiling
   thread.

2. Order of destructors registered with atexit changed which was casuing us to
   miss generating the backtrace when heap checker was finished. Seems that we
   initially fixed this for FreeBSD and now linux has changed their behaviour
   to be the same. We are now a bit stricter on the rules here accross all
   platforms.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@152 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2012-09-18 00:00:20 +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