Previous implementation wasn't entirely safe w.r.t. 32-bit off_t
systems. Specifically around mmap replacement hook. Also, API was a
lot more general and broad than we actually need.
Sadly, old mmap hooks API was shipped with our public headers. But
thankfully it appears to be unused externally (checked via github
search). So we keep this old API and ABI for the sake of formal API
and ABI compatibility. But this old API is now empty and always
fails (some OS/hardware combinations didn't have functional
implementations of those hooks anyways).
New API is 64-bit clean and only provides us with what we need. Namely
being able to react to virtual address space mapping changes for
logging, heap profiling and heap leak checker. I.e. no pre hooks or
mmap-replacement hooks. We also explicitly not ship this API
externally to give us freedom to change it.
New code is also hopefully tidier and slightly more portable. At least
there are fewer arch-specific ifdef-s.
Another somewhat notable change is, since mmap hook isn't needed in
"minimal" configuration, we now don't override system's
mmap/munmap/etc functions in this configuration. No big deal, but it
reduces risk of damage if we somehow mess those up. I.e. musl's mmap
does few things that our mmap replacement doesn't, such as very fancy
vm_lock thingy. Which doesn't look critical, but is good thing for us
not to interfere with when not necessary.
Fixes issue #1406 and issue #1407. Lets also mention issue #1010 which
is somewhat relevant.
First, ml64 (amd64 version of masm) doesn't support /coff. Second, it
also doesn't support (nor use) .model directive.
Sadly, asm is inherently amd64-only, so this entire test won't build
in i386 configuration.
After change to release page heap lock around returning memory back to
kernel, page heap test got dependency on page heap lock. Which was not
available on windows since relevant symbols are not exported.
Proposed fix is to simply duplicate all needed .cc files in
page_heap_test project instead of linking to dll. This is not perfect
but gets job done, until we figure out better solution (GNU/Linux will
eventually get hidden visibility and will need it).
This fixes github issue 1189.
1.Remove superfluous per file settings for include directory and runtime library.
2.Remove unnecessary project tcmalloc_minimal_unittest-static. We can simply build libtcmalloc_minimal as a static library and then link against the single .lib file.
3.Add separate configurations of patching and overriding facility for release mode.
* 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
* 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
* 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
* #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
* 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
* 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
* 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
* 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
* 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
* 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
The main benefit for perftools is that google spinlocks allow for
link-time (static) initialization, which we had to simulate before,
yielding bugs and worse performance.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@73 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* 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
* 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
* 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
* google-perftools: version 0.96 release
* major atomicops rewrite; fixed atomic ops code for linux/ppc (vchen)
* nix the stacktrace library; now build structure is simpler (csilvers)
* Speed up heap-checker, and reduce extraneous logging (maxim)
* Improve itimer code for NPTL case (cgd)
* Add source code annotations for use by valgrind, etc (kcc)
* PORTING: Fix high resolution timers for Mac OS X (adlr)
git-svn-id: http://gperftools.googlecode.com/svn/trunk@48 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* 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
* PORTING: everything compiles on Solaris, OS X, FreeBSD (see INSTALL)
* PORTING: cpu-profiler works on most platforms (much better GetPC())
* PORTING: heap-profiler works on most platforms
* PORTING: improved windows support, including release builds
* No longer build or run ptmalloc tests by default
* Add support for using memfs filesystem to allocate memory in linux
* WINDOWS: give debug library and release library different names
Tue Jul 17 22:26:27 2007 Google Inc. <opensource@google.com>
git-svn-id: http://gperftools.googlecode.com/svn/trunk@38 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
* google-perftools: version 0.92 release
* PERFORMANCE: use a packed cache to speed up tcmalloc
* PORTING: preliminary windows support! (see README.windows)
* PORTING: better support for solaris, OS X, FreeBSD (see INSTALL)
* Envvar support for running the heap-checker under gdb
* Add weak declarations to maybe_threads to fix no-pthreads compile bugs
* Some 64bit fixes, especially with pprof
* Better heap-checker support for some low-level allocations
* Fix bug where heap-profiles would sometimes get truncated
* New documentation about how to handle common heap leak situations
* Use computed includes for hash_map/set: easier config
* Added all used .m4 templates to the distribution
git-svn-id: http://gperftools.googlecode.com/svn/trunk@36 6b5cf1ce-ec42-a296-1ba9-69fdba395a50