From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIQk2-00048M-5w for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:58:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIQk0-0005TP-MD for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:58:54 -0500 Received: from mail-iw0-f173.google.com ([209.85.214.173]:60120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIQk0-0005TE-Ft for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:58:52 -0500 Received: by iwn36 with SMTP id 36so1178348iwn.4 for ; Tue, 16 Nov 2010 10:58:51 -0800 (PST) Message-ID: <4CE2D468.4020604@codemonkey.ws> Date: Tue, 16 Nov 2010 12:58:48 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] Add a DTrace tracing backend targetted for SystemTAP compatability References: <1289244788-19961-1-git-send-email-berrange@redhat.com> <1289244788-19961-2-git-send-email-berrange@redhat.com> <4CE2A74C.6050302@codemonkey.ws> <4CE2C92E.3030006@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On 11/16/2010 12:54 PM, Peter Maydell wrote: > On 16 November 2010 18:10, Anthony Liguori wrote: > >> On 11/16/2010 11:43 AM, Peter Maydell wrote: >> >>> Unfortunately these commits: >>> 2834c3e Add support for generating a systemtap tapset static probes >>> 4addb11 Add a DTrace tracing backend targetted for SystemTAP compatability >>> >> What's your configure output? >> > I've attached it; the trace related bits are: > Trace backend nop > Trace output file trace- > > >> I don't have the right environment to build with systemtap support, but >> --trace-backend=nop should work regardless. >> > I'm using the nop backend, yes. > > I think the problem is that commit 2834c3e adds a target 'trace:' to the > Makefile.target which looks like it's intended to be a phony target. However > it isn't marked as such, so make actually tries to create a binary 'trace' > by falling back to its default rules (since there's a "trace.c" in the root > directory): > > petmay01@LinaroE102767:~/qemu-test/qemu/i386-softmmu$ make -n trace > echo " CC trace.o"&& gcc -I/home/petmay01/qemu-test/qemu/slirp > -Werror -m64 -I. -I/home/petmay01/qemu-test/qemu -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels > -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing > -fstack-protector-all -Wempty-body -Wnested-externs -Wformat-security > -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration > -Wold-style-definition -Wtype-limits -DHAS_AUDIO -DHAS_AUDIO_CHOICE > -I/home/petmay01/qemu-test/qemu/fpu > -I/home/petmay01/qemu-test/qemu/tcg > -I/home/petmay01/qemu-test/qemu/tcg/i386 -DTARGET_PHYS_ADDR_BITS=32 > -I.. -I/home/petmay01/qemu-test/qemu/target-i386 -DNEED_CPU_H -MMD > -MP -MT trace.o -MF ./trace.d -O2 -g -c -o trace.o > /home/petmay01/qemu-test/qemu/trace.c > echo " LINK trace"&& gcc -I/home/petmay01/qemu-test/qemu/slirp > -Werror -m64 -I. -I/home/petmay01/qemu-test/qemu -D_FORTIFY_SOURCE=2 > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels > -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing > -fstack-protector-all -Wempty-body -Wnested-externs -Wformat-security > -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration > -Wold-style-definition -Wtype-limits -DHAS_AUDIO -DHAS_AUDIO_CHOICE > -I/home/petmay01/qemu-test/qemu/fpu > -I/home/petmay01/qemu-test/qemu/tcg > -I/home/petmay01/qemu-test/qemu/tcg/i386 -DTARGET_PHYS_ADDR_BITS=32 > -I.. -I/home/petmay01/qemu-test/qemu/target-i386 -DNEED_CPU_H -O2 > -g -Wl,--warn-common -m64 -g -o trace trace.o -lrt -lpthread > -lutil -lcurl -lncurses -luuid -lpng -lsasl2 -lgnutls -lSDL > -lX11 -laio -lm -lz > > ...and linking only trace.o into a binary 'trace' fails because > trace.c doesn't have a main() (or indeed any functions at all). > > If I add a ".PHONY: trace" or change the "trace" target > name to "tracexyzzy" then this fixes the problem. > Curious, care to send a patch? I think I'm not seeing this because I build with srcdir != objdir. Regards, Anthony Liguori > -- PMM >