xen: Fix IDE unplug
[qemu.git] / trace / Makefile.objs
blob5145b34d1a12ea6fbf0814a7c9f04a2388b6eaa7
1 # -*- mode: makefile -*-
3 ######################################################################
4 # tracetool source files
5 # Every rule that invokes tracetool must depend on this so code is regenerated
6 # if tracetool itself changes.
8 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
9 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
11 ######################################################################
12 # Auto-generated event descriptions for LTTng ust code
14 ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
15 $(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp
16         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
17 $(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
18         $(call quiet-command,$(TRACETOOL) \
19                 --format=ust-events-h \
20                 --backends=$(TRACE_BACKENDS) \
21                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
23 $(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
24         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
25 $(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
26         $(call quiet-command,$(TRACETOOL) \
27                 --format=ust-events-c \
28                 --backends=$(TRACE_BACKENDS) \
29                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
31 $(obj)/generated-events.h: $(obj)/generated-ust-provider.h
32 $(obj)/generated-events.c: $(obj)/generated-ust.c
33 endif
35 ######################################################################
36 # Auto-generated event descriptions
38 $(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
39         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
40 $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
41         $(call quiet-command,$(TRACETOOL) \
42                 --format=events-h \
43                 --backends=$(TRACE_BACKENDS) \
44                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
46 $(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
47         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
48 $(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
49         $(call quiet-command,$(TRACETOOL) \
50                 --format=events-c \
51                 --backends=$(TRACE_BACKENDS) \
52                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
54 util-obj-y += generated-events.o
57 ######################################################################
58 # Auto-generated tracing routines
60 ##################################################
61 # Execution level
63 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
64         @cmp -s $< $@ || cp $< $@
65 $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
66         $(call quiet-command,$(TRACETOOL) \
67                 --format=h \
68                 --backends=$(TRACE_BACKENDS) \
69                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
71 ##############################
72 # non-DTrace
74 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
75         @cmp -s $< $@ || cp $< $@
76 $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
77         $(call quiet-command,$(TRACETOOL) \
78                 --format=c \
79                 --backends=$(TRACE_BACKENDS) \
80                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
82 $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
84 ##############################
85 # DTrace
87 # Normal practice is to name DTrace probe file with a '.d' extension
88 # but that gets picked up by QEMU's Makefile as an external dependency
89 # rule file. So we use '.dtrace' instead
90 ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
91 $(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-tracers-dtrace.dtrace-timestamp
92         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
93 $(obj)/generated-tracers-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
94         $(call quiet-command,$(TRACETOOL) \
95                 --format=d \
96                 --backends=$(TRACE_BACKENDS) \
97                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
99 $(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers-dtrace.dtrace
100         $(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   $@")
102 $(obj)/generated-tracers-dtrace.o: $(obj)/generated-tracers-dtrace.dtrace
104 util-obj-y += generated-tracers-dtrace.o
105 endif
107 ##################################################
108 # Translation level
110 $(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
111         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
112 $(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
113         $(call quiet-command,$(TRACETOOL) \
114                 --format=tcg-helper-wrapper-h \
115                 --backend=$(TRACE_BACKENDS) \
116                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
118 $(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
119         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
120 $(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
121         $(call quiet-command,$(TRACETOOL) \
122                 --format=tcg-helper-h \
123                 --backend=$(TRACE_BACKENDS) \
124                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
126 $(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
127         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
128 $(obj)/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
129         $(call quiet-command,$(TRACETOOL) \
130                 --format=tcg-helper-c \
131                 --backend=$(TRACE_BACKENDS) \
132                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
134 $(obj)/generated-helpers.o: $(obj)/generated-helpers.c
136 target-obj-y += generated-helpers.o
139 $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
140         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
141 $(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
142         $(call quiet-command,$(TRACETOOL) \
143                 --format=tcg-h \
144                 --backend=$(TRACE_BACKENDS) \
145                 < $< > $@,"  GEN   $(patsubst %-timestamp,%,$@)")
148 ######################################################################
149 # Backend code
151 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o generated-tracers.o
152 util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
153 util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
154 util-obj-y += control.o
155 util-obj-y += qmp.o