From: Philippe Proulx Date: Tue, 12 Apr 2016 21:20:38 +0000 (-0400) Subject: barectf-tracepoint ex: rename "barectf" -> "barectf-linux-fs" X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d2a238e3fd57fce7ff94bb2429502ad69383f30a;p=deliverable%2Fbarectf.git barectf-tracepoint ex: rename "barectf" -> "barectf-linux-fs" Signed-off-by: Philippe Proulx --- diff --git a/doc/examples/barectf-tracepoint/Makefile b/doc/examples/barectf-tracepoint/Makefile index 0574b05..e7aa25f 100644 --- a/doc/examples/barectf-tracepoint/Makefile +++ b/doc/examples/barectf-tracepoint/Makefile @@ -1,9 +1,9 @@ .PHONY: all clean all: - make -f Makefile.barectf + make -f Makefile.barectf-linux-fs make -f Makefile.lttng-ust clean: - make -f Makefile.barectf clean + make -f Makefile.barectf-linux-fs clean make -f Makefile.lttng-ust clean diff --git a/doc/examples/barectf-tracepoint/Makefile.barectf b/doc/examples/barectf-tracepoint/Makefile.barectf deleted file mode 100644 index af1f972..0000000 --- a/doc/examples/barectf-tracepoint/Makefile.barectf +++ /dev/null @@ -1,36 +0,0 @@ -BARECTF ?= barectf -RM = rm -rf -MKDIR = mkdir - -PLATFORM_DIR = ../../../platforms/linux-fs -EXTRA_DIR = ../../../extra -CFLAGS = -O2 -Wall -pedantic -std=gnu99 -I$(PLATFORM_DIR) -I$(EXTRA_DIR) -I. - -TARGET = barectf-tracepoint-barectf -OBJS = $(TARGET).o barectf.o barectf-platform-linux-fs.o - -.PHONY: all clean - -all: $(TARGET) - -ctf: - $(MKDIR) ctf - -$(TARGET): $(OBJS) - $(CC) -o $@ $^ - -ctf/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml ctf - $(BARECTF) $< -m ctf - -barectf.o: barectf.c - $(CC) $(CFLAGS) -c $< - -barectf-platform-linux-fs.o: $(PLATFORM_DIR)/barectf-platform-linux-fs.c - $(CC) $(CFLAGS) -c $< - -$(TARGET).o: barectf-tracepoint.c barectf-tracepoint-linux-fs.h barectf.h barectf-bitfield.h - $(CC) -o $@ $(CFLAGS) -c $< - -clean: - $(RM) $(TARGET) $(OBJS) ctf - $(RM) barectf.h barectf-bitfield.h barectf.c diff --git a/doc/examples/barectf-tracepoint/Makefile.barectf-linux-fs b/doc/examples/barectf-tracepoint/Makefile.barectf-linux-fs new file mode 100644 index 0000000..d3cc836 --- /dev/null +++ b/doc/examples/barectf-tracepoint/Makefile.barectf-linux-fs @@ -0,0 +1,38 @@ +BARECTF ?= barectf +RM = rm -rf +MKDIR = mkdir -p + +PLATFORM_DIR = ../../../platforms/linux-fs +EXTRA_DIR = ../../../extra +CFLAGS = -O2 -Wall -pedantic -std=gnu99 -I$(PLATFORM_DIR) -I$(EXTRA_DIR) -I. + +VERSION = linux-fs +TARGET = barectf-tracepoint-barectf-$(VERSION) +OBJS = $(TARGET).o barectf-$(VERSION).o barectf-platform-linux-fs.o +TRACEDIR = ctf-$(VERSION) + +.PHONY: all clean + +all: $(TARGET) + +$(TRACEDIR): + $(MKDIR) $@ + +$(TARGET): $(OBJS) + $(CC) -o $@ $^ + +$(TRACEDIR)/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml $(TRACEDIR) + $(BARECTF) $< -m $(TRACEDIR) + +barectf-$(VERSION).o: barectf.c + $(CC) -o $@ $(CFLAGS) -c $< + +barectf-platform-linux-fs.o: $(PLATFORM_DIR)/barectf-platform-linux-fs.c + $(CC) $(CFLAGS) -c $< + +$(TARGET).o: barectf-tracepoint.c barectf-tracepoint-$(VERSION).h barectf.h barectf-bitfield.h + $(CC) -o $@ $(CFLAGS) -c $< + +clean: + $(RM) $(TARGET) $(OBJS) $(TRACEDIR) + $(RM) barectf.h barectf-bitfield.h barectf.c diff --git a/doc/examples/barectf-tracepoint/README.md b/doc/examples/barectf-tracepoint/README.md index c26a2a9..ba5a9a9 100644 --- a/doc/examples/barectf-tracepoint/README.md +++ b/doc/examples/barectf-tracepoint/README.md @@ -18,7 +18,7 @@ installed, and do: To build only the example using barectf: - make -f Makefile.barectf + make -f Makefile.barectf-linux-fs To build only the example using LTTng-UST: @@ -29,14 +29,14 @@ To build only the example using LTTng-UST: Run this example: - ./barectf-tracepoint-barectf + ./barectf-tracepoint-barectf-linux-fs -The complete CTF trace is written to the `ctf` directory. +The complete CTF trace is written to the `ctf-linux-fs` directory. You may run the example with any arguments; they will be recorded, as string fields in the events of the binary stream, e.g.: - ./barectf-tracepoint-barectf this argument and this one will be recorded + ./barectf-tracepoint-barectf-linux-fs this argument and this one will be recorded ## LTTng-UST tracing diff --git a/doc/examples/barectf-tracepoint/barectf-tracepoint-linux-fs.h b/doc/examples/barectf-tracepoint/barectf-tracepoint-linux-fs.h index 0053b6d..d1074ca 100644 --- a/doc/examples/barectf-tracepoint/barectf-tracepoint-linux-fs.h +++ b/doc/examples/barectf-tracepoint/barectf-tracepoint-linux-fs.h @@ -26,7 +26,7 @@ static void init_tracing(void) { /* initialize platform */ global_barectf_platform_ctx = - barectf_platform_linux_fs_init(512, "ctf", 1, 2, 7); + barectf_platform_linux_fs_init(512, "ctf-linux-fs", 1, 2, 7); if (!global_barectf_platform_ctx) { fprintf(stderr, "Error: could not initialize platform\n");