summaryrefslogtreecommitdiff
path: root/src/tests/tcmalloc_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Set tcmalloc heap limit prior to testing oomAliaksey Kandratsenka2021-02-281-0/+5
| | | | Otherwise it can take long time to OOM on osex.
* correctly check sized delete hint when asserts are onAliaksey Kandratsenka2021-02-281-0/+17
| | | | | | | | | | | | We previously tested wrong assumption that larger than page size size classes have addresses aligned on page size. New code is making proper check of size class. Also added is unit test coverage for this previously failing condition. And we now also run "assert-ful" unittests for big tcmalloc too, not only tcmalloc_minimal configuration. This fixes github issue #1254
* add missing noopt wrappings around more operator new callsAliaksey Kandratsenka2021-02-211-4/+4
| | | | | This fixes tests passing on clang which otherwise eliminates those new/delete calls so checking for hooks being called failed.
* use standard way to print size_t-sized intsAliaksey Kandratsenka2021-02-141-1/+1
| | | | | | I.e. just use zu/zd/zx instead of finding out right size and defining PRI{u,x,d}S defines. Compilers have long caught up to this part of standard.
* don't test sbrk hook if we're on linux and don't have __sbrkAliaksey Kandratsenka2020-07-111-1/+1
| | | | | | | | | "mmap" hooks code for linux only hooks sbrk when __sbrk is defined. But musl doesn't offer this function (reasonably so), so sbrk hooking doesn't work there. Not big loss, but lets make sure tests don't fail. Lets reference this to issue #1198
* liberate gperftools tests from relying on -fno-builtin-XXX flagsAliaksey Kandratsenka2020-07-061-33/+35
| | | | | | Clang mostly ignores those anyways, so our tests needed better way to disable optimizations (clang is quite aggressive replacing new/delete pair with stack allocation).
* Add tests for sized deallocationHolyWu2018-04-291-1/+31
|
* Don't test OOM handling of debugallocatorAliaksey Kandratsenka2018-03-241-2/+5
| | | | | | | | | | | | | This may fix issue #969. When testing OOM handling we set up sys allocator that fails memory allocation. But debugallocator itself allocates some internal metadata memory via malloc and crashes if those allocations fail. So occasionally this test failed when debugallocator's internal malloc ended up causing sys allocator. So instead of failing tests from time to time, we drop it for debug allocator. It's OOM handling is already crashy anyways.
* Implemented O(log n) searching among large spansAliaksey Kandratsenka2018-02-251-1/+1
| | | | | | | | | | | | | | | | | | This is implemented via std::set with custom STL allocator that delegates to PageHeapAllocator. Free large spans are not linked together via linked list, but inserted into std::set. Spans also store iterators to std::set positions pointing to them. So that removing span from set is fast too. Patch implemented by Aliaksey Kandratsenka and Todd Lipcon based on earlier research and experimentation by James Golick. Addresses issue #535 [alkondratenko@gmail.com: added Todd's fix for building on OSX] [alkondratenko@gmail.com: removed unnecessary Span constructor] [alkondratenko@gmail.com: added const for SpanSet comparator] [alkondratenko@gmail.com: added operator != for STLPageHeapAllocator]
* unbreak throw declarations on operators new/deleteAliaksey Kandratsenka2017-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | We now clearly separate PERFTOOLS_NOTHROW (used for tc_XXX functions) and throw()/noexcept (used for operators we define). The former is basically "nothrow() for our callers, nothing for us". It is roughly equivalent of what glibc declares for malloc and friends. If some exception-full C++ code calls such function it doesn't have to bother setting up exception handling around such call. Notably, it is still important for those functions to _not have throw() declarations when we're building tcmalloc. Because C++ throw() requires setting up handling of unexpected exceptions thrown from under such functions which we don't want. The later is necessary to have operators new/delete definitions have "correct" exception specifications to calm down compiler warnings. Particularly older clang versions warn if new/delete aren't defined with correct exception specifications. Also this commit fixes annoying gcc 7+ warning (and gnu++14 mode) that complains about throw() being deprecated.
* Fix OOM handling in fast-pathAliaksey Kandratsenka2017-11-291-0/+66
| | | | | | | | | | | | Previous fast-path malloc implementation failed to arrange proper oom handling for operator new. I.e. operator new is supposed to call new handler and throw exception, which was not arranged in fast-path case. Fixed code now passes pointer for oom function to ThreadCache::FetchFromCentralCache which will call it in oom condition. Test is added to verify correct behavior. I've also updated some fast-path-related comments for more accuracy.
* Add support for C++17 operator new/delete for overaligned types.Andrey Semashev2017-11-291-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add auto-detection of std::align_val_t presence to configure scripts. This indicates that the compiler supports C++17 operator new/delete overloads for overaligned types. - Add auto-detection of -faligned-new compiler option that appeared in gcc 7. The option allows the compiler to generate calls to the new operators. It is needed for tests. - Added overrides for the new operators. The overrides are enabled if the support for std::align_val_t has been detected. The implementation is mostly based on the infrastructure used by memalign, which had to be extended to support being used by C++ operators in addition to C functions. In particular, the debug version of the library has to distinguish memory allocated by memalign from that by operator new. The current implementation of sized overaligned delete operators do not make use of the supplied size argument except for the debug allocator because it is difficult to calculate the exact allocation size that was used to allocate memory with alignment. This can be done in the future. - Removed forward declaration of std::nothrow_t. This was not portable as the standard library is not required to provide nothrow_t directly in namespace std (it could use e.g. an inline namespace within std). The <new> header needs to be included for std::align_val_t anyway. - Fixed operator delete[] implementation in libc_override_redefine.h. - Moved TC_ALIAS definition to the beginning of the file in tcmalloc.cc so that the macro is defined before its first use in nallocx. - Added tests to verify the added operators. [alkondratenko@gmail.com: fixed couple minor warnings, and some whitespace change] [alkondratenko@gmail.com: removed addition of TC_ALIAS in debug allocator] Signed-off-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
* Add PERFTOOLS_THROW where necessary (as detected by GCC).Romain Geissler2017-07-081-1/+1
|
* don't use arg-ful constructor attribute for early nallocx testAliaksey Kandratsenka2017-05-211-7/+0
| | | | | | | 101 is not very early anyways and arg-ful constructor attribute is only supported since gcc 4.3 (and e.g. rhel 5's compiler fails to compile it). So there seems to be very little value trying to ask for priority of 101.
* fix compilation of tcmalloc_unittest.cc on older llvm-gccAliaksey Kandratsenka2017-05-141-0/+6
|
* Don't assume memalign exists in memalign vs nallocx testAliaksey Kandratsenka2017-02-201-1/+1
| | | | | | | OSX and windows have issues with memalign. So test against tc_memalign instead. This should fix _memalign linker-time part of issue #870.
* ported nallocx support from Google-internal tcmallocAliaksey Kandratsenka2016-12-181-0/+47
| | | | | | | | | | | | | | | nallocx is extension introduced by jemalloc. It returns effective size of allocaiton without allocating anything. We also support MALLOCX_LG_ALIGN flag. But all other jemalloc flags (which at the moment do nothing for nallocx anyways) are silently ignored, since there is no sensible way to return errors in this API. This was originally contributed by Dmitry Vyukov with input from Andrew Hunter. But due to significant divergence of Google-internal and free-software forks of tcmalloc, significant massaging was done by me. So all bugs are mine.
* Call function pointers with the right typeBrian Silverman2016-03-051-12/+14
| | | | | I think it's undefined behavior, but it's definitely weird. ubsan complains too.
* unbreak TestErrno againAliaksey Kandratsenka2015-09-261-1/+1
| | | | | Somehow in previous commit I managed to break assignment of memalign result to variable being tested. Luckily gcc gave me warning.
* don't try to test memalign on windowsAliaksey Kandratsenka2015-09-261-4/+7
| | | | This unbreaks tcmalloc_unittest.cc on windows.
* added test on errno = ENOMEM on out of memoryAliaksey Kandratsenka2015-08-021-0/+18
|
* added tc_malloc_skip_new_handlerAliaksey Kandratsenka2014-04-011-0/+5
| | | | | | | | | | | | This is port of corresponding chromium change at: https://codereview.chromium.org/55333002/ Basic idea is that sometimes apps that use tc_set_new_mode in order to have C++ out-of-memory handler catch OOMs in malloc, need to invoke usual malloc that returns 0 on OOM. That new API is exactly for that. It'll always return NULL on OOM even if tc_new_mode is set to true.
* issue-489: added unit test for chromium-style decommittingAliaksey Kandratsenka2014-02-221-5/+51
|
* issue-489: made tests pass on enabled chromium-style decommittingAliaksey Kandratsenka2014-02-221-0/+19
|
* added emacs -*- mode lines for google coding styleAliaksey Kandratsenka2013-10-121-0/+1
|
* issue-425: Fixed tcmalloc unittest crashes for windows buildschappedm@gmail.com2013-03-111-2/+2
| | | | | | | | Missing use of volatile was causing vs2010 to perform unwanted optimization resulting in the crash. See issue for more details. git-svn-id: http://gperftools.googlecode.com/svn/trunk@198 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* issue-448: New environment setting that allows you to set an explicit heap limitchappedm@gmail.com2012-11-041-2/+12
| | | | | | | | 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
* issue-430: Introduces 8-byte alignment support for tcmallocchappedm@gmail.com2012-11-041-3/+4
| | | | git-svn-id: http://gperftools.googlecode.com/svn/trunk@175 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* issue-477: Fix clang compilation errors regarding format specifierschappedm@gmail.com2012-11-031-1/+1
| | | | git-svn-id: http://gperftools.googlecode.com/svn/trunk@170 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Fri Feb 03 15:40:45 2012 Google Inc. <google-perftools@googlegroups.com>csilvers2012-02-041-3/+3
| | | | | | | | | | | | | | * 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
* * Get the deallocation stack trace outside the lock (sean)csilvers2011-10-181-0/+4
| | | | | | | | | | | | | | | | | | | * 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
* Tue Jul 26 20:57:51 2011 Google Inc. <opensource@google.com>csilvers2011-07-271-0/+1
| | | | | | | | | * google-perftools: version 1.8 release * Added an #include to fix compile breakage on latest gcc's * Removed an extra , in the configure.ac script git-svn-id: http://gperftools.googlecode.com/svn/trunk@112 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Fri Jul 15 16:10:51 2011 Google Inc. <opensource@google.com>csilvers2011-07-161-50/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.8 release * PORTING: (Disabled) support for patching mmap on freebsd (chapp...) * PORTING: Support volatile __malloc_hook for glibc 2.14 (csilvers) * PORTING: Use _asm rdtsc and __rdtsc to get cycleclock in windows (koda) * PORTING: Fix fd vs. HANDLE compiler error on cygwin (csilvers) * PORTING: Do not test memalign or double-linking on OS X (csilvers) * PORTING: Actually enable TLS on windows (jontra) * PORTING: Some work to compile under Native Client (krasin) * PORTING: deal with pthread_once w/o -pthread on freebsd (csilvers) * Rearrange libc-overriding to make it easier to port (csilvers) * Display source locations in pprof disassembly (sanjay) * BUGFIX: Actually initialize allocator name (mec) * BUGFIX: Keep track of 'overhead' bytes in malloc reporting (csilvers) * Allow ignoring one object twice in the leak checker (glider) * BUGFIX: top10 in pprof should print 10 lines, not 11 (rsc) * Refactor vdso source files (tipp) * Some documentation cleanups * Document MAX_TOTAL_THREAD_CACHE_SIZE <= 1Gb (nsethi) * Add MallocExtension::GetOwnership(ptr) (csilvers) * BUGFIX: We were leaving out a needed $(top_srcdir) in the Makefile * PORTING: Support getting argv0 on OS X * Add 'weblist' command to pprof: like 'list' but html (sanjay) * Improve source listing in pprof (sanjay) * Cap cache sizes to reduce fragmentation (ruemmler) * Improve performance by capping or increasing sizes (ruemmler) * Add M{,un}mapReplacmenet hooks into MallocHook (ribrdb) * Refactored system allocator logic (gangren) * Include cleanups (csilvers) * Add TCMALLOC_SMALL_BUT_SLOW support (ruemmler) * Clarify that tcmalloc stats are MiB (robinson) * Remove support for non-tcmalloc debugallocation (blount) * Add a new test: malloc_hook_test (csilvers) * Change the configure script to be more crosstool-friendly (mcgrathr) * PORTING: leading-underscore changes to support win64 (csilvers) * Improve debugallocation tc_malloc_size (csilvers) * Extend atomicops.h and cyceclock to use ARM V6+ optimized code (sanek) * Change malloc-hook to use a list-like structure (llib) * Add flag to use MAP_PRIVATE in memfs_malloc (gangren) * Windows support for pprof: nul and /usr/bin/file (csilvers) * TESTING: add test on strdup to tcmalloc_test (csilvers) * Augment heap-checker to deal with no-inode maps (csilvers) * Count .dll/.dylib as shared libs in heap-checker (csilvers) * Disable sys_futex for arm; it's not always reliable (sanek) * PORTING: change lots of windows/port.h macros to functions * BUGFIX: Generate correct version# in tcmalloc.h on windows (csilvers) * PORTING: Some casting to make solaris happier about types (csilvers) * TESTING: Disable debugallocation_test in 'minimal' mode (csilvers) * Rewrite debugallocation to be more modular (csilvers) * Don't try to run the heap-checker under valgrind (ppluzhnikov) * BUGFIX: Make focused stat %'s relative, not absolute (sanjay) * BUGFIX: Don't use '//' comments in a C file (csilvers) * Quiet new-gcc compiler warnings via -Wno-unused-result, etc (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@110 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Improve debugallocation tc_malloc_size (csilvers)csilvers2011-03-211-6/+13
| | | | | | | | | | | * Extend atomicops.h to use ARM V6+ optimized code (sanek) * Fix failure in Ranges test (ppluzhnikov) * Change malloc-hook to use a list-like structure (llib) * Update tcmalloc_regtest to use new malloc hooks (llib) * PARTIAL: Keep track of 'overhead' bytes in the page cache (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@108 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * add a flag to use MAP_PRIVATE in memfs_malloc (gangren)csilvers2011-03-041-1/+13
| | | | | | | | | | | | | * pthread_self() is now safe to use early (ppluzhnikov) * windows support for pprof: nul and /usr/bin/file (csilvers) * fix tc_malloc_size for debugallocation (csilvers) * add test on strdup to tcmalloc_test (csilvers) * augment heap-checker to deal with no-inode maps (csilvers) * Get rid of -Wno-unused-result: not all gcc's support it (csilvers) * /bin/true -> ':', which is faster and more portable (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@107 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Fix tcmalloc_unittest on MSVC 10 in release mode (csilvers)csilvers2011-02-081-1/+23
| | | | | | | * Fix malloc_hook_c.h to compile with -ansi under gcc (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@104 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Make kHideMask use all 64 bits (ppluzhnikov)csilvers2011-01-191-2/+0
| | | | | | | | | | | | | | | | * Add new IsDebuggerAttached method (ppluzhnikov) * Document some tricks for maybe getting perftools to work on OS X * Redo file-top pprof commands (csilvers) * Clean up pprof input-file handling (csilvers) * 16-byte align debug allocs (jyasskin) * Ignore JVM memory leakage in the heap checker (davidyu, kkurimoto) * Better internal-function list for contentionz (ruemmler) * mmap2 on i386 takes an off_t, not an off64_t (csilvers) * Fix up fake-VDSO handling for unittest (ppluzhnikov) * Don't try to check valgrind for windows (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@101 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Suppress all large allocs when report threshold==0csilvers2010-11-181-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clarified meaning of various malloc stats * Change from ATTRIBUTED_DEPRECATED to comments * Make array-size a var to compile under clang * Reduce page map key size under x86_64 by 4.4MB * Added full qualification to MemoryBarrier * Support systems that capitalize /proc weirdly * Avoid gcc warning: exporting type in unnamed ns * Add some dynamic annotations for gcc attributes * Add support for census profiler in pprof * Speed up pprof's ExtractSymbols * Speed up GoogleOnce * Add pkg-config (.pc) files * Detect when __environ exists but is NULL * Improve spinlock contention performance * Add GetFreeListSizes * Improve sampling_test, eg by adding no-inline * Relax malloc_extension test-check for big pages * Add proper library version number information * Update from autoconf 2.64 to 2.65 * Better document how to write a server that works with pprof * Change FillProcSelfMaps to better handle out-of-space * No longer hook _aligned_malloc/free in windows * Handle function-forwarding in DLLs when patching (in windows) * Update .vcproj files that had wrong .cc files in them (!) * get rid of unnecessary 'size < 0' * fix comments a bit in sysinfo.cc * another go at improving malloc-stats output * fix comment typo in profiler.cc * Add a few more thread annotations * Try to read TSC frequency from 'tsc_freq_khz' * Fix annotalysis/TSAN incompatibility * Add pprof --evince to go along with --gv * Document need for sampling to use GetHeapSample * Fix flakiness in malloc_extension_test * Separate out synchronization profiling routines git-svn-id: http://gperftools.googlecode.com/svn/trunk@99 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Thu Aug 5 12:48:03 PDT 2010csilvers2010-08-051-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.6 release * Add tc_malloc_usable_size for compatibility with glibc (csilvers) * Override malloc_usable_size with tc_malloc_usable_size (csilvers) * Default to no automatic heap sampling in tcmalloc (csilvers) * Add -DTCMALLOC_LARGE_PAGES, a possibly faster tcmalloc (rus) * Make some functions extern "C" to avoid false ODR warnings (jyasskin) * pprof: Add SVG-based output (rsc) * pprof: Extend pprof --tools to allow per-tool configs (csilvers) * pprof: Improve support of 64-bit and big-endian profiles (csilvers) * pprof: Add interactive callgrind suport (weidenri...) * pprof: Improve address->function mapping a bit (dpeng) * Better detection of when we're running under valgrind (csilvers) * Better CPU-speed detection under valgrind (saito) * Use, and recommend, -fno-builtin-malloc when compiling (csilvers) * Avoid false-sharing of memory between caches (bmaurer) * BUGFIX: Fix heap sampling to use correct alloc size (bmauer) * BUGFIX: Avoid gcc 4.0.x bug by making hook-clearing atomic (csilvers) * BUGFIX: Avoid gcc 4.5.x optimization bug (csilvers) * BUGFIX: Work around deps-determining bug in libtool 1.5.26 (csilvers) * BUGFIX: Fixed test to use HAVE_PTHREAD, not HAVE_PTHREADS (csilvers) * BUGFIX: Fix tls callback behavior on windows when using wpo (wtc) * BUGFIX: properly align allocation sizes on Windows (antonm) * BUGFIX: Fix prototypes for tcmalloc/debugalloc wrt throw() (csilvers) * DOC: Updated heap-checker doc to match reality better (fischman) * DOC: Document ProfilerFlush, ProfilerStartWithOptions (csilvers) * DOC: Update docs for heap-profiler functions (csilvers) * DOC: Clean up documentation around tcmalloc.slack_bytes (fikes) * DOC: Renamed README.windows to README_windows.txt (csilvers) * DOC: Update the NEWS file to be non-empty (csilvers) * PORTING: Fix windows addr2line and nm with proper rc code (csilvers) * PORTING: Add CycleClock and atomicops support for arm 5 (sanek) * PORTING: Improve PC finding on cygwin and redhat 7 (csilvers) * PORTING: speed up function-patching under windows (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@97 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Add new (std::nothrow) to debugallocation (corrado)csilvers2010-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | * Add a flag to ingore unaligned-ptr leaks (archanakannan) * PORTING: Add get-pc capabilities for a new OS (csilvers) * Don't register malloc extension under valgrind (csilvers) * Fix throw specs for our global operator new (chandlerc) * PORTING: link to instructions on windows static overrides (mbelshe) * Fix prototype differences in debugalloc (chandlerc, csilvers, wan) * Change pprof to handle big-endian input files (csilvers) * Properly align allocation sizes on Windows (antonm) * Improve IsRunningOnValgrind, using valgrind.h (csilvers, kcc) * Improve the accuracy of system_alloc actual_size (csilvers) * Add interactive callgrind support to pprof (weidenri...) * Fix off-by-one problems when symbolizing in pprof (dpeng) * Be more permissive in allowed library names, in pprof (csilvers) * PORTING: Fix pc_from_ucontext to handle cygwin and redhat7 (csilvers) * Fix stacktrace to avoid inlining (ppluzhnikov) git-svn-id: http://gperftools.googlecode.com/svn/trunk@91 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Make memalign && posix_memalign respect tc_set_new_mode (willchan)csilvers2009-12-021-0/+15
| | | | | | | * Fix windows patch functions to respect tc_set_new_mode (willchan) git-svn-id: http://gperftools.googlecode.com/svn/trunk@80 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Prefer __environ to /proc/self/environ (csilvers)csilvers2009-12-021-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | * Add HEAP_CHECK_MAX_LEAKS envvar (glider) * BUGFIX: debugallocation now calls cpp_alloc for new (willchan) * BUGFIX: tc_set_new_mode() respected for realloc and calloc (willchan) * BUGFIX: fix opt-mode maybe-crash on debugallocation_test (csilvers) * Print alloc size when mmap fails (hakon) * Add ITIMER_REAL support (csilvers, nabeelmian) * BUGFIX: correctly report double-frees (csilvers) * Export tc_set_new_mode() from the .h file (willchan) * Restructure Symbolize to make it more efficient (glider) * PORTING: Augment sysinfo to work on 64-bit OS X (csilvers) * Add two numeric pageheap properties to MallocExtension (fikes) * PORTING: Use libunwind for i386 when using --omitfp (ppluzhnikov) * Add ReleaseToSystem(num_bytes) (kash) * Provide correct library filenames under solaris (jeffrey) * BUGFIX: simple fix in pprof --raw mode (mrabkin) * PORTING: Prefer sys/ucontext.h to fix OS 10.6 builds (csilvers) * Improve support for inlined functions in pprof (sanjay) * Update wget code to not use keepalive (mrabkin, csilvers) * PORTING: correctly handle x86_64 machines that use fp's (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@79 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Replace usleep() and poll() with nanosleep() (glider)csilvers2009-11-101-0/+130
| | | | | | | | | | | | | | | | | | | | * Document problems with _recalloc (csilvers) * Detect when x86_64 doesn't turn off frame pointers (csilvers) * Fix sysinfo.cc/etc to work with 64-bit os x (csilvers) * BUGFIX: Use __TEXT instead of __DATA to store tcmalloc fns (csilvers) * Added two numeric pageheap properties to tcmalloc (fikes) * Support for mallocranges stats visualization (sanjay) * Use libunwind for i386, not just x86_64 (ppluzhnikov) * Add ReleaseToSystem(num_bytes) (kash) * Provide corect library filenames under solaris (jeffrey) * BUGFIX: a simple bug in pprof --raw mode (mrabkin) * Prfer sys/ucontext.h to ucontext.h, to fix OS X 10.6 (csilvers) * Improve supprot for inlined functions in pprof (sanjay) * Document inaccuracies in profiling mmap calls (csilvers) * Update wget code to not use keepalive (mrabkin, csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@78 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Fix Symbolize() to call pprof once, rather than once/symbol (glider)csilvers2009-10-271-0/+35
| | | | | | | | | | | | | | | | | | * Fix unsetting of hooks before forking, in debug mode (maxim) * Add some documention for pmuprofile (aruns) * Speed up futex with FUTEX_PRIVATE_FLAG (m3b) * Fix os x 10.6: prefer sys/ucontext.h to ucontext.h (csilvers) * Fix C shims to be actually valid C: malloc_extension/etc (csilvers) * Fix a longtime memset bug (csilvers) * Implement nothrow versions of delete (csilvers) * Fix recursively-unmapped-region accounting (ppluzhnikov) * Better distinguish between real and fake VDSO (ppluzhnikov) * Modify span coalescing to improve performance (sanjay) * WINDOWS: Remove unnecessary lock around VirtualAlloc (mbelshe) * Remove performance tests for ptmalloc2 (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@77 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Thu Sep 10 13:51:15 2009 Google Inc. <opensource@google.com>csilvers2009-09-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.4 release * Add debugallocation library, to catch memory leaks, stomping, etc * Add --raw mode to allow for delayed processing of pprof files * Use less memory when reading CPU profiles * New environment variables to control kernel-allocs (sbrk, memfs, etc) * Add MarkThreadBusy(): performance improvement * Remove static thread-cache-size code; all is dynamic now * Add new HiddenPointer class to heap checker * BUGFIX: pvalloc(0) allocates now (found by new debugalloc library) * BUGFIX: valloc test (not implementation) no longer overruns memory * BUGFIX: GetHeapProfile no longer deadlocks * BUGFIX: Support unmapping memory regions before main * BUGFIX: Fix some malloc-stats formatting * BUGFIX: Don't crash as often when freeing libc-allocated memory * BUGFIX: Deal better with incorrect PPROF_PATH when symbolizing * BUGFIX: weaken new/delete/etc in addition to malloc/free/etc * BUGFIX: Fix return value of GetAllocatedSize * PORTING: Fix mmap-#define problem on some 64-bit systems * PORTING: Call ranlib again (some OS X versions need it) * PORTING: Fix a leak when building with LLVM * PORTING: Remove some unneeded bash-ishs from testing scripts * WINDOWS: Support library unloading as well as loading * WINDOWS/BUGFIX: Set page to 'xrw' instead of 'rw' when patching git-svn-id: http://gperftools.googlecode.com/svn/trunk@76 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Wed Mar 11 11:25:34 2009 Google Inc. <opensource@google.com>csilvers2009-03-111-3/+36
| | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.1 release * Dynamically resize thread caches -- nice perf. improvement (kash) * Add VDSO support to give better stacktraces in linux (ppluzhnikov) * Improve heap-profiling sampling algorithm (ford) * Rewrite leak-checking code: should be faster and more robust (sanjay) * Use ps2 instead of ps for dot: better page cropping for gv (csilvers) * Disable malloc-failure warning messages by default (csilvers) * Update config/Makefile to disable tests on a per-OS basis (csilvers) * PORTING: Get perftools compiling under MSVC 7.1 again (csilvers) * PORTING: Get perftools compiling under cygwin again (csilvers) * PORTING: automatically set library flags for solaris x86 (csilvers) * Add TCMALLOC_SKIP_SBRK to mirror TCMALLOC_SKIP_MMAP (csilvers) * Add --enable flags to allow selective building (csilvers) * Put addr2line-pdb and nm-pdb in proper output directory (csilvers) * Remove deprecated DisableChecksIn (sanjay) * DOCUMENTATION: Document most MallocExtension routines (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@66 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Thu Dec 11 16:01:32 2008 Google Inc. <opensource@google.com>csilvers2008-12-131-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.0rc1 release * Replace API for selectively disabling heap-checker in code (sanjay) * Add a pre-mmap hook (daven, adlr) * Add MallocExtension interface to set memory-releasing rate (fikes) * Augment pprof to allow any string ending in /pprof/profile (csilvers) * PORTING: Rewrite -- and fix -- malloc patching for windows (dvitek) * PORTING: Add nm-pdb and addr2line-pdb for use by pprof (dvitek) * PORTING: Improve cygwin and mingw support (jperkins, csilvers) * PORTING: Fix pprof for mac os x, other pprof improvements (csilvers) * PORTING: Fix some PPC bugs in our locking code (anton.blanchard) * A new unittest, smapling_test, to verify tcmalloc-profiles (csilvers) * Turn off TLS for gcc < 4.1.2, due to a TLS + -fPIC bug (csilvers) * Prefer __builtin_frame_address to assembly for stacktraces (nlewycky) * Separate tcmalloc.cc out into multiple files -- finally! (kash) * Make our locking code work with -fPIC on 32-bit x86 (aruns) * Fix an initialization-ordering bug for tcmalloc/profiling (csilvers) * Use "initial exec" model of TLS to speed up tcmalloc (csilvers) * Enforce 16-byte alignment for tcmalloc, for SSE (sanjay) git-svn-id: http://gperftools.googlecode.com/svn/trunk@60 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Mon Jun 9 16:47:03 2008 Google Inc. <opensource@google.com>csilvers2008-06-141-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | * google-perftools: version 0.98 release * Add ProfilerStartWithOptions() (cgd) * Change tcmalloc_minimal to not do any stack-tracing at all (csilvers) * Prefer mmap to sbrk for 64-buit debug mode (sanjay) * Fix accounting for some tcmalloc stats (sanjay) * Use setrlimit() to keep unittests from killing the machine (odo) * Fix a bug when sbrk-ing near address 4G (csilvers) * Make MallocHook thread-safe (jyasskin) * Fix windows build for MemoryBarrier (jyasskin) * Fix CPU-profiler docs to mention correct libs (csilvers) * Fix for GetHeapProfile() when heap-profiling is off (maxim) * Avoid realloc resizing ping-pongs using hysteresis (csilvers) * Add --callgrind output support to pprof (klimek) * Fix profiler.h and heap-profiler.h to be C-compatible (csilvers) * Break malloc_hook.h into two parts to reduce dependencies (csilvers) * Better handle systems that don't implement mmap (csilvers) * PORTING: disable system_alloc_unittest for msvc (csilvers) * PORTING: Makefile tweaks to build better on cygwin (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@52 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Tue Feb 12 12:28:32 2008 Google Inc. <opensource@google.com>csilvers2008-02-131-1/+1
| | | | | | | | | | | | | | * google-perftools: version 0.95 release * Better -- not perfect -- support for linux-ppc (csilvers) * Fix race condition in libunwind stacktrace (aruns) * Speed up x86 spinlock locking (m3b) * Improve heap-checker performance (maxim) * Heap checker traverses more ptrs inside heap-alloced objects (maxim) * Remove deprecated ProfilerThreadState function (cgd) * Update libunwind documentation for statically linked binaries (aruns) git-svn-id: http://gperftools.googlecode.com/svn/trunk@44 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Thu Nov 29 07:59:43 2007 Google Inc. <opensource@google.com>csilvers2007-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | * google-perftools: version 0.94 release * PORTING: MinGW/Msys support -- runs same code as MSVC does (csilvers) * PORTING: Add NumCPUs support for Mac OS X (csilvers) * Work around a sscanf bug in glibc(?) (waldemar) * Fix Windows MSVC bug triggered by thread deletion (csilvers) * Fix bug that triggers in MSVC /O2: missing volatile (gpike) * March-of-time support: quiet warnings/errors for gcc 4.2, OS X 10.5 * Modify pprof so it works without nm: useful for windows (csilvers) * pprof: Support filtering for CPU profiles (cgd) * Bugfix: have realloc report to hooks in all situations (maxim) * Speed improvement: replace slow memcpy with std::copy (soren) * Speed: better iterator efficiency in RecordRegionRemoval (soren) * Speed: minor speed improvements via better bitfield alignment (gpike) * Documentation: add documentation of binary profile output (cgd) git-svn-id: http://gperftools.googlecode.com/svn/trunk@40 6b5cf1ce-ec42-a296-1ba9-69fdba395a50