* [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory
@ 2013-05-29 0:28 Alon Levy
2013-05-29 6:29 ` Paolo Bonzini
2013-05-29 7:57 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Alon Levy @ 2013-05-29 0:28 UTC (permalink / raw)
To: qemu-devel, pbonzini
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>
---
Makefile.target | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index ce4391f..a44c8ed 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
@@ -186,7 +196,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
--
1.8.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory
2013-05-29 0:28 [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory Alon Levy
@ 2013-05-29 6:29 ` Paolo Bonzini
2013-05-29 7:57 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-05-29 6:29 UTC (permalink / raw)
To: Alon Levy; +Cc: Stefan Hajnoczi, qemu-devel
Il 29/05/2013 02:28, Alon Levy ha scritto:
> 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) ...
Looks good, thanks!
Paolo
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> Makefile.target | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile.target b/Makefile.target
> index ce4391f..a44c8ed 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
> @@ -186,7 +196,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
>
s
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory
2013-05-29 0:28 [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory Alon Levy
2013-05-29 6:29 ` Paolo Bonzini
@ 2013-05-29 7:57 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-05-29 7:57 UTC (permalink / raw)
To: Alon Levy; +Cc: pbonzini, qemu-devel
On Tue, May 28, 2013 at 08:28:08PM -0400, Alon Levy wrote:
> 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>
> ---
> Makefile.target | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-29 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 0:28 [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory Alon Levy
2013-05-29 6:29 ` Paolo Bonzini
2013-05-29 7:57 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).