diff options
| author | DJ Delorie <dj@delorie.com> | 2016-07-11 20:50:34 -0400 |
|---|---|---|
| committer | DJ Delorie <dj@delorie.com> | 2016-07-12 22:00:44 -0400 |
| commit | b856f645a2f58a3e224976167b4b1fb030d7967b (patch) | |
| tree | c15f3ce4b4d8b2f99babaae0481c601786eb452a /malloc/Makefile | |
| parent | e4cff5fd83963c426e3015d3595dfc69a63f1aca (diff) | |
| download | glibc-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/Makefile')
| -rw-r--r-- | malloc/Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/malloc/Makefile b/malloc/Makefile index 30248e47da..4146c2a9b4 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -50,13 +50,22 @@ libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) libmtracectl-routines = mtrace-ctl libmtracectl-inhibit-o = $(filter-out .os,$(object-suffixes)) -others: $(objpfx)trace_run -install-bin = trace_run -install-bin-script = trace2dat +others: $(objpfx)trace_run $(objpfx)trace2wl +install-bin = trace_run trace2wl $(objpfx)trace_run: $(objpfx)trace_run.o $(LINK.o) -o $@ $(objpfx)trace_run.o -lpthread +ifeq (${CXX},) +CXX = g++ +endif + +$(objpfx)trace2wl: $(objpfx)trace2wl.o + $(CXX) -g -std=gnu++11 -o $@ $(objpfx)trace2wl.o + +$(objpfx)trace2wl.o: trace2wl.cc + $(CXX) $(CXXFLAGS) -g -o $@ -c $< $(compile-mkdep-flags) -std=gnu++11 + $(objpfx)tst-malloc-backtrace: $(shared-thread-library) $(objpfx)tst-malloc-thread-exit: $(shared-thread-library) $(objpfx)tst-malloc-thread-fail: $(shared-thread-library) @@ -154,9 +163,6 @@ tst-malloc-usable-ENV = MALLOC_CHECK_=3 sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') -$(objpfx)trace2dat: trace2dat - cp $^ $@ && chmod +x $@ - $(objpfx)mtrace: mtrace.pl rm -f $@.new sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \ |
