linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: David Ahern <daahern@cisco.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Ingo Molnar <mingo@elte.hu>,
	linux-perf-users@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: perf timechart broken
Date: Mon, 17 Jan 2011 11:50:04 +0100	[thread overview]
Message-ID: <201101171150.05444.trenn@suse.de> (raw)
In-Reply-To: <4D308331.6010106@cisco.com>

On Friday 14 January 2011 18:09:05 David Ahern wrote:
> 
> On 01/14/11 10:00, Thomas Renninger wrote:
> >> http://www.mail-archive.com/linux-perf-
> > users@vger.kernel.org/msg00057.html
> > Looks slightly different, the segfault should happen in:
> > process_sample_event
> > But looks very much related, possibly it has not been made/make with 
> > DEBUG=1
> > and -O6 was added and the backtrace is not 100% correct?
> 
> perf was built with DEBUG=1; that's how I got the pretty backtrace
> versus having the arguments optimized out. The cpu=6291457 is the
> garbage causing the segfault
Then it's the same issue.

> (there are only 2 cores in the system).
> 6291457 = 0x600001. Perhaps a mask is missing?
No, the power_start and power_end event have different kernel
structures, but in builtin-timechart.c the same struct is used.
cpu is at the end.
Therefore pe->cpu_id (in power_end case) accesses uninitialized
data.

But using the cpu data from the event itself (data.cpu, the cpu on
which the event got emited) for fixing this is fine.
It's the way it was done before the bug got introduced.
As said, this won't work if the kernel code triggering the C-state
is executed on a different CPU than the CPU which is affected by
the C-state change. But such HW does not yet exist on X86 afaik and the
power_start event dies out anyway.

I resubmitted the fix for 2.6.3{6,7} stable kernels and added you
to CC.

   Thomas

      reply	other threads:[~2011-01-17 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 10:04 perf timechart broken Thomas Renninger
2011-01-07 12:33 ` Ingo Molnar
2011-01-11  1:36 ` Frederic Weisbecker
2011-01-11  8:55   ` Thomas Renninger
2011-01-11 11:49     ` Arnaldo Carvalho de Melo
2011-01-11 14:51       ` Arnaldo Carvalho de Melo
2011-01-14 16:49         ` Thomas Renninger
2011-01-14 17:37           ` Arnaldo Carvalho de Melo
2011-01-11 18:56     ` David Ahern
2011-01-14 17:00       ` Thomas Renninger
2011-01-14 17:09         ` David Ahern
2011-01-17 10:50           ` Thomas Renninger [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=201101171150.05444.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=acme@redhat.com \
    --cc=daahern@cisco.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).