From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKwVu-0001QM-Dq for qemu-devel@nongnu.org; Mon, 31 Oct 2011 14:23:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKwVE-0000bg-Qg for qemu-devel@nongnu.org; Mon, 31 Oct 2011 14:23:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKwVE-0000bR-Ji for qemu-devel@nongnu.org; Mon, 31 Oct 2011 14:22:32 -0400 Date: Mon, 31 Oct 2011 18:22:48 +0000 From: "Daniel P. Berrange" Message-ID: <20111031182248.GJ27570@redhat.com> References: <1319976446-12602-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1319976446-12602-1-git-send-email-sw@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH] Support running QEMU on Valgrind Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org, Avi Kivity On Sun, Oct 30, 2011 at 01:07:26PM +0100, Stefan Weil wrote: > Valgrind is a tool which can automatically detect many kinds of bugs. > > Running QEMU on Valgrind with x86_64 hosts was not possible because > Valgrind aborts when memalign is called with an alignment larger than > 1 MiB. QEMU normally uses 2 MiB on Linux x86_64. > > Now the alignment is reduced to the page size when QEMU is running on > Valgrind. > > valgrind.h is a copy from Valgrind svn trunk r12226 with trailing > whitespace stripped but otherwise unmodified, so it still raises lots > of errors when checked with scripts/checkpatch.pl. > > It is included here to avoid a dependency on Valgrind. In libvirt we do the following fun hack to avoid a build dep on valgrind: const char *ld = getenv("LD_PRELOAD"); if (ld && strstr(ld, "vgpreload")) { fprintf(stderr, "Running under valgrind, disabling driver\n"); return 0; } Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|