aboutsummaryrefslogtreecommitdiff
path: root/Makefile.target
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2013-06-14 15:19:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-06-14 15:19:07 +0100
commitc14518e94251c5c0857915a5cef102f23abf1e8b (patch)
tree44001738f157d7e627020b9732f3ec2bb1591d46 /Makefile.target
parent301255e6303457e10b9a42dc208f80c058004c1c (diff)
Add a stp file for usage from build directory
For systemtap the location of the process being tapped is crucial, as a result the existing stp file requires installation for use. There are now two files: $(TARGET_DIR)/$(QEMU_PROG).stp-installed: copied to $(tapdir)/$(QEMU_PROG).stp $(TARGET_DIR)/$(QEMU_PROG).stp: pointing to the built binary, usable without installation To use: stap -I $(TARGET_DIR) ... Signed-off-by: Alon Levy <alevy@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1370349928-20419-2-git-send-email-pbonzini@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'Makefile.target')
-rw-r--r--Makefile.target16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.target b/Makefile.target
index b0be124d29..29038973d6 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -35,7 +35,7 @@ config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
ifdef CONFIG_TRACE_SYSTEMTAP
-stap: $(QEMU_PROG).stp
+stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp
ifdef CONFIG_USER_ONLY
TARGET_TYPE=user
@@ -43,14 +43,24 @@ else
TARGET_TYPE=system
endif
-$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
+$(QEMU_PROG).stp-installed: $(SRC_PATH)/trace-events
$(call quiet-command,$(TRACETOOL) \
--format=stap \
--backend=$(TRACE_BACKEND) \
--binary=$(bindir)/$(QEMU_PROG) \
--target-arch=$(TARGET_ARCH) \
--target-type=$(TARGET_TYPE) \
+ < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp-installed")
+
+$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
+ $(call quiet-command,$(TRACETOOL) \
+ --format=stap \
+ --backend=$(TRACE_BACKEND) \
+ --binary=$(realpath .)/$(QEMU_PROG) \
+ --target-arch=$(TARGET_ARCH) \
+ --target-type=$(TARGET_TYPE) \
< $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp")
+
else
stap:
endif
@@ -182,7 +192,7 @@ endif
endif
ifdef CONFIG_TRACE_SYSTEMTAP
$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
- $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
+ $(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp"
endif
GENERATED_HEADERS += config-target.h