Age | Commit message (Collapse) | Author |
|
- 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>
|
|
Files were added to .gitignore so missed while taking chromium port for
android. They are removed from .gitignore and added back to tree
|
|
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.
|
|
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)
|
|
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
|
|
Adds support to generate "gperftools_benchmark_binarytrees" for binary trees
benchmark
Signed-off-by: Satish Patel <satish.patel@linaro.org>
|
|
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>
|
|
Add Android.mk (build configurations) to generate
"gperftools_benchmark_malloc" - tests for malloc implemenations
Signed-off-by: Satish Patel <satish.patel@linaro.org>
|
|
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.
|
|
|
|
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.
|
|
Addresses #780.
|
|
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
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
Specifically, this commit adds missing fake_stacktrace_scope.cc to msvc
build and removes undef-ing of PERFTOOLS_DLL_DECL by tcmalloc.h.
|
|
I think it's undefined behavior, but it's definitely weird. ubsan
complains too.
|
|
It's undefined behavior, so ubsan complains.
|
|
|
|
It's undefined behavior and ubsan catches it.
|
|
|
|
|
|
|
|
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.
|
|
Which was accidentally removed as part of MarkThreadTemporarilyIdle
support.
|
|
Because without this reference it isn't packaged by make dist.
|
|
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.
|
|
Because by default libunwind on arm does fopen which mallocs which will
deadlock unless we enable emergency malloc.
|
|
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.
|
|
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.
|
|
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.
|
|
Which we don't really need.
|
|
|
|
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
|
|
'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
|
|
|
|
|
|
Since non-glibc-s have no __THROW and lack of throw() on operators gives
us warning.
|
|
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.
|
|
This fixes warning produced on arm-linux.
|
|
This resolves gperftools/gperftools#761.
|
|
|
|
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.
|
|
|
|
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.
|