public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Soeren Sandmann <sandmann@daimi.au.dk>
Cc: "Søren Sandmann Pedersen" <ssp@redhat.com>,
	mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] x86: Eliminate bp argument from the stack tracing routines
Date: Thu, 18 Nov 2010 16:32:44 +0100	[thread overview]
Message-ID: <20101118153241.GA5374@nowhere> (raw)
In-Reply-To: <ye87hgorqoh.fsf@camel17.daimi.au.dk>

On Mon, Nov 08, 2010 at 12:38:22PM +0100, Soeren Sandmann wrote:
> Frederic Weisbecker <fweisbec@gmail.com> writes:
> 
> > > (FWIW, this
> > > 
> > > diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> > > index 461a85d..d977d26 100644
> > > --- a/arch/x86/kernel/cpu/perf_event.c
> > > +++ b/arch/x86/kernel/cpu/perf_event.c
> > > @@ -1653,7 +1653,7 @@ static const struct stacktrace_ops backtrace_ops = {
> > >  	.warning_symbol		= backtrace_warning_symbol,
> > >  	.stack			= backtrace_stack,
> > >  	.address		= backtrace_address,
> > > -	.walk_stack		= print_context_stack_bp,
> > > +	.walk_stack		= print_context_stack,
> > >  };
> > > 
> > > makes it produce correct kernel callchains. And yes, I did compile the
> > > kernel with CONFIG_FRAME_POINTER).
> > 
> > 
> > 
> > What do you see is broken in 64 bits perf callchains? Can you please provide
> > me more details so that I can fix the issue?
> 
> Apparently, the problem only happens when using the hrtimer based
> events. I don't think there is a way to make perf use those from the
> command line, but if you apply this:


You can, with perf record -e cpu-clock :)


> 
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -294,6 +294,12 @@ static void create_counter(int counter, int cpu)
>                 attr->enable_on_exec = 1;
>         }
>  
> +       if (attr->config == PERF_COUNT_HW_CPU_CYCLES && attr->type ==
> PERF_TYPE_HARDWARE)
> +       {
> +           attr->type = PERF_TYPE_SOFTWARE;
> +           attr->config = PERF_COUNT_SW_CPU_CLOCK;
> +       }
> +       
>         for (thread_index = 0; thread_index < thread_num; thread_index++) {
>  try_again:
>                 fd[nr_cpu][counter][thread_index] = sys_perf_event_open(attr,
> 
> you should be able to see the problem.  You can also try sysprof; it
> always uses the software counters.


Yep I can reproduce, there is indeed something weird happening there. I'll fix,
thanks for your report!!


  reply	other threads:[~2010-11-18 15:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ye8vdi7mluz.fsf@camel16.daimi.au.dk>
2009-10-22 16:34 ` [PATCH 2/2 -tip] perf: Don't generate events for the idle task when exclude_idle is set Soeren Sandmann
2009-10-22 16:38 ` [PATCH] x86: Get bp from the IRQ regs instead of directly from the CPU Soeren Sandmann
2009-10-23 10:50   ` Ingo Molnar
2009-10-29 12:46     ` Soeren Sandmann
2010-11-05 11:14   ` [PATCH 0/1] x86: Eliminate bp argument from the stack tracing routines Søren Sandmann Pedersen
2010-11-07 21:24     ` Frederic Weisbecker
2010-11-08 11:38       ` Soeren Sandmann
2010-11-18 15:32         ` Frederic Weisbecker [this message]
2010-11-05 11:14   ` [PATCH] " Søren Sandmann Pedersen
2009-10-23  7:35 ` [PATCH 1/2 -tip] perf: Keep track of remaining time when enabling/disabling swevent hrtimers Ingo Molnar

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=20101118153241.GA5374@nowhere \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sandmann@daimi.au.dk \
    --cc=ssp@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox