public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
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: Tue, 7 Jul 2009 09:40:58 +0200	[thread overview]
Message-ID: <20090707074057.GB6173@nowhere> (raw)
In-Reply-To: <1246882668.8143.10.camel@twins>

On Mon, Jul 06, 2009 at 02:17:48PM +0200, Peter Zijlstra wrote:
> 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:


Right, that need some comments, I will do that with x86-32 support at the same
time.

Thanks.


 
> > +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;
> >  		}
> >  		/*
> 
> 


      reply	other threads:[~2009-07-07  7:41 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 ` [PATCH 1/2] perfcounter: " Peter Zijlstra
2009-07-07  7:40   ` Frederic Weisbecker [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=20090707074057.GB6173@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=anton@samba.org \
    --cc=efault@gmx.de \
    --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