From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhZt0-0001oF-NJ for qemu-devel@nongnu.org; Wed, 29 May 2013 02:29:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhZsw-0001VJ-1W for qemu-devel@nongnu.org; Wed, 29 May 2013 02:29:26 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:37638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhZsv-0001VD-RO for qemu-devel@nongnu.org; Wed, 29 May 2013 02:29:21 -0400 Received: by mail-ee0-f44.google.com with SMTP id b57so5137017eek.17 for ; Tue, 28 May 2013 23:29:21 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A5A035.8010106@redhat.com> Date: Wed, 29 May 2013 08:29:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1369787288-4478-1-git-send-email-alevy@redhat.com> In-Reply-To: <1369787288-4478-1-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] Add a stp file for usage from build directory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: Stefan Hajnoczi , qemu-devel@nongnu.org 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 > --- > 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