-ctf
+trace
linux-fs-simple
PLATFORM_DIR = ../../platforms/linux-fs
CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I.
+TRACE_DIR = trace
TARGET = linux-fs-simple
OBJS = $(TARGET).o barectf.o barectf-platform-linux-fs.o
all: $(TARGET)
-ctf:
- $(MKDIR) ctf
+$(TRACE_DIR):
+ $(MKDIR) $(TRACE_DIR)
$(TARGET): $(OBJS)
$(CC) -o $@ $^
-ctf/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml ctf
- $(BARECTF) $< -m ctf
+$(TRACE_DIR)/metadata barectf-bitfield.h barectf.h barectf.c: config.yaml $(TRACE_DIR)
+ $(BARECTF) $< -m $(TRACE_DIR)
barectf.o: barectf.c
$(CC) $(CFLAGS) -ansi -c $<
$(CC) $(CFLAGS) -c $<
clean:
- $(RM) $(TARGET) $(OBJS) ctf
+ $(RM) $(TARGET) $(OBJS) $(TRACE_DIR)
$(RM) barectf.h barectf-bitfield.h barectf.c
:toc: left
This simple example shows how to use the barectf
-link:../../../platforms/linux-fs[Linux FS platform].
+link:../../platforms/linux-fs[Linux FS platform].
== Build
$ ./linux-fs-simple
----
-The complete CTF trace is the `ctf` directory.
+The complete CTF trace is the `trace` directory.
[NOTE]
====
You can run the example with arguments; they will be recorded as string
-fields in the event records of the `ctf/stream` data stream.
+fields in the event records of the `trace/stream` data stream.
For example:
https://babeltrace.org/[Babeltrace{nbsp}2]:
----
-$ babeltrace2 ctf
+$ babeltrace2 trace
----
int exit_status = 0;
/* Initialize platform */
- platform_ctx = barectf_platform_linux_fs_init(512, "ctf", 1, 2, 7);
+ platform_ctx = barectf_platform_linux_fs_init(512, "trace", 1, 2, 7);
if (!platform_ctx) {
fprintf(stderr,