gperftools

Main gperftools repository

BSD-3-CLAUSE License

Downloads
870
Stars
8.2K
Committers
122

Bot releases are hidden (Show)

gperftools - gperftools-2.15 Latest Release

Published by alk 10 months ago

This release has the following bug fixes:

Huge thanks to all contributors!

gperftools - gperftools-2.14

Published by alk 10 months ago

gperftools 2.14 is out!

This release has the following set of notable changes:

  • Roman Geissler has contributed a fix to nasty initialization bug introduced in 2.13 (see github issue #1452 for one example where it fails).

  • spinlock delay support now has proper windows support. Instead of simply sleeping, it uses WaitOnAddress (which is basically windows equivalent of futexes). This improvement was contributed by Lennox Ho.

  • we now have basic QNX support (basic malloc + heap profiler) championed by Xiang.Lin. Thanks! Do note, however, that QNX doesn't provide SIGPROF ticks, so there will be no cpu profiler support on this OS.

  • Yikai Zhao has contributed several fixes to important corner cases of generic_fp stacktrace method.

  • several people have contributed various improvements to our cmake build: Lennox Ho, Sergey Fedorov, Mateusz Jakub Fila. But do note that cmake build is still incomplete and best-effort.

  • Julian Schroeder have fixed generic_fp incompatibility with ARM pointer auth.

  • Mateusz Jakub Fila has contributed implementation of mallocinfo2 function (64-bit version of mallinfo).

  • Lennox Ho has updated C malloc extension shims to include {Set,Get}MemoryReleaseRate.

  • Lennox Ho has contributed the ability to disable malloc functions patching on windows when TCMALLOC_DISABLE_REPLACEMENT=1 environment variable is set.

  • User poljak181 has contributed a fix to infinite recursion in some cases of malloc hooks (or user-replaced operator new) and MallocExtension::instance().

  • Sergey Fedorov has contributed a fix to use MAP_ANON on some older OSes without MAP_ANONYMOUS.

  • the way we detect working ucontext->pc extraction method was reworked and is now fully compile-time as opposed to config-time. This means no more duplication and mismatches between autoconf and cmake bits in this area.

List of relevant tickets can be seen online at: https://github.com/gperftools/gperftools/issues?q=label%3Afixed-in-2.14+

gperftools -

Published by alk about 1 year ago

gperftools 2.13 is out!

This release includes a few minor fixes:

  • Ivan Dlugos has fixed some issues with cmake and config.h defines.

  • 32-bit builds no longer require 64-bit atomics (which we wrongly introduced in 2.11 and which broke builds on some 32-bit architectures).

  • generic_fp backtracing method now uses robust address probing method. The previous approach had occasional false positives, which caused occasional rare crashes.

  • In some cases, MSVC generated TrivialOnce machine code that deadlocked programs on startup. The issue is now fixed.

gperftools - gperftools-2.12

Published by alk about 1 year ago

Brett T. Warden contributed one significant fix. After a change in the previous release, we installed broken pkg-config files. Brett noticed and fixed that. Huge thanks!

gperftools - gperftools-2.11

Published by alk about 1 year ago

gperftools 2.11 is out!

Few minor fixes since rc couple weeks ago. Plus couple notable contributions:

  • Artem Polyakov has contributed auto-detection of several MPI systems w.r.t. filenames used by HEAPPROFILE and CPUPROFILE environment variables. Also, we now support HEAPPROFILE_USE_PID and CPUPROFILE_USE_PID environment variables that force profile filenames to have pid appended. Which will be useful for some programs that fork for parallelism. See https://github.com/gperftools/gperftools/pull/1263 for details.

  • Ken Raffenetti has extended MPI detection mentioned above with detection of MPICH system.

Thanks a lot!

gperftools - gperftools-2.10.80

Published by alk about 1 year ago

gperftools 2.11rc is out!

Most notable change is that Linux/aarch64 and Linux/riscv are now fully supported. That is, all unit tests pass on those architectures (previously the heap leak checker was broken).

Also notable is that heap leak checker support is officially deprecated as of this release. All bug fixes from now are on a best effort basis. For clarity we also declare that it is only expected to work (for some definition of work) on Linux/x86 (all kinds), Linux/aarch64, Linux/arm, Linux/ppc (untested as of this writing) and Linux/mips (untested as well). While some functionality worked in the past on BSDs, it was never fully functional; and will never be. We strongly recommend everyone to switch to asan and friends.

For major internal changes it is also worth mentioning that we now fully switched to C++-11 std::atomic. All custom OS- and arch-specific atomic bits have been removed at last.

Another notable change is that mmap and sbrk hooks facility is now no-op. We keep API and ABI for formal compatibility, but the calls to add mmap/sbrk hooks do nothing and return an error (whenever possible as part of API). There seem to be no users of it anyways, and mmap replacement API that is part of that facility really screwed up 64-bit offsets on (some/most) 32-bit systems. Internally for heap profiler and heap checker we have a new, but non-public API (see mmap_hook.h).

Most tests now pass on NetBSD x86-64 (I tested on version 9.2). And only one that fails is new stacktrace test for stacktraces from signal handler (so there could be some imperfections for cpu profiles).

We don't warn people away from the libgcc stacktrace capturing method anymore. In fact users on most recent glibc-s are advised to use it (pass --enable-libgcc-unwinder-by-default). This is thanks to the dl_find_object API offered by glibc which allows this implementation to be fully async-signal-safe. Modern Linux distros should from now on build their gperftools package with this enabled (other than those built on top of musl).

generic_fp and generic_fp_unsafe stacktrace capturing methods have been expanded for more architectures and even some basic non-Linux support. We have completely removed old x86-specific frame pointer stacktrace implementation in favor of those 2. _unsafe one should be roughly equivalent to the old x86 method. And 'safe' one is recommended as a new default for those who want FP-based stacktracing. Safe implementation robustly checks memory before accessing it, preventing unlikely, but not impossible crashes when frame pointers are bogus.

On platforms that support it, we now build gperftools with "-fno-omit-frame-pointer -momit-leaf-frame-pointer". This makes gperftools mostly frame-pointer-ful, but without performance hit in places that matter (this is how Google builds their binaries BTW). That should cover gcc (at least) on x86, aarch64 and riscv. Intention for this change is to make distro-shipped libtcmalloc.so compatible with frame-pointer stacktrace capturing (for those who still do heap profiling, for example). Of course, passing --enable-frame-pointers still gives you full frame pointers (i.e. even for leaf functions).

There is now support for detecting actual page size at runtime. tcmalloc will now allocate memory in units of this page size. It particularly helps on arms with 64k pages to return memory back to the kernel. But it is somewhat controversial, because it effectively bumps tcmalloc logical page size on those machines potentially increasing fragmentation. In any case, there is now a new environment variable TCMALLOC_OVERRIDE_PAGESIZE allowing people to override this check. I.e. to either reduce effective page size down to tcmalloc's logical page size or to increase it.

MallocExtension::MarkThreadTemporarilyIdle has been changed to be identical to MarkThreadIdle. MarkThreadTemporarilyIdle is believed to be unused, anyways. See issue #880 for details.

There are a whole bunch of smaller fixes. Many of those smaller fixes had no associated ticket, but some had. People are advised to see here for list of notable tickets closed in this release: https://github.com/gperftools/gperftools/issues?q=label%3Afixed-in-2.11+

Some of those tickets are quite notable (fixes for rare deadlocks in cpu profiler ProfilerStop or while capturing heap growth stacktraces (aka growthz)).

Here is list of notable contributions:

  • Chris Cambly has contributed initial support for AIX

  • Ali Saidi has contributed SpinlockPause implementation for aarch64

  • Henrik Reinstädtler has contributed fix for cpuprofiler on aarch64 OSX

  • Gabriel Marin has backported Chromium's commit for always sanity checking large frees

  • User zhangyiru has contributed a fix to report the number of leaked bytes as size_t instead of (usually 32-bit) int.

  • Sergey Fedorov has contributed some fix for building on older ppc-based OSX-es

  • User tigeran has removed unused using declaration

Huge thanks to all contributors.

gperftools - gperftools-2.10

Published by alk over 2 years ago

30 May 2022

gperftools 2.10 is out!

Here are notable changes:

  • Matt T. Proud contributed documentation fix to call Go programming language by it's true name instead of golang.
  • Robert Scott contributed debugallocator feature to use readable (PROT_READ) fence pages. This is activated by TCMALLOC_PAGE_FENCE_READABLE environment veriable.
  • User stdpain contributed fix for cmake detection of libunwind.
  • Natale Patriciello contributed fix for OSX Monterey support.
  • Volodymyr Nikolaichuk contributed support for returning memory back to OS by using mmap with MAP_FIXED and PROT_NONE. It is off by default and enabled by preprocessor define: FREE_MMAP_PROT_NONE. This should help OSes that don't support Linux-style madvise MADV_DONTNEED or BSD-style MADV_FREE.
  • Jingyun Hua has contributed basic support for LoongArch.
  • Github issue #1338 of failing to build on some recent musl versions has been fixed.
  • Github issue #1321 of failing to ship cmake bits with .tar.gz archive has been fixed.
gperftools -

Published by alk over 3 years ago

gperftools 2.9.1 is out!

Minor fixes landed since previous release:

  • OSX builds now prefer backtrace() and have somewhat working heap sampling.
  • Incorrect assertion failure was fixed that crashed tcmalloc if assertions were on and sized delete was used. More details in github issue #1254.
gperftools - gperftools-2.9

Published by alk over 3 years ago

Few more changes landed compared to rc:

  • Venkatesh Srinivas has contributed thread-safety annotations support.
  • couple more unit test bugs that caused tcmalloc_unittest to fail on recent clang has been fixed.
  • usage of unsupportable linux_syscall_support.h has been removed from few places. Building with --disable-heap-checker now completely avoids it. Expect complete death of this header in next major release.
gperftools - gperftools-2.8.90

Published by alk over 3 years ago

gperftools 2.9rc is out!

Here are notable changes:

  • Jarno Rajahalme has contributed fix crashing bug in syscalls support for aarch64.
  • User SSE4 has contributed basic support for Elbrus 2000 architecture (!)
  • Venkatesh Srinivas has contributed cleanup to atomic ops.
  • Đoàn Trần Công Danh has fixed cpu profiler compilation on musl.
  • there is now better backtracing support for aarch64 and riscv. x86-64 with frame pointers now also defaults to this new "generic" frame pointer backtracer.
  • emergency malloc is now enabled by default. Fixes hang on musl when libgcc backtracer is enabled.
  • bunch of legacy config tests has been removed
gperftools - gperftools-2.8.1

Published by alk almost 4 years ago

gperftools-2.8.1 is out!

Here are notable changes:

  • previous release contained change to release memory without page heap lock, but this change had at least one bug that caused to crashes and corruption when running under aggressive decommit mode (this is not default). While we check for other bugs, this feature was reverted. See github issue #1204 and issue #1227.

  • stack traces depth captured by gperftools is now up to 254 levels deep. Thanks to Kerrick Staley for this small but useful tweak.

  • Levon Ter-Grigoryan has contributed small fix for compiler warning.

  • Grant Henke has contributed updated detection of program counter register for OS X on arm64.

  • Tim Gates has contributed small typo fix.

  • Steve Langasek has contributed basic build fixes for riscv64.

  • Isaac Hier and okhowang have contributed premiliminary port of build infrastructure to cmake. This works, but it is very premiliminary. Autotools-based build is the only officially supported build for now.

gperftools - gperftools-2.8

Published by alk over 4 years ago

gperftools 2.8 is out!

Here are notable changes:

  • ProfilerGetStackTrace is now officially supported API for libprofiler. Contributed by Kirill Müller.

  • Build failures on mingw were fixed. This fixed issue #1108.

  • Build failure of page_heap_test on MSVC was fixed.

  • Ryan Macnak contributed fix for compiling linux syscall support on i386 and recent GCCs. This fixed issue #1076.

  • test failures caused by new gcc 10 optimizations were fixed. Same change also fixed tests on clang.

gperftools - gperftools-2.7.90

Published by alk over 4 years ago

gperftools 2.8rc is out!

Here are notable changes:

  • building code now requires c++11 or later. Bundled MSVC project was converted to Visual Studio 2015.
  • User obones contributed fix for windows x64 TLS callbacks. This fixed leak of thread caches on thread exists in 64-bit windows.
  • releasing memory back to kernel is now made with page heap lock dropped.
  • HoluWu contributed fix for correct malloc patching on debug builds on windows. This configuration previously crashed.
  • Romain Geissler contributed fix for tls access during early tls initialization on dlopen.
  • large allocation reports are now silenced by default. Since not all programs want their stderr polluted by those messages. Contributed by Junhao Li.
  • HolyWu contributed improvements to MSVC project files. Notably, there is now project for "overriding" version of tcmalloc.
  • MS-specific _recalloc is now correctly zeroing only malloced part. This fix was contributed by HolyWu.
  • Brian Silverman contributed correctness fix to sampler_test.
  • Gabriel Marin ported few fixes from chromium's fork. As part of those fixes, we reduced number of static initializers (forbidden in chromium). Also we now syscalls via syscall function instead of reimplementing direct way to make syscalls on each platform.
  • Brian Silverman fixed flakiness in page heap test.
  • There is now configure flag to skip installing perl pprof, since external golang pprof is much superior. --disable-deprecated-pprof is the flag.
  • Fabric Fontaine contributed fixes to drop use of nonstandard __off64_t type.
  • Fabrice Fontaine contributed build fix to check for presence of nonstandard __sbrk functions. It is only used by mmap hooks code and (rightfully) not available on musl.
  • Fabrice Fontaine contributed build fix around mmap64 macro and function conflict in same cases.
  • there is now configure time option to enable aggressive decommit by default. Contributed by Laurent Stacul. --enable-aggressive-decommit-by-default is the flag.
  • Tulio Magno Quites Machado Filho contributed build fixes for ppc around ucontext access.
  • User pkubaj contributed couple build fixes for FreeBSD/ppc.
  • configure now always assumes we have mmap. This fixes configure failures on some linux guests inside virtualbox. This fixed issue #1008.
  • User shipujin contributed syscall support fixes for mips64 (big and little endian).
  • Henrik Edin contributed configurable support for wide range of malloc page sizes. 4K, 8K, 16K, 32K, 64K, 128K and 256K are now supported via existing --with-tcmalloc-pagesize flag to configure.
  • Jon Kohler added overheads fields to per-size-class textual stats. Stats that are available via MallocExtension::instance()->GetStats().
  • tcmalloc can now avoid fallback from memfs to default sys allocator. TCMALLOC_MEMFS_DISABLE_FALLBACK switches this on. This was contributed by Jon Kohler.
  • Ilya Leoshkevich fixed mmap syscall support on s390.
  • Todd Lipcon contributed small build warning fix.
  • User prehistoricpenguin contributed misc source file mode fixes (we still had few few c++ files marked executable).
  • User invalid_ms_user contributed fix for typo.
  • Jakub Wilk contributed typos fixes.
gperftools - gperftools-2.7

Published by alk over 6 years ago

gperftools 2.7 is out!

Few people contributed minor, but important fixes since rc.

Changes:

  • bug in span stats printing introduced by new scalable page heap change was fixed.
  • Christoph Müllner has contributed couple warnings fixes and initial support for aarch64_ilp32 architecture.
  • Ben Dang contributed documentation fix for heap checker.
  • Fabrice Fontaine contributed fixed for linking benchmarks with --disable-static.
  • Holy Wu has added sized deallocation unit tests.
  • Holy Wu has enabled support of sized deallocation (c++14) on recent MSVC.
  • Holy Wu has fixed MSVC build in WIN32_OVERRIDE_ALLOCATORS mode. This closed issue #716.
  • Holy Wu has contributed cleanup of config.h used on windows.
  • Mao Huang has contributed couple simple tcmalloc changes from chromium code base. Making our tcmalloc forks a tiny bit closer.
  • issue #946 that caused compilation failures on some Linux clang installations has been fixed. Much thanks to github user htuch for helping to diagnose issue and proposing a fix.
  • Tulio Magno Quites Machado Filho has contributed build-time fix for PPC (for problem introduced in one of commits since RC).
gperftools - gperftools-2.6.90

Published by alk over 6 years ago

gperftools 2.7rc is out!

Changes:

  • Most notable change in this release is that very large allocations (>1MiB) are now handled be O(log n) implementation. This is contributed by Todd Lipcon based on earlier work by Aliaksei Kandratsenka and James Golick. Special thanks to Alexey Serbin for contributing OSX fix for that commit.

  • detection of sized deallocation support is improved. Which should fix another set of issues building on OSX. Much thanks to Alexey Serbin for reporting the issue, suggesting a fix and verifying it.

  • Todd Lipcon made a change to extend page heaps freelists to 1 MiB (up from 1MiB - 8KiB). This may help a little for some workloads.

  • Ishan Arora contributed typo fix to docs

gperftools - gperftools-2.6.3

Published by alk almost 7 years ago

gperftools 2.6.3 is out!

Just two fixes were made in this release:

  • Stephan Zuercher has contributed a build fix for some recent XCode versions. See issue #942 for more details.

  • assertion failure on some windows builds introduced by 2.6.2 was fixed. Thanks to github user nkeemik for reporting it and testing fix. See issue #944 for more details.

gperftools - gperftools-2.6.2

Published by alk almost 7 years ago

gperftools 2.6.2 is out!

Most notable change is recently added support for C++17 over-aligned allocation operators contributed by Andrey Semashev. I've extended his implementation to have roughly same performance as malloc/new. This release also has native support for C11 aligned_alloc.

Rest is mostly bug fixes:

  • Jianbo Yang has contributed a fix for potentially severe data raceintroduced by malloc fast-path work in gperftools 2.6. This race could cause occasional violation of total thread cache size constraint. See issue #929 for more details.

  • Correct behavior in out-of-memory condition in fast-path cases was restored. This was another bug introduced by fast-path optimization in gperftools 2.6 which caused operator new to silently return NULL instead of doing correct C++ OOM handling (calling new_handler and throwing bad_alloc).

  • Khem Raj has contributed couple build fixes for newer glibcs (ucontext_t vs struct ucontext and loff_t definition)

  • Piotr Sikora has contributed build fix for OSX (not building unwind benchmark). This was issue #910 (thanks to Yuriy Solovyov for reporting it).

  • Dorin Lazăr has contributed fix for compiler warning

  • issue #912 (occasional deadlocking calling getenv too early on windows) was fixed. Thanks to github user shangcangriluo for reporting it.

  • Couple earlier lsan-related commits still causing occasional issues linking on OSX has been reverted. See issue #901.

  • Volodimir Krylov has contributed GetProgramInvocationName for FreeBSD

  • changsu lee has contributed couple minor correctness fixes (missing va_end() and missing free() call in rarely executed Symbolize path)

  • Andrew C. Morrow has contributed some more page heap stats. See issue #935.

  • some cases of built-time warnings from various gcc/clang versions about throw() declarations have been fixes.

gperftools - gperftools-2.6.1

Published by alk over 7 years ago

gperftools 2.6.1 is out! This is mostly bug-fixes release.

  • issue #901: build issue on OSX introduced in last-time commit in 2.6 was fixed (contributed by Francis Ricci).

  • tcmalloc_minimal now works on 32-bit ABI of mips64. This is issue #845. Much thanks to Adhemerval Zanella and github user mtone.

  • Romain Geissler contributed build fix for -std=c++17. This is pull request #897.

  • As part of fixing issue #904, tcmalloc atfork handler is now installed early. This should fix slight chance of hitting deadlocks at fork in some cases.

gperftools - gperftools-2.6

Published by alk over 7 years ago

gperftools 2.6 is out! See NEWS entries of pre-releases for major new features.

  • Kim Gräsman contributed documentation update for HEAPPROFILESIGNAL environment variable

  • KernelMaker contributed fix for population of min_object_size field returned by MallocExtension::GetFreeListSizes

  • commit 8c3dc52fcfe0 "issue-654: [pprof] handle split text segments" was reverted. Some OSX users reported issues with this commit. Given our pprof implementation is strongly deprecated, it is best to drop recently introduced features rather than breaking it badly.

  • Francis Ricci contributed improvement for interaction with leak sanitizer

gperftools - gperftools-2.5.93

Published by alk over 7 years ago

gperftools 2.6rc4 is out!

Dynamic sized delete is disabled by default again. There is no hope of
it working with eager dynamic symbols resolution (-z now linker
flag). More details in
https://bugzilla.redhat.com/show_bug.cgi?id=1452813