From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
Anton Blanchard <anton@samba.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 1/2] perfcounter: Ignore the nmi call frames in the x86-64 backtraces
Date: Mon, 06 Jul 2009 14:17:48 +0200 [thread overview]
Message-ID: <1246882668.8143.10.camel@twins> (raw)
In-Reply-To: <1246474930-6088-1-git-send-email-fweisbec@gmail.com>
On Wed, 2009-07-01 at 21:02 +0200, Frederic Weisbecker wrote:
> +int x86_is_stack_id(int id, char *name)
> +{
> + return x86_stack_ids[id - 1] == name;
> +}
OK, this bit would need a bit of a comment explaining why this works, as
I don't think the C language guarantees de-duplication of constant
strings.
Therefore the above only works correctly if its passed a pointer from
the x86_stack_ids[] array -- as it indeed is, since the string passed is
obtained through the below method:
> +static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
> + unsigned *usedp, char **idp)
> +{
> unsigned k;
>
> /*
> @@ -61,7 +68,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
> if (*usedp & (1U << k))
> break;
> *usedp |= 1U << k;
> - *idp = ids[k];
> + *idp = x86_stack_ids[k];
> return (unsigned long *)end;
> }
> /*
next prev parent reply other threads:[~2009-07-06 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 19:02 [PATCH 1/2] perfcounter: Ignore the nmi call frames in the x86-64 backtraces Frederic Weisbecker
2009-07-01 19:02 ` [PATCH 2/2] perfcounter: Handle pipe read failures in perf stat Frederic Weisbecker
2009-07-01 20:40 ` [tip:perfcounters/urgent] perf_counter: Ignore the nmi call frames in the x86-64 backtraces tip-bot for Frederic Weisbecker
2009-07-06 12:17 ` Peter Zijlstra [this message]
2009-07-07 7:40 ` [PATCH 1/2] perfcounter: " Frederic Weisbecker
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=1246882668.8143.10.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=anton@samba.org \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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