blob: 32f1c14391d83c13bea2c99217a31929196bb492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# chattymalloc - a high-performance shared library based malloc tracer
## Dependencies
* meson
* (clang-format, clang-tidy, yapf)
## Compilation
Clone the repository.
`git clone https://muhq.space/software/chattymalloc.git`
Build chattymalloc by running `make` in the repository root.
## Usage
chattymalloc is designed to be used with the LD_PRELOAD mechanism.
It hooks the memory allocator API and saves each allocator call and its result
to a memory mapped binary file, called chattymalloc.trace, which will be stored to the current directory.
`env LD_PRELOAD=/path/to/libchattymalloc.so <your-binary>`
The resulting binary trace file can be parsed and the results plotted using
chattyparser.py.
# chattyparser - a parser and plotter for chattymalloc trace files
chattyparser parses a trace file, detects allocator and application misbehavior,
like double frees, produces a plain text trace, a histogram and a memory profile.
## Usage
usage: chattyparser.py [-h] [--alignment ALIGNMENT ALIGNMENT] [--txt] [-v]
[--license]
trace
parse and analyze chattymalloc traces
positional arguments:
trace binary trace file created by chattymalloc
optional arguments:
-h, --help show this help message and exit
--alignment ALIGNMENT ALIGNMENT
export to plain text format
--txt export to plain text format
-v, --verbose more output
--license print license info and exit
|