aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-10-04 14:35:55 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-10-12 09:54:52 +0200
commit347701879ceaa9a03093364bc519042b248b4967 (patch)
tree7609931af2432433c99716e3d0425a3979226765 /trace
parentca3fa0e88f3a8e22f774751bcb10cc205772c2fc (diff)
trace: get rid of generated-events.h/generated-events.c
Currently the generated-events.[ch] files contain the event dstates, constants and TraceEvent structs, while the generated-tracers.[ch] files contain the actual trace probe logic. With the removal of usage of the event enums from the API there is no longer any compelling reason for the separation between these files. The generated-events.h content is only ever needed from the generated-tracers.[ch] files. The enums/constants/structs from generated-events.[ch] are thus moved into the generated-tracers.[ch], so that there is one less file to be generated. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-17-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/Makefile.objs28
-rw-r--r--trace/control.h2
-rw-r--r--trace/simple.h4
3 files changed, 5 insertions, 29 deletions
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 24d3b3758c..abac333094 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -32,32 +32,11 @@ $(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
--backends=$(TRACE_BACKENDS) \
< $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-$(obj)/generated-events.h: $(obj)/generated-ust-provider.h
-$(obj)/generated-events.c: $(obj)/generated-ust.c
+$(obj)/generated-tracers.h: $(obj)/generated-ust-provider.h
+$(obj)/generated-tracers.c: $(obj)/generated-ust.c
endif
-######################################################################
-# Auto-generated event descriptions
-
-$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-events.h-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
- $(call quiet-command,$(TRACETOOL) \
- --format=events-h \
- --backends=$(TRACE_BACKENDS) \
- < $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
- @cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-events.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
- $(call quiet-command,$(TRACETOOL) \
- --format=events-c \
- --backends=$(TRACE_BACKENDS) \
- < $< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-util-obj-y += generated-events.o
-
######################################################################
# Auto-generated tracing routines
@@ -154,7 +133,8 @@ $(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_
######################################################################
# Backend code
-util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o generated-tracers.o
+util-obj-y += generated-tracers.o
+util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
util-obj-y += control.o
diff --git a/trace/control.h b/trace/control.h
index 69635bfb8b..ccaeac8552 100644
--- a/trace/control.h
+++ b/trace/control.h
@@ -11,7 +11,7 @@
#define TRACE__CONTROL_H
#include "qemu-common.h"
-#include "trace/generated-events.h"
+#include "event-internal.h"
typedef struct TraceEventIter {
size_t event;
diff --git a/trace/simple.h b/trace/simple.h
index 17ce47260f..9931808c05 100644
--- a/trace/simple.h
+++ b/trace/simple.h
@@ -11,10 +11,6 @@
#ifndef TRACE_SIMPLE_H
#define TRACE_SIMPLE_H
-
-#include "trace/generated-events.h"
-
-
void st_print_trace_file_status(FILE *stream, fprintf_function stream_printf);
void st_set_trace_file_enabled(bool enable);
void st_set_trace_file(const char *file);