aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md45
-rwxr-xr-xchattyparser.py2
2 files changed, 46 insertions, 1 deletions
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 <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 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",