From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Prerna Saxena <prerna@linux.vnet.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [Tracing] Compilation failure
Date: Mon, 9 Aug 2010 10:35:37 +0100 [thread overview]
Message-ID: <20100809093537.GA3224@stefan-thinkpad.transitives.com> (raw)
In-Reply-To: <4C5FC2A5.8030907@linux.vnet.ibm.com>
On Mon, Aug 09, 2010 at 02:26:05PM +0530, Prerna Saxena wrote:
> Hi Stefan,
> I think this needs to be resolved.
>
> CC trace.o
> CC simpletrace.o
> cc1: warnings being treated as errors
> /home/prerna/qemu-testing/git/qemu/simpletrace.c: In function
> ‘write_header’:
> /home/prerna/qemu-testing/git/qemu/simpletrace.c:46: error: integer
> constant is too large for ‘long’ type
> /home/prerna/qemu-testing/git/qemu/simpletrace.c:46: error: large
> integer implicitly truncated to unsigned type
> make: *** [simpletrace.o] Error 1
>
> The error arises due to :
> TraceRecord header = {
> .event = -1UL, /* max avoids conflicting with TraceEventIDs */
> .timestamp_ns = 0xf2b177cb0aa429b4, /* magic number */
> ^^^^^^^^ error.
>
> 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
next prev parent reply other threads:[~2010-08-09 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 8:56 [Qemu-devel] [Tracing] Compilation failure Prerna Saxena
2010-08-09 9:35 ` Stefan Hajnoczi [this message]
2010-08-09 13:35 ` [Qemu-devel] [PATCH] trace: Make trace record fields 64-bit Stefan Hajnoczi
2010-08-11 6:03 ` Prerna Saxena
2010-08-11 9:37 ` malc
2010-08-11 11:13 ` [Qemu-devel] [PATCH v2] " Prerna Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100809093537.GA3224@stefan-thinkpad.transitives.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=prerna@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).