From 587da35f86cf4906571af747f4da9f1439430173 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 4 May 2020 11:25:39 +0200 Subject: add simple README --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ chattyparser.py | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5031f49 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# chattymalloc - a shared library to trace memory allocators + +## Dependencies + +* meson +* (clang-format, clang-tidy) + +## Compilation + +Clone the repository and run `make`. + +## 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 which will be stored to the current directory +with the name `chattymalloc.trace`. + +`env LD_PRELOAD=/path/to/libchattymalloc.so ` + +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 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 diff --git a/chattyparser.py b/chattyparser.py index 357f0c9..c51e2bc 100755 --- a/chattyparser.py +++ b/chattyparser.py @@ -394,7 +394,7 @@ if __name__ == "__main__": ) sys.exit(0) - parser = argparse.ArgumentParser(description="parse and analyse chattymalloc traces") + parser = argparse.ArgumentParser(description="parse and analyze chattymalloc traces") parser.add_argument("trace", help="binary trace file created by chattymalloc") parser.add_argument("--alignment", -- cgit v1.2.3