From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56484 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiOly-0005nO-LK for qemu-devel@nongnu.org; Mon, 09 Aug 2010 05:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiOlx-000255-E8 for qemu-devel@nongnu.org; Mon, 09 Aug 2010 05:35:58 -0400 Received: from mtagate4.de.ibm.com ([195.212.17.164]:43999) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiOlx-00023V-6a for qemu-devel@nongnu.org; Mon, 09 Aug 2010 05:35:57 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.1/8.13.1) with ESMTP id o799Zl1L012315 for ; Mon, 9 Aug 2010 09:35:47 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o799Zc2d1798266 for ; Mon, 9 Aug 2010 11:35:46 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o799Zb4q012905 for ; Mon, 9 Aug 2010 11:35:38 +0200 Date: Mon, 9 Aug 2010 10:35:37 +0100 From: Stefan Hajnoczi Message-ID: <20100809093537.GA3224@stefan-thinkpad.transitives.com> References: <4C5FC2A5.8030907@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4C5FC2A5.8030907@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [Tracing] Compilation failure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Prerna Saxena Cc: qemu-devel On Mon, Aug 09, 2010 at 02:26:05PM +0530, Prerna Saxena wrote: > Hi Stefan, > I think this needs to be resolved. >=20 > CC trace.o > CC simpletrace.o > cc1: warnings being treated as errors > /home/prerna/qemu-testing/git/qemu/simpletrace.c: In function > =E2=80=98write_header=E2=80=99: > /home/prerna/qemu-testing/git/qemu/simpletrace.c:46: error: integer > constant is too large for =E2=80=98long=E2=80=99 type > /home/prerna/qemu-testing/git/qemu/simpletrace.c:46: error: large > integer implicitly truncated to unsigned type > make: *** [simpletrace.o] Error 1 >=20 > The error arises due to : > TraceRecord header =3D { > .event =3D -1UL, /* max avoids conflicting with TraceEventIDs *= / > .timestamp_ns =3D 0xf2b177cb0aa429b4, /* magic number */ > ^^^^^^^^ error. >=20 > Also, it would be better to #define the magic number to some macro, > and use that instead of using the constant directly. Thanks for pointing this out. The trace file format does not use portable field sizes. The unsigned long field size changes depending on the host architecture (32-bit or 64-bit). I think 64-bit fields is reasonable. 32-bit hosts will not make use of the high 32-bits but that seems okay. Stefan