| Age | Commit message (Collapse) | Author | Files | Lines |
|
In order to not lose records, or need to guess ahead of time how
many records you need, this switches to a mmap'd file for the trace
buffer, and grows it as needed.
The trace2dat perl script is replaced with a trace2wl C++ program
that runs a lot faster and can handle the binary format.
|
|
Expand the comments in mtrace-ctl.c to better explain how to use
this tracing controller. The new docs assume the SO is built
and installed.
Build fixed for trace_run.c
Additional build pedantry to let trace_run.c be built with more
warnings/errors turned on.
Build/install trace_run and trace2dat
trace2dat takes dump files from mtrace-ctl.so and turns them into
mmap'able data files for trace_run, which "plays back" the logged
calls.
32-bit compatibility
Redesign tcache macros to account for differences between 64 and
32 bit systems.
|
|
Update Makefiles to build libmtracectl.so
Tweak mtrace-ctl.c to avoid compiler warnings.
|
|
|
|
Add hooks to pvalloc and calloc
Add path flag for when a call is handled via a hook function
|
|
Change head pointer to be total calls; adjust users to modulo after
incrementing.
Use mmap() instead of sbrk().
Split environment variables so count and file can be specified.
Export trace hooks so mtrace-ctl can be built against libc.so.
Allow NULL to be passed to __mtrace_get_trace_buffer.
Add some error handling to mtrace-ctl.
|
|
First attempt at a low-overhead tracing feature. To enable, you
build mtrace-ctl.c into a .so and LD_PRELOAD it. That uses a
private API to set up a trace buffer, and calls to malloc et all
fill in records in the trace buffer. At program exit, mtrace-ctl
reads the buffer and stores the data on disk.
Internally, the only contention point is the atomic update of the
buffer head pointer. Once aquired, each thread fills in its
record without needing locks.
|