Commits
master
Name already in use
Commits on Aug 24, 2023
-
-
don't build mmap_hook when --enable-minimal is given to configure
Refers to github issue #1418
Commits on Aug 22, 2023
Commits on Aug 15, 2023
Commits on Aug 11, 2023
-
Add MPICH HPC environment detection
Default MPICH builds use the Hydra process manager (mpiexec) which sets PMI_RANK in the application environment. Update GetUniquePathFromEnv() test accordingly. Signed-off-by: Ken Raffenetti <raffenet@mcs.anl.gov>
Commits on Aug 10, 2023
-
heap-checker: unbreak PTRACE_GETREGS detection on older Linux-es
This unbreaks RHEL6.
-
This unbreaks building on older Linux distros. We missed this at 46d3315 when dropped maybe_thread stuff, since libprofiler indeed uses pthread, and because on newer libc-s pthread stuff is now part of regular libc.so. I am also dropping bogus LIBPROFILER stuff referring to some rpath badness. Unsure what it was, maybe way back we did libstacktrace as a proper libtool library, so maybe something was needed. But it is just a convenience archive this days, so we don't really need to add it everywhere libprofiler.la is linked.
-
make sure that ListerThread runs on properly aligned stack
Without this fix we're failing unit tests on ubuntu 18.04 and centos 7 and 6. It looks like clone() in old glibc-s doesn't align stack, so lets handle it ourselves. How we didn't hit this much earlier (before massive thread listing refactoring), I am not sure. Most likely pure luck(?)
Commits on Aug 9, 2023
-
massage latest GetUniquePathFromEnv changes
This fixes a number of minor bits (like build details) as well as making overall code style similar to what we're doing elsewhere.
Commits on Aug 8, 2023
-
Add unit test for GetUniquePathFromEnv()
Signed-off-by: Artem Polyakov <artpol84@gmail.com>
-
Advanced UniquePathFromEnv generation
* Add support for known HPC environments (TODO: needs to be extended with more nevironments) * Added the "CPUPROFILE_USE_PID" environment variable to force appending PID for the non-covered environments * Preserve the old way of handling the Child-Parent case Signed-off-by: Artem Polyakov <artpol84@gmail.com>
Commits on Aug 6, 2023
-
It actually found real (but arguably minor) issue with memory region map locking. As part of that we're replacing PageHeap::DeleteAndUnlock that had somewhat ambitious 'move' of SpinLockHolder, with more straightforward PageHeap::PrepareAndDelete. Doesn't look like we can support move thingy with thread annotations.
Commits on Aug 1, 2023
Commits on Jul 31, 2023
-
unbreak MallocExtension::GetAllocatedSize() for debug allocator
Some years back we fixed memalign vs realloc bug, but we preserved 'wrong' malloc_size/GetAllocatedSize implementation for debug allocator. This commit refactors old code making sure we always use right data_size and it fixes GetAllocatedSize. We update our unittest accordingly. Closes #738
-
-
-
-
remove obsolete references to code.google.com
I.e. somehow we managed to still point to (very) old gperftools hosting location, so lets fix it at last.
-
-
undo MarkThreadTemporarilyIdle and make it same as MarkThreadIdle
As noted on github issue #880 'temporarily' thing saves us not just on freeing thread cache, but also returning thread's share of thread cache (max_size_) into common pool. And the later has caused trouble to mongo folk who originally proposed 'temporarily' thing. They claim they don't use it anymore. And thus with no users and no clear benefit, it makes no sense for us to keep this API. For API and ABI compat sake we keep it, but it is now identical to regular MarkThreadIdle. Fixes issue #880
-
dont workaround unknown problem in thread_dealloc_unittest
We had some sleep added at the end up thread dealloc unittest claiming some race trouble with glibc. Which is likely years or even decades irrelevant.
Commits on Jul 27, 2023
-
[win32:patching] define single empty __expand replacement
This unbreaks some cases where patching complains about too short functions to patch. What happens is we first locate one of CRT-s (like ucrt or msvcrt) and patch __expand there, redirecting to our implementation. Then "static" __expand replacement is patched, but it is usually imported from that same C runtime DLL. And through several jmp redirections we end up at our own __expand from libc<1>. Patching that (and other cases) is wrong, but I am unsure how to fix it properly. So we do most simple workaround. I found that when it not fails is either in debug builds where empty expand is not too short or when MSVC deduplicates multiple identical __expand implementations into single function, or when 64-bit patching has to do extra trampoline thingy. And then our patching code checks if we're trying to replace some function with itself. So we "just" take advantage of that and get immediate issue fixed, while punting on more general "duplicate" patching for later. Update github issue #667
-
[mingw] dont add libstacktrace to libtcmalloc_minimal
There was this piece of makefile with indention to add stack tracing functionality (for stuff like growthz, GetCallerStackTrace and probably heap sampling) to work even in minimal configuration on mingw. What is odd is we fail to actually define libstacktrace.la target on mingw, since libstacktrace.la requires WITH_STACK_TRACE automake conditional which we don't enable on this platform. And yet somehow it doesn't fail. It produces empty libstacktrace.la, so build kinda works. Except at least on my machine it produces racy makefiles. So lets not pretend and stop breaking our parallel builds.
-
Commits on Jul 25, 2023
-
don't return raw span when sampling and stacktrace oomed
This is nearly impossible in practice, but still. Somehow we missed this logic that DoSampledAllocation always returns actual object, but in that condition where stacktrace_allocator failed to get us StackTrace object we ended up returning span instead of it's object.
-
capture growthz backtraces outside of pageheap_lock
Actual growthz list is now lockless since we never delete anything from it. And we now pass special 'locking context' object down page heap allocation path, both as a documentation that it is under lock and for tracking whether we needed to grow heap and by how much. Then whenever lock is released in RAII fashion, we're able to trigger growthz recording outside of lock. Closes #1159
-
move page heap locking under PageHeap
While there is still plenty of code that takes pageheap_lock outside of page_heap module for all kinds of reasons, at least bread-and-butter logic of allocating/deallocating larger chunks of memory is now handling page heap locking inside PageHeap itself. This gives us flexibility. Update issue #1159
-
handle large alloc reporting locklessly
Which simplifies codes a bit. Update issue #1159
-
correctly release memory when system's pagesize is >kPageSize
I.e. this covers case of arms that by default compile tcmalloc for 8k logical pages (assuming 4k system pages), but can actually run on systems with 64k pages. Closes #1135
-
-
unbreak large heap fragmentation unittest
Smart compilers again (and lack of -fno-builtin-malloc which we dropped because of clang).
-
Otherwise we cannot use some std bits, like numeric_limits.
Commits on Jul 23, 2023
-
add --enable-libgcc-unwinder-by-default for configure
We want distros to ship gperftools with this options, now that they have _Unwind_Backtrace that is powered by dl_find_object.