diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-11-08 19:33:08 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-11-16 09:31:18 -0600 |
commit | 2834c3e0140c3b0ed4422909dfa0607b7213d95d (patch) | |
tree | 0fad835a8f7c742b07710793915c9dd2fcb92e82 /Makefile.target | |
parent | 4addb1127f6327c7ebcbd150a6b589e7677adc92 (diff) | |
download | qemu-2834c3e0140c3b0ed4422909dfa0607b7213d95d.tar.gz qemu-2834c3e0140c3b0ed4422909dfa0607b7213d95d.tar.bz2 qemu-2834c3e0140c3b0ed4422909dfa0607b7213d95d.zip |
Add support for generating a systemtap tapset static probes
This introduces generation of a qemu.stp/qemu-system-XXX.stp
files which provides tapsets with friendly names for static
probes & their arguments. Instead of
probe process("qemu").mark("qemu_malloc") {
printf("Malloc %d %p\n", $arg1, $arg2);
}
It is now possible todo
probe qemu.system.i386.qemu_malloc {
printf("Malloc %d %p\n", size, ptr);
}
There is one tapset defined per target arch.
* Makefile: Generate a qemu.stp file for systemtap
* tracetool: Support for generating systemtap tapsets
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'Makefile.target')
-rw-r--r-- | Makefile.target | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile.target b/Makefile.target index 91e6e74399..a5e6410cec 100644 --- a/Makefile.target +++ b/Makefile.target @@ -40,7 +40,20 @@ kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS) config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak -all: $(PROGS) +ifdef CONFIG_SYSTEMTAP_TRACE +trace: $(QEMU_PROG).stp + +$(QEMU_PROG).stp: + $(call quiet-command,sh $(SRC_PATH)/tracetool \ + --$(TRACE_BACKEND) \ + --bindir $(bindir) \ + --target $(TARGET_ARCH) \ + -s < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp") +else +trace: +endif + +all: $(PROGS) trace # Dummy command so that make thinks it has done something @true @@ -348,6 +361,10 @@ ifneq ($(STRIP),) $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) endif endif +ifdef CONFIG_SYSTEMTAP_TRACE + $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset" + $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset" +endif # Include automatically generated dependency files -include $(wildcard *.d */*.d) |