summaryrefslogtreecommitdiff
path: root/src/thread_cache.cc
Commit message (Collapse)AuthorAgeFilesLines
* issue-585: fixed use of TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTESAliaksey Kandratsenka2013-11-161-7/+14
| | | | | In order to apply that, we're now doing explicit EnvToInt64 call as part of initializing thread cache module.
* added emacs -*- mode lines for google coding styleAliaksey Kandratsenka2013-10-121-0/+1
|
* issue-488: Performance improvement for initialization checkschappedm@gmail.com2012-12-221-8/+9
| | | | | | | | | | 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
* * PORTING: Support for patching assembly on win x86_64! (scott.fr...)csilvers2012-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * 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
* In my testing for a new release, I was noticing hangs oncsilvers2011-12-231-0/+4
| | | | | | | | | | cygwin, that went away when I turned off tls support. Since I didn't use to have such problems, I am being conservative and only turning off TLS for the particular version of cygwin I'm testing on (as returned by uname()). git-svn-id: http://gperftools.googlecode.com/svn/trunk@128 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * Get the deallocation stack trace outside the lock (sean)csilvers2011-10-181-29/+3
| | | | | | | | | | | | | | | | | | | * 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
* Fri Jul 15 16:10:51 2011 Google Inc. <opensource@google.com>csilvers2011-07-161-14/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * Fix typos in comment in profiler.h (nrhodes)csilvers2011-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #include fixes (jyrki) * Add missing stddef.h for ptrdiff_t (mec) * Add M{,un}mapReplacement hooks into MallocHook (ribrdb) * Force big alloc in frag test (ruemmler) * PERF: Increase the size class cache to 64K entries (ruemmler) * PERF: Increase the transfer cache by 16x (ruemmler) * Use windows intrinsic to get the tsc (csilvers) * Rename atomicops-internals-x86-msvc.h->windows.h (csilvers) * Remove flaky DEATH test in malloc_hook_test (ppluzhnikov) * Expose internal ReadStackTraces()/etc (lantran) * Refactored system allocator logic (gangren) * Include-what-you-use: cleanup tcmalloc #includes (csilvers) * Don't set kAddressBits to 48 on 32-bit systems (csilvers) * Add declaration for __rdtsc() for windows (koda) * Don't revert to system alloc for expected errors (gangren) * Add TCMALLOC_SMALL_BUT_SLOW support (ruemmler) * Clarify that tcmalloc stats are MiB (robinson) * Avoid setting cpuinfo_cycles_per_second to 0 (koda) * Fix frag_unittest memory calculations (ruemmler) * Remove support for non-tcmalloc debugallocation (blount) * Add malloc_hook_test (llib) * Change the objcopy -W test to be cross-friendly (mcgrathr) * Export __tcmalloc in addition to _tcmalloc, for 86_64 (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@109 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * add a flag to use MAP_PRIVATE in memfs_malloc (gangren)csilvers2011-03-041-18/+11
| | | | | | | | | | | | | * 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
* * Default to not sampling in tcmalloc (csilvers)csilvers2010-06-211-1/+2
| | | | | | | | | | | | | | | | | | * Add -DTCMALLOC_LARGE_PAGES: better perf for some workloads (rus) * Extend pprof --tools to allow per-tool configs (csilvers) * Have STL_Allocator pass on # bytes to free (richardfang) * Add a header guard to config.h (csilvers) * DOC: Clean up documentation around tcmalloc.slack_bytes (fikes) * DOC: Document ProfilerFlush, ProfilerStartWithOptions (csilvers) * PORTING: Work around a gcc 4.5.0 optimization bug (csilvers) * PORTING: Use -fno-builtin-malloc and friends when compiling tcmalloc * PORTING: Define _WIN32_WINNT high enough for mingw (csilvers) * PORTING: Work around libtool bug getting deps wrong in some cases * Update README.windows to emphasize $IncludeDir more (csilvers) * Rename README.windows to README_windows.txt (csilvers) git-svn-id: http://gperftools.googlecode.com/svn/trunk@95 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* * PORTING: Revised patch_functions to avoid deadlock (csilvers, andrey)csilvers2010-01-141-6/+0
| | | | | | | | | | * PORTING: Revised patch_functions to speed up .dll loads (csilvers) * PORTING: Build and run sampling_test for windows (csilvers) * Correctly init tc structs even when libc isn't patched (csilvers) * Make low-level allocs async-signal-safe (saito) git-svn-id: http://gperftools.googlecode.com/svn/trunk@83 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Thu Sep 10 13:51:15 2009 Google Inc. <opensource@google.com>csilvers2009-09-111-87/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* 1) Change #include "config.h" to <config.h>. This is what automakecsilvers2009-04-211-1/+1
| | | | | | | | | | recommends, and makes it easier to override a config file. 2) Rename OS_WINDOWS in sysinfo.cc, to not conflict with a macro defined in a windows SDK somewhere. git-svn-id: http://gperftools.googlecode.com/svn/trunk@70 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Fri Apr 17 16:40:48 2009 Google Inc. <opensource@google.com>csilvers2009-04-181-5/+12
| | | | | | | | | | | | | | | | | | | | | * google-perftools: version 1.2 release * Allow large_alloc_threshold=0 to turn it off entirely (csilvers) * Die more helpfully when out of memory for internal data (csilvers) * Refactor profile-data gathering, add a new unittest (cgd, nabeelmian) * BUGFIX: fix rounding errors with static thread-size caches (addi) * BUGFIX: disable hooks better when forking in leak-checker (csilvers) * BUGFIX: fix realloc of crt pointers on windows (csilvers) * BUGFIX: do a better job of finding binaries in .sh tests (csilvers) * WINDOWS: allow overriding malloc/etc instead of patching (mbelshe) * PORTING: fix compilation error in a ppc-specific file (csilvers) * PORTING: deal with quirks in cygwin's /proc/self/maps (csilvers) * PORTING: use 'A' version of functions for ascii input (mbelshe) * PORTING: generate .so's on cygwin and mingw (ajenjo) * PORTING: disable profiler methods on cygwin (jperkins) * Updated autoconf version to 2.61 and libtool version to 1.5.26 git-svn-id: http://gperftools.googlecode.com/svn/trunk@68 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* Wed Mar 11 11:25:34 2009 Google Inc. <opensource@google.com>csilvers2009-03-111-92/+226
| | | | | | | | | | | | | | | | | | | | | | * 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-0/+417
* 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