From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH] Xentrace: Avoid Crash on Debug Build Xen
Date: Tue, 09 Oct 2007 10:47:30 +0900 [thread overview]
Message-ID: <470ADDB2.3030008@ab.jp.nec.com> (raw)
In-Reply-To: <200710051721.06604.mark.williamson@cl.cam.ac.uk>
Mark Williamson wrote:
> }
> total_size += LOST_REC_SIZE;
> }
> -
> - ASSERT(bytes_to_wrap == calc_bytes_to_wrap(buf));
>
> if ( rec_size > bytes_to_wrap )
> {
> @@ -484,8 +482,6 @@ void __trace_var(u32 event, int cycles,
> insert_lost_records(buf);
> }
>
> - ASSERT(bytes_to_wrap == calc_bytes_to_wrap(buf));
> -
>
>> Current xen-unstable (debug build) crashes when using xentrace command,
>> due to assertion failures. It seems assertion failures occur whenever
>> there exist lost records, and I don't see much reason to do this.
>> (Could anyone explain about these ASSERT lines ?)
>
> These asserts appear to have originally been checking that bytes_to_wrap is
> being calculated correctly... It looks to me that the first assert
> isoutdated though, because it clearly will fail if a record is lost.
>
> Perhaps the second one ought to succed though, since the value of buf->prod
> will have been appropriately updated by insert_lost_records()?
Indeed the second assert seems to always succeed.
>
> Cheers,
> Mark
>
>> The attached patch removes assertions to avoid system crashes,
>> and also fixes a mistake of an assignment statement.
>>
>> Regards,
>> -------------------
>> Yosuke Iwamatsu
>> NEC Corporation
>
>
>
prev parent reply other threads:[~2007-10-09 1:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 1:54 [PATCH] Xentrace: Avoid Crash on Debug Build Xen Yosuke Iwamatsu
2007-10-05 16:21 ` Mark Williamson
2007-10-09 1:47 ` Yosuke Iwamatsu [this message]
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=470ADDB2.3030008@ab.jp.nec.com \
--to=y-iwamatsu@ab.jp.nec.com \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.