2012-12-14 23:13:09 +04:00
|
|
|
# -*- mode: makefile -*-
|
|
|
|
|
2014-01-30 07:47:56 +04:00
|
|
|
######################################################################
|
|
|
|
# Auto-generated event descriptions for LTTng ust code
|
|
|
|
|
|
|
|
ifeq ($(TRACE_BACKEND),ust)
|
|
|
|
$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp
|
|
|
|
$(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=ust-events-h \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
|
|
|
|
$(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=ust-events-c \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
$(obj)/generated-events.h: $(obj)/generated-ust-provider.h
|
|
|
|
$(obj)/generated-events.c: $(obj)/generated-ust.c
|
|
|
|
endif
|
|
|
|
|
2012-12-14 23:13:09 +04:00
|
|
|
######################################################################
|
2013-03-05 17:47:32 +04:00
|
|
|
# Auto-generated event descriptions
|
|
|
|
|
|
|
|
$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
|
|
|
|
$(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=events-h \
|
|
|
|
--backend=events \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2013-03-08 18:52:15 +04:00
|
|
|
$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
|
2013-03-05 17:47:32 +04:00
|
|
|
$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=events-c \
|
|
|
|
--backend=events \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
util-obj-y += generated-events.o
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Auto-generated tracing routines
|
2012-12-14 23:13:09 +04:00
|
|
|
|
2012-12-24 17:06:27 +04:00
|
|
|
$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
|
2013-01-15 16:47:33 +04:00
|
|
|
@cmp -s $< $@ || cp $< $@
|
2012-12-14 23:13:09 +04:00
|
|
|
$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=h \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
|
2012-12-24 17:06:27 +04:00
|
|
|
######################################################################
|
|
|
|
# Auto-generated tracing routines (non-DTrace)
|
|
|
|
|
|
|
|
ifneq ($(TRACE_BACKEND),dtrace)
|
2012-12-14 23:13:09 +04:00
|
|
|
$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
|
2013-01-15 16:47:33 +04:00
|
|
|
@cmp -s $< $@ || cp $< $@
|
2012-12-14 23:13:09 +04:00
|
|
|
$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=c \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
|
|
|
|
$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Auto-generated DTrace code
|
|
|
|
|
|
|
|
# Normal practice is to name DTrace probe file with a '.d' extension
|
|
|
|
# but that gets picked up by QEMU's Makefile as an external dependency
|
|
|
|
# rule file. So we use '.dtrace' instead
|
2012-12-24 17:06:27 +04:00
|
|
|
ifeq ($(TRACE_BACKEND),dtrace)
|
|
|
|
$(obj)/generated-tracers.dtrace: $(obj)/generated-tracers.dtrace-timestamp
|
|
|
|
$(obj)/generated-tracers.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
2012-12-14 23:13:09 +04:00
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=d \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2012-12-24 17:06:27 +04:00
|
|
|
$(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers.dtrace
|
2012-12-14 23:13:09 +04:00
|
|
|
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@")
|
|
|
|
|
2012-12-24 17:06:27 +04:00
|
|
|
$(obj)/generated-tracers.o: $(obj)/generated-tracers.dtrace
|
|
|
|
endif
|
2012-12-14 23:13:09 +04:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Backend code
|
|
|
|
|
2012-12-21 12:45:20 +04:00
|
|
|
util-obj-$(CONFIG_TRACE_DEFAULT) += default.o
|
|
|
|
util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
|
|
|
|
util-obj-$(CONFIG_TRACE_STDERR) += stderr.o
|
2013-04-11 15:25:15 +04:00
|
|
|
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
|
2014-01-30 07:47:56 +04:00
|
|
|
util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
|
2012-12-21 12:45:20 +04:00
|
|
|
util-obj-y += control.o
|
|
|
|
util-obj-y += generated-tracers.o
|