summaryrefslogtreecommitdiff
path: root/util/malloc-stats.c
Commit message (Collapse)AuthorAgeFilesLines
* [malloc-stats] Measure callocBehdad Esfahbod2023-01-261-0/+22
|
* [malloc-stats] Fix to not crashBehdad Esfahbod2022-12-301-1/+9
| | | | Can't use constructor as malloc might be called before that.
* Fix warningAdrian Johnson2022-03-091-1/+1
| | | | ../util/malloc-stats.c:295:1: warning: no previous declaration for ‘malloc_stats’ [-Wmissing-declarations]
* Replace deprecated malloc_hookAdrian Johnson2022-03-091-57/+35
|
* test and util: maintain consistency in the usage of ARRAY_LENGTH macroRavi Nanjundappa2014-04-301-4/+5
| | | | | | | | | | ARRAY_LENGTH macro is used in perf's cairo-perf.h, src's cairoint.h, test's cairo-test.h and in some internal header files of util's directory.So to maintain consistency ARRAY_SIZE is replaced with ARRAY_LENGTH macro. Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* Fix malloc-stats for newer glibcBehdad Esfahbod2012-09-221-1/+1
|
* [util/malloc-stats] Use tighter spacing.Behdad Esfahbod2012-09-171-3/+3
|
* [utils] Remove unused codeBehdad Esfahbod2009-08-101-30/+0
|
* [util/malloc-stats] Do a single backtrace_symbols() callBehdad Esfahbod2009-01-311-8/+50
| | | | I was hoping that this may speed things up, but it didn't. :(
* [util] Fix memset bug in malloc-statsBehdad Esfahbod2009-01-311-5/+4
|
* [util] Use a hash-table for malloc-stats.Chris Wilson2009-01-301-47/+103
| | | | | | At Behdad's request, convert the array of allocators into a simple hash table (large static number of buckets + chaining) in order to speed up malloc profiling.
* [util/malloc-stats.c] Add a public function malloc_stats()Behdad Esfahbod2007-12-101-3/+2
| | | | | | | | | Apparently glibc already provides the function: void malloc_stats (void); So, like we do for backtrace_symbols(), override the public symbol. It still is defined as __destructor__ and runs at program finalization.
* Clear executable flag off .c fileBehdad Esfahbod2007-07-261-0/+0
|
* [util] Import my malloc wrapper that prints simple statisticsBehdad Esfahbod2007-04-211-0/+301
To build, do: make malloc-stats.so inside util/, and to use, run: LD_PRELOAD=malloc-stats.so some-program For binaries managed by libtool, eg, cairo-perf, do: ../libtool --mode=execute /bin/true ./cairo-perf LD_PRELOAD="../util/malloc-stats.so" .libs/lt-cairo-perf The code also includes Jeff Muizelaar's libbacktracesymbols that is a much better implementation of backtrace_symbols() than what is provided by glibc. That can be built by: make backtrace-symbols.so