From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoGgI-0005y7-RO for qemu-devel@nongnu.org; Thu, 07 Apr 2016 16:37:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoGgF-00027j-IM for qemu-devel@nongnu.org; Thu, 07 Apr 2016 16:37:34 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=38480 helo=mail.weilnetz.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoGgF-00027f-BP for qemu-devel@nongnu.org; Thu, 07 Apr 2016 16:37:31 -0400 References: <1460044433-19282-1-git-send-email-sergey.fedorov@linaro.org> <1460044433-19282-2-git-send-email-sergey.fedorov@linaro.org> <5706A3C6.7030707@twiddle.net> <5706B206.904@weilnetz.de> From: Stefan Weil Message-ID: <5706C506.5070607@weilnetz.de> Date: Thu, 7 Apr 2016 22:37:26 +0200 MIME-Version: 1.0 In-Reply-To: <5706B206.904@weilnetz.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/11] tci: Fix build regression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Sergey Fedorov , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Alex_Benn=c3=a9e?= , Sergey Fedorov , Paolo Bonzini , Peter Crosthwaite , Michael Roth , Peter Maydell Am 07.04.2016 um 21:16 schrieb Stefan Weil: > Am 07.04.2016 um 20:15 schrieb Richard Henderson: >> On 04/07/2016 08:53 AM, Sergey Fedorov wrote: >>> +/* Enable TCI assertions only when debugging TCG (and without NDEBUG >>> defined). >>> + * Without assertions, the interpreter runs much faster. */ >>> +#if defined(CONFIG_DEBUG_TCG) >>> +# define tci_assert(cond) assert(cond) >>> +#else >>> +# define tci_assert(cond) ((void)0) >>> #endif >>> >> Please just use tcg_debug_assert. >> >> >> r~ > > Hi Richard, > > that's a good suggestion, but maybe a little late for 2.6-rc2. > I already sent a pull request an hour ago after Michael had added > his tested-by. > > My first priority is fixing the build regression in 2.6. I can > try to prepare a new patch, wait for reviews and send a pull > request, but I am afraid this might not be finished in time > for 2.6. > > Regards > Stefan I just tested a variant with tcg_debug_assert. It creates less efficient code when debugging is disabled. Here is the code size for x86_64: with normal tcg_debug_assert: text data bss dec hex filename 8293 0 128 8421 20e5 bin/ndebug/x86_64-linux-gnu,tci/x86_64-softmmu/tci.o In gdb I can also see assembler code for op_size at the beginning of the for loop in tcg_qemu_tb_exec. This slows down the interpreter. with ((void)0): text data bss dec hex filename 8135 0 128 8263 2047 bin/ndebug/x86_64-linux-gnu,tci/x86_64-softmmu/tci.o Therefore I'd prefer using my pull request for 2.6. Stefan