From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH 2/2] perf: Use hot regs with software sched switch/migrate events
Date: Mon, 29 Mar 2010 10:49:59 +0200 [thread overview]
Message-ID: <1269852599.12097.159.camel@laptop> (raw)
In-Reply-To: <1269753066-17246-3-git-send-regression-fweisbec@gmail.com>
On Sun, 2010-03-28 at 07:11 +0200, Frederic Weisbecker wrote:
> Scheduler's task migration events don't work because they always
> pass NULL regs perf_sw_event(). The event hence gets filtered
> in perf_swevent_add().
>
> Scheduler's context switches events use task_pt_regs() to get
> the context when the event occured which is a wrong thing to
> do as this won't give us the place in the kernel where we went
> to sleep but the place where we left userspace. The result is
> even more wrong if we switch from a kernel thread.
>
> Use the hot regs snapshot for both events as they belong to the
> non-interrupt/exception based events family. Unlike page faults
> or so that provide the regs matching the exact origin of the event,
> we need to save the current context.
>
> This makes the task migration event working and fix the context
> switch callchains and origin ip.
But after this its no longer possible to profile userspace on context
switches is it?
next prev parent reply other threads:[~2010-03-29 9:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 5:11 [GIT PULL] perf fixes Frederic Weisbecker
2010-03-28 5:11 ` [PATCH 1/2] perf: Correctly align perf event tracing buffer Frederic Weisbecker
2010-03-29 8:51 ` Peter Zijlstra
2010-03-29 17:16 ` Frederic Weisbecker
2010-03-29 17:20 ` Peter Zijlstra
2010-03-29 17:51 ` Frederic Weisbecker
2010-03-28 5:11 ` [PATCH 2/2] perf: Use hot regs with software sched switch/migrate events Frederic Weisbecker
2010-03-29 8:49 ` Peter Zijlstra [this message]
2010-03-29 17:47 ` Frederic Weisbecker
2010-03-29 18:05 ` Peter Zijlstra
2010-03-29 22:43 ` Frederic Weisbecker
2010-03-29 22:53 ` Frederic Weisbecker
2010-03-30 18:54 ` Peter Zijlstra
2010-03-30 19:14 ` Frederic Weisbecker
2010-03-29 3:33 ` [GIT PULL] perf fixes 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=1269852599.12097.159.camel@laptop \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).