aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-26cleanup Android.mkHEADmasterSatish Patel
- added -lm to LDLIBS - removed unwanted lines, which are commented - removed -lm and -llog for WHOLE_STATIC_LIST: This is to remove cross dependency while used a default malloc with libc Signed-off-by: Satish Patel <satish.patel@linaro.org>
2016-06-24Build Fix: Added config.h and tcmalloc.hSatish Patel
Files were added to .gitignore so missed while taking chromium port for android. They are removed from .gitignore and added back to tree
2016-06-24updated gitignore file to fix build error for tcmallocSatish Patel
config.h and tcmalloc.h - required for tcmalloc build. They were in .gitignore file, hence removed from it to fix build. Note: .gitignore file would have missed while taking chromium changes.
2016-04-26tcmalloc: chromium portSatish Patel
Ported chromium port of gperftool. The port has all necessary changes for android platform. Details can be tracked at https://chromium.googlesource.com/chromium/src/third_party/tcmalloc/chromium/ e.g. - atomic operations for linux - property based configurations porting using system property for Android case (reading environment variables at startup) - change in config.h as per Android platform - c++11 fixes - Fixed gcc errors/warnings - logging changes as per android log libarary - time calculation and abort call to tcmalloc (For linux)
2016-04-18Add flag to build benchmark toolSatish Patel
Add 'ENABLE_GPERF_BENCHMARK' flag to build benchmark tool. This is to avoid, multiple builds of same module. As tools is also included as a part of common malloc-benchmarks
2016-04-12benchmark: add support for binary trees benchmarkSatish Patel
Adds support to generate "gperftools_benchmark_binarytrees" for binary trees benchmark Signed-off-by: Satish Patel <satish.patel@linaro.org>
2016-04-11malloc benchmark: add touch memSatish Patel
By default memory in linux will not be allocated unless it is accessed/touched. So to run the test effectively, after every malloc code is added to touch allocated space Note: We are trying to touch all pages, it might make a difference to final score, but should be ok, when we run the same test with other implementations and compare Signed-off-by: Satish Patel <satish.patel@linaro.org>
2016-04-11benchmark: Add build support for AndroidSatish Patel
Add Android.mk (build configurations) to generate "gperftools_benchmark_malloc" - tests for malloc implemenations Signed-off-by: Satish Patel <satish.patel@linaro.org>
2016-04-09Use initial-exec tls for libunwind's recursion flagAliaksey Kandratsenka
If we don't do it, then reading variable calls to __tls_get_addr, which uses malloc on first call. initial-exec makes dynamic linker reserve tls offset for recusion flag early and thus avoid unsafe calls to malloc. This fixes issue #786.
2016-03-31gerftools -> gperftools in readmeMike Gaffney
2016-03-20added define to enable MADV_FREE usage on LinuxAliaksey Kandratsenka
Building with -DTCMALLOC_USE_MADV_FREE will enable usage of MADV_FREE on Linux if glibc copy of kernel headers has MADV_FREE defined. I.e. so that people can test this more easily. Affects ticket #780.
2016-03-16Don't use MADV_FREE on LinuxMathias Stearn
Addresses #780.
2016-03-14Fix symbol resolution on OSXAman Gupta
The library mapping ranges on OSX and Linux are sorted in opposite orders 7f71c3323000-7f71c3339000 r-xp 00000000 09:02 29099128 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 7f71c3339000-7f71c3538000 ---p 00016000 09:02 29099128 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 7f71c3538000-7f71c3539000 r--p 00015000 09:02 29099128 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 7f71c3539000-7f71c353a000 rw-p 00016000 09:02 29099128 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 vs 108f8d000-108f95000 r-xp 00025000 00:00 0 /usr/local/opt/libmemcached/lib/libmemcached.11.dylib 108f8c000-108f8d000 r-xp 00024000 00:00 0 /usr/local/opt/libmemcached/lib/libmemcached.11.dylib 108f68000-108f8c000 r-xp 00000000 00:00 0 /usr/local/opt/libmemcached/lib/libmemcached.11.dylib
2016-03-13added simple .travis.yml configAliaksey Kandratsenka
2016-03-12Recognize modern Linux ARMBrian Silverman
Commit e580d7888154fa7f95b3cef9e18f1ce69182212b fixed the macros in some of the code but not other places. `make check` still fails in the same places on a Debian Jessie armhf system.
2016-03-12bumped version up to 2.5Aliaksey Kandratsenka
2016-03-12Unbreak profiling with CPUPROFILE_FREQUENCY=1Aliaksey Kandratsenka
This closes ticket #777. No test sadly, since it's not trivial to unittest this case. But fix with single-shot manual testing is better than nothing.
2016-03-05bumped version to 2.4.91 for 2.5rc2Aliaksey Kandratsenka
2016-03-05build sized delete aliases even when sized-delete is disabledAliaksey Kandratsenka
In this case we alias to regular delete. This is helpful because if we don't override sized delete, then apps will call version in libstdc++ which delegates calls to regular delete, which is slower than calling regular delete directly.
2016-03-05disable dynamic sized delete support by defaultAliaksey Kandratsenka
IFUNC relocations don't support our advanced use case (calling application function or looking up environment variable). Particularly, it doesn't work on PPC and arm when tcmalloc is linked with -Wl,-z,now. See RedHat's bugzilla ticket https://bugzilla.redhat.com/show_bug.cgi?id=1312462 for more details.
2016-03-05unbreak compilation with visual studioAliaksey Kandratsenka
Specifically, this commit adds missing fake_stacktrace_scope.cc to msvc build and removes undef-ing of PERFTOOLS_DLL_DECL by tcmalloc.h.
2016-03-05Call function pointers with the right typeBrian Silverman
I think it's undefined behavior, but it's definitely weird. ubsan complains too.
2016-03-01Don't shift a type by more than its widthBrian Silverman
It's undefined behavior, so ubsan complains.
2016-03-01Initialize counters in testBrian Silverman
2016-03-01Don't overflow a signed integerBrian Silverman
It's undefined behavior and ubsan catches it.
2016-02-29added minimal "header section" to READMEAliaksey Kandratsenka
2016-02-21bumped version to 2.5rcAliaksey Kandratsenka
2016-02-21updated NEWS for 2.5rcAliaksey Kandratsenka
2016-02-21alias same malloc/free variants to their canonical versionsAliaksey Kandratsenka
This is similar to what gcc 5 does anyways, except gcc 5 is placing jumps which adds a bit of overhead. Instead of letting gcc do it, we alias using ELF symbol aliasing. All free variants (tc_delete{,array}_{,nothrow}) are aliased to tc_free. There are 3 malloc variants that differ by oom handling. tc_newarray is aliased to tc_new. And tc_newarray_nothrow is aliased to tc_new_nothrow. This aliasing only happens in non-debug malloc, since debug malloc does distinguish between different variants since it needs checking for mismatch.
2016-02-21Re-enable MultipleIdleNonIdlePhases testAliaksey Kandratsenka
Which was accidentally removed as part of MarkThreadTemporarilyIdle support.
2016-02-21added maybe_emergency_malloc.h to Makefile.amAliaksey Kandratsenka
Because without this reference it isn't packaged by make dist.
2016-02-21don't round up sizes for large allocation when samplingAliaksey Kandratsenka
This closes #723. Since rounding up prior to sampling is introducing possibility of arithmetic overflow, we're just not doing it. It introduces some error (up to 4k), but since we're dealing with at least 256k allocations, we're fine.
2016-02-21enable emergency malloc by default on arm when using libunwindAliaksey Kandratsenka
Because by default libunwind on arm does fopen which mallocs which will deadlock unless we enable emergency malloc.
2016-02-21implemented emergency mallocAliaksey Kandratsenka
Emergency malloc is enabled for cases when backtrace capturing needs to call malloc. In this case, we enable emergency malloc just prior to calling such code and disable it after it is done.
2016-02-20replaced invalid uses of __THROWAliaksey Kandratsenka
We're now using it only when overriding glibc functions (such as malloc or mmap). In other cases (most importantly in public tcmalloc.h header) we're doing our own throw() to avoid possible breakage on future glibc changes.
2016-02-20unbreak <malloc.h> inclusion in gperftools/tcmalloc.hAliaksey Kandratsenka
We have shipped header which checked HAVE_XXX defines which we only defined in project-local config.h. So it could never work correctly. We're now doing #include <malloc.h> just like tc_mallinfo on constant which we detect at configure time and write into header that we install.
2016-02-20drop detection of sys/malloc.h and malloc/malloc.hAliaksey Kandratsenka
Which we don't really need.
2016-02-20Fix several harmless clang warningsAliaksey Kandratsenka
2016-02-20implemented stacktrace capturing via libgcc's C++ ABI functionAliaksey Kandratsenka
Particularly _Unwind_Backtrace which seems to be gcc extension. This is what glibc's backtrace is commonly is using. Using _Unwind_Backtrace directly is better than glibc's backtrace, since it doesn't call into dlopen. While glibc does dlopen when it is built as shared library apparently to avoid link-time dependency on libgcc_s.so
2016-02-20force profiler_unittest to do 'real' workAliaksey Kandratsenka
'XOR loop' in profiler unittest wasn't 100% effective because it allowed compiler to avoid loading and storing to memory. After marking result variable as volatile, we're now forcing compiler to read and write memory, slowing this loops down sufficiently. And profiler_unittest is now passing more consistently. Closes #628
2016-02-06Extend low-level allocator to support custom pages allocatorAliaksey Kandratsenka
2016-02-06added malloc_bench_shared_fullAliaksey Kandratsenka
2016-02-06always use real throw() on operators new/deleteAliaksey Kandratsenka
Since non-glibc-s have no __THROW and lack of throw() on operators gives us warning.
2016-02-06Detect working ifunc before enabling dynamic sized delete supportAliaksey Kandratsenka
Particularly, on arm-linux and x86-64-debian-kfreebsd compilation fails due to lack of support for ifunc. So it is necessary to test at configure time whether ifunc is supported.
2016-02-06include unistd.h for getpid in thread_lister.cAliaksey Kandratsenka
This fixes warning produced on arm-linux.
2016-02-04Add support for Linux s390xBryan Chan
This resolves gperftools/gperftools#761.
2016-02-04Fix typo in heap-checker-death_unittest.shBryan Chan
2016-01-29Fix include of malloc_hook_c.h in malloc_hook.hSimon Que
malloc_hook.h includes malloc_hook_c.h as <gperftools/malloc_hook_c.h>. This requires the compiler to have designated src/gperftools as a standard include directory (-I), which may not always be the case. Instead, include it as "malloc_hook_c.h", which will search in the same directory first. This will always work, regardless of whether it was designated a standard include directory.
2016-01-26Add support for obtaining cache size of the current thread and softer idlingAndrew Morrow
2016-01-26Don't always arm the profiling timer.Brian Silverman
It causes a noticeable performance hit and can sometimes confuse GDB. Tested with CPUPROFILE_PER_THREAD_TIMERS=1. Based on an old version by mnissler@google.com.