]> git.proxmox.com Git - mirror_qemu.git/blame - trace/Makefile.objs
ppc: use kvm_vcpu_enable_cap()
[mirror_qemu.git] / trace / Makefile.objs
CommitLineData
eac236ea
LV
1# -*- mode: makefile -*-
2
e6bf23f8
MG
3######################################################################
4# Auto-generated event descriptions for LTTng ust code
5
6ifeq ($(TRACE_BACKEND),ust)
7$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp
8$(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events
9 $(call quiet-command,$(TRACETOOL) \
10 --format=ust-events-h \
11 --backend=$(TRACE_BACKEND) \
12 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
13 @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
14
15$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
16$(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events
17 $(call quiet-command,$(TRACETOOL) \
18 --format=ust-events-c \
19 --backend=$(TRACE_BACKEND) \
20 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
21 @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
22
23$(obj)/generated-events.h: $(obj)/generated-ust-provider.h
24$(obj)/generated-events.c: $(obj)/generated-ust.c
25endif
26
eac236ea 27######################################################################
45be2f5d
LV
28# Auto-generated event descriptions
29
30$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
31$(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
32 $(call quiet-command,$(TRACETOOL) \
33 --format=events-h \
34 --backend=events \
35 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
36 @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
37
a7373b1f 38$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
45be2f5d
LV
39$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
40 $(call quiet-command,$(TRACETOOL) \
41 --format=events-c \
42 --backend=events \
43 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
44 @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
45
46util-obj-y += generated-events.o
47
48
49######################################################################
50# Auto-generated tracing routines
eac236ea 51
0e848f48 52$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
6f329a55 53 @cmp -s $< $@ || cp $< $@
eac236ea
LV
54$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
55 $(call quiet-command,$(TRACETOOL) \
56 --format=h \
57 --backend=$(TRACE_BACKEND) \
58 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
eac236ea 59
0e848f48
PB
60######################################################################
61# Auto-generated tracing routines (non-DTrace)
62
63ifneq ($(TRACE_BACKEND),dtrace)
eac236ea 64$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
6f329a55 65 @cmp -s $< $@ || cp $< $@
eac236ea
LV
66$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
67 $(call quiet-command,$(TRACETOOL) \
68 --format=c \
69 --backend=$(TRACE_BACKEND) \
70 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
eac236ea
LV
71
72$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
eac236ea
LV
73endif
74
75
76######################################################################
77# Auto-generated DTrace code
78
79# Normal practice is to name DTrace probe file with a '.d' extension
80# but that gets picked up by QEMU's Makefile as an external dependency
81# rule file. So we use '.dtrace' instead
0e848f48
PB
82ifeq ($(TRACE_BACKEND),dtrace)
83$(obj)/generated-tracers.dtrace: $(obj)/generated-tracers.dtrace-timestamp
84$(obj)/generated-tracers.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
eac236ea
LV
85 $(call quiet-command,$(TRACETOOL) \
86 --format=d \
87 --backend=$(TRACE_BACKEND) \
88 < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
89 @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
90
0e848f48 91$(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers.dtrace
eac236ea
LV
92 $(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@")
93
0e848f48
PB
94$(obj)/generated-tracers.o: $(obj)/generated-tracers.dtrace
95endif
eac236ea 96
eac236ea
LV
97######################################################################
98# Backend code
99
ff667e2e
PB
100util-obj-$(CONFIG_TRACE_DEFAULT) += default.o
101util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
102util-obj-$(CONFIG_TRACE_STDERR) += stderr.o
781e9545 103util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
e6bf23f8 104util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
ff667e2e
PB
105util-obj-y += control.o
106util-obj-y += generated-tracers.o