aboutsummaryrefslogtreecommitdiff
path: root/malloc/trace_run.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2016-07-11 20:50:34 -0400
committerDJ Delorie <dj@delorie.com>2016-07-12 22:00:44 -0400
commitb856f645a2f58a3e224976167b4b1fb030d7967b (patch)
treec15f3ce4b4d8b2f99babaae0481c601786eb452a /malloc/trace_run.c
parente4cff5fd83963c426e3015d3595dfc69a63f1aca (diff)
downloadglibc-b856f645a2f58a3e224976167b4b1fb030d7967b.tar.xz
glibc-b856f645a2f58a3e224976167b4b1fb030d7967b.zip
Update to new binary file-based trace file.
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.
Diffstat (limited to 'malloc/trace_run.c')
-rw-r--r--malloc/trace_run.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/malloc/trace_run.c b/malloc/trace_run.c
index a4e16ba4e8..a42e81d80f 100644
--- a/malloc/trace_run.c
+++ b/malloc/trace_run.c
@@ -11,20 +11,7 @@
#include <fcntl.h>
#include "malloc.h"
-
-/* These must stay in sync with trace2dat */
-#define C_NOP 0
-#define C_DONE 1
-#define C_MALLOC 2
-#define C_CALLOC 3
-#define C_REALLOC 4
-#define C_FREE 5
-#define C_SYNC_W 6
-#define C_SYNC_R 7
-#define C_ALLOC_PTRS 8
-#define C_ALLOC_SYNCS 9
-#define C_NTHREADS 10
-#define C_START_THREAD 11
+#include "mtrace.h"
#if UINTPTR_MAX == 0xffffffffffffffff