2012-12-15 03:13:09 +08:00
|
|
|
# -*- mode: makefile -*-
|
|
|
|
|
2014-01-30 11:47:56 +08:00
|
|
|
######################################################################
|
|
|
|
# Auto-generated event descriptions for LTTng ust code
|
|
|
|
|
2014-05-27 21:02:14 +08:00
|
|
|
ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
|
2014-01-30 11:47:56 +08:00
|
|
|
$(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 \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2014-01-30 11:47:56 +08:00
|
|
|
< $< > $@," 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 \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2014-01-30 11:47:56 +08:00
|
|
|
< $< > $@," 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-15 03:13:09 +08:00
|
|
|
######################################################################
|
2013-03-05 21:47:32 +08: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 \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2013-03-05 21:47:32 +08:00
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2013-03-08 22:52:15 +08:00
|
|
|
$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
|
2013-03-05 21:47:32 +08:00
|
|
|
$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=events-c \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2013-03-05 21:47:32 +08:00
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
util-obj-y += generated-events.o
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Auto-generated tracing routines
|
2012-12-15 03:13:09 +08:00
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
##################################################
|
|
|
|
# Execution level
|
|
|
|
|
2012-12-24 21:06:27 +08:00
|
|
|
$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
|
2013-01-15 20:47:33 +08:00
|
|
|
@cmp -s $< $@ || cp $< $@
|
2012-12-15 03:13:09 +08:00
|
|
|
$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=h \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2012-12-15 03:13:09 +08:00
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
##############################
|
|
|
|
# non-DTrace
|
2012-12-24 21:06:27 +08:00
|
|
|
|
2012-12-15 03:13:09 +08:00
|
|
|
$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
|
2013-01-15 20:47:33 +08:00
|
|
|
@cmp -s $< $@ || cp $< $@
|
2012-12-15 03:13:09 +08:00
|
|
|
$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=c \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2012-12-15 03:13:09 +08:00
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
|
|
|
|
$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
|
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
##############################
|
|
|
|
# DTrace
|
2012-12-15 03:13:09 +08:00
|
|
|
|
|
|
|
# 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
|
2014-05-27 21:02:14 +08:00
|
|
|
ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
|
|
|
|
$(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-tracers-dtrace.dtrace-timestamp
|
|
|
|
$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
2012-12-15 03:13:09 +08:00
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=d \
|
2014-05-27 21:02:14 +08:00
|
|
|
--backends=$(TRACE_BACKENDS) \
|
2012-12-15 03:13:09 +08:00
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2014-05-27 21:02:14 +08:00
|
|
|
$(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers-dtrace.dtrace
|
2012-12-15 03:13:09 +08:00
|
|
|
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@")
|
|
|
|
|
2014-05-27 21:02:14 +08:00
|
|
|
$(obj)/generated-tracers-dtrace.o: $(obj)/generated-tracers-dtrace.dtrace
|
|
|
|
|
|
|
|
util-obj-y += generated-tracers-dtrace.o
|
2012-12-24 21:06:27 +08:00
|
|
|
endif
|
2012-12-15 03:13:09 +08:00
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
##################################################
|
|
|
|
# Translation level
|
|
|
|
|
2014-05-30 20:12:01 +08:00
|
|
|
$(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
|
|
|
|
$(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=tcg-helper-wrapper-h \
|
|
|
|
--backend=$(TRACE_BACKENDS) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
$(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
|
|
|
|
$(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=tcg-helper-h \
|
|
|
|
--backend=$(TRACE_BACKENDS) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
2014-05-30 20:11:56 +08:00
|
|
|
$(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
|
|
|
|
$(obj)/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=tcg-helper-c \
|
|
|
|
--backend=$(TRACE_BACKENDS) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
$(obj)/generated-helpers.o: $(obj)/generated-helpers.c
|
|
|
|
|
|
|
|
target-obj-y += generated-helpers.o
|
|
|
|
|
2014-05-30 20:11:50 +08:00
|
|
|
|
2014-05-30 20:12:13 +08:00
|
|
|
$(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
|
|
|
|
$(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=tcg-h \
|
|
|
|
--backend=$(TRACE_BACKENDS) \
|
|
|
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
|
|
|
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
|
|
|
|
|
|
|
2012-12-15 03:13:09 +08:00
|
|
|
######################################################################
|
|
|
|
# Backend code
|
|
|
|
|
2014-09-03 11:44:54 +08:00
|
|
|
util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o generated-tracers.o
|
2013-04-11 19:25:15 +08:00
|
|
|
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
|
2014-01-30 11:47:56 +08:00
|
|
|
util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
|
2012-12-21 16:45:20 +08:00
|
|
|
util-obj-y += control.o
|
2014-08-25 19:19:57 +08:00
|
|
|
util-obj-y += qmp.o
|