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.
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.
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.
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
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
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
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
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
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
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
- 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
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
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
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