Message ID | 1369621146-17095-1-git-send-email-alevy@redhat.com |
---|---|
State | New |
Headers | show |
Il 27/05/2013 04:19, Alon Levy ha scritto: > For systemtap the location of the process being tapped is crucial, so > the existing stp file requires installation to use. A new file providing > qemu.local prefixed probes lets scripts run without an install step. > > Signed-off-by: Alon Levy <alevy@redhat.com> > --- > > Makefile.target | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Makefile.target b/Makefile.target > index ce4391f..5d176e2 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 $(QEMU_PROG).local.stp > > ifdef CONFIG_USER_ONLY > TARGET_TYPE=user > @@ -51,6 +51,17 @@ $(QEMU_PROG).stp: $(SRC_PATH)/trace-events > --target-arch=$(TARGET_ARCH) \ > --target-type=$(TARGET_TYPE) \ > < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp") > + > +$(QEMU_PROG).local.stp: $(SRC_PATH)/trace-events > + $(call quiet-command,$(TRACETOOL) \ > + --format=stap \ > + --backend=$(TRACE_BACKEND) \ > + --binary=$(SRC_PATH)/$(TARGET_DIR)$(QEMU_PROG) \ This is not the build directory for out-of-tree builds. > + --probe-prefix=qemu.local \ Why change the prefix? Paolo > + --target-arch=$(TARGET_ARCH) \ > + --target-type=$(TARGET_TYPE) \ > + < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).local.stp") > + > else > stap: > endif >
On Mon, 2013-05-27 at 08:32 +0200, Paolo Bonzini wrote: > Il 27/05/2013 04:19, Alon Levy ha scritto: > > For systemtap the location of the process being tapped is crucial, so > > the existing stp file requires installation to use. A new file providing > > qemu.local prefixed probes lets scripts run without an install step. > > > > Signed-off-by: Alon Levy <alevy@redhat.com> > > --- > > > > Makefile.target | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/Makefile.target b/Makefile.target > > index ce4391f..5d176e2 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 $(QEMU_PROG).local.stp > > > > ifdef CONFIG_USER_ONLY > > TARGET_TYPE=user > > @@ -51,6 +51,17 @@ $(QEMU_PROG).stp: $(SRC_PATH)/trace-events > > --target-arch=$(TARGET_ARCH) \ > > --target-type=$(TARGET_TYPE) \ > > < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp") > > + > > +$(QEMU_PROG).local.stp: $(SRC_PATH)/trace-events > > + $(call quiet-command,$(TRACETOOL) \ > > + --format=stap \ > > + --backend=$(TRACE_BACKEND) \ > > + --binary=$(SRC_PATH)/$(TARGET_DIR)$(QEMU_PROG) \ > > This is not the build directory for out-of-tree builds. I'll fix that. > > > + --probe-prefix=qemu.local \ > > Why change the prefix? It was one way to verify I was using the correct file. I'll change it back. But in general does it make sense for you to have this in addition to the existing stp file? > > Paolo > > > + --target-arch=$(TARGET_ARCH) \ > > + --target-type=$(TARGET_TYPE) \ > > + < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).local.stp") > > + > > else > > stap: > > endif > > > >
Il 28/05/2013 14:09, Alon Levy ha scritto: >>> + --probe-prefix=qemu.local \ >> >> Why change the prefix? > > It was one way to verify I was using the correct file. I'll change it > back. > > But in general does it make sense for you to have this in addition to > the existing stp file? I think it does (with the same prefix so that you can share the scripts). But I'm not sure how you'd use it. :) Can you show an example and also put it in the commit message? Paolo
On Tue, May 28, 2013 at 08:09:55AM -0400, Alon Levy wrote: > On Mon, 2013-05-27 at 08:32 +0200, Paolo Bonzini wrote: > > Il 27/05/2013 04:19, Alon Levy ha scritto: > > > For systemtap the location of the process being tapped is crucial, so > > > the existing stp file requires installation to use. A new file providing > > > qemu.local prefixed probes lets scripts run without an install step. > > > > > > Signed-off-by: Alon Levy <alevy@redhat.com> > > > --- > > > > > > Makefile.target | 13 ++++++++++++- > > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > > > diff --git a/Makefile.target b/Makefile.target > > > index ce4391f..5d176e2 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 $(QEMU_PROG).local.stp > > > > > > ifdef CONFIG_USER_ONLY > > > TARGET_TYPE=user > > > @@ -51,6 +51,17 @@ $(QEMU_PROG).stp: $(SRC_PATH)/trace-events > > > --target-arch=$(TARGET_ARCH) \ > > > --target-type=$(TARGET_TYPE) \ > > > < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp") > > > + > > > +$(QEMU_PROG).local.stp: $(SRC_PATH)/trace-events > > > + $(call quiet-command,$(TRACETOOL) \ > > > + --format=stap \ > > > + --backend=$(TRACE_BACKEND) \ > > > + --binary=$(SRC_PATH)/$(TARGET_DIR)$(QEMU_PROG) \ > > > > This is not the build directory for out-of-tree builds. > > I'll fix that. > > > > > > + --probe-prefix=qemu.local \ > > > > Why change the prefix? > > It was one way to verify I was using the correct file. I'll change it > back. > > But in general does it make sense for you to have this in addition to > the existing stp file? Yes, I think it makes sense. Stefan
diff --git a/Makefile.target b/Makefile.target index ce4391f..5d176e2 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 $(QEMU_PROG).local.stp ifdef CONFIG_USER_ONLY TARGET_TYPE=user @@ -51,6 +51,17 @@ $(QEMU_PROG).stp: $(SRC_PATH)/trace-events --target-arch=$(TARGET_ARCH) \ --target-type=$(TARGET_TYPE) \ < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp") + +$(QEMU_PROG).local.stp: $(SRC_PATH)/trace-events + $(call quiet-command,$(TRACETOOL) \ + --format=stap \ + --backend=$(TRACE_BACKEND) \ + --binary=$(SRC_PATH)/$(TARGET_DIR)$(QEMU_PROG) \ + --probe-prefix=qemu.local \ + --target-arch=$(TARGET_ARCH) \ + --target-type=$(TARGET_TYPE) \ + < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).local.stp") + else stap: endif
For systemtap the location of the process being tapped is crucial, so the existing stp file requires installation to use. A new file providing qemu.local prefixed probes lets scripts run without an install step. Signed-off-by: Alon Levy <alevy@redhat.com> --- Makefile.target | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)