linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Paul Mackerras <paulus@samba.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jason Baron <jbaron@redhat.com>,
	Archs <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 1/2] perf: Introduce new perf_save_regs() for hot regs snapshot
Date: Fri, 05 Mar 2010 10:08:07 -0500	[thread overview]
Message-ID: <4B911E57.60004@redhat.com> (raw)
In-Reply-To: <1267758486-30499-2-git-send-regression-fweisbec@gmail.com>

Frederic Weisbecker wrote:
> Events that trigger overflows by interrupting a context can
> use get_irq_regs() or task_pt_regs() to retrieve the state
> when the event triggered. But this is not the case for some
> other class of events like trace events as tracepoints are
> executed in the same context than the code that triggered
> the event.
> 
> It means we need a different api to capture the regs there,
> namely we need a hot snapshot to get the most important
> informations for perf: the instruction pointer to get the
> event origin, the frame pointer for the callchain, the code
> segment for user_mode() tests (we always use __KERNEL_CS as
> trace events always occur from the kernel) and the eflags
> for further purposes.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Jason Baron <jbaron@redhat.com>
> Cc: Archs <linux-arch@vger.kernel.org>
> ---
>  arch/x86/kernel/cpu/perf_event.c |   12 ++++++++++
>  arch/x86/kernel/dumpstack.h      |   15 +++++++++++++
>  include/linux/perf_event.h       |   42 +++++++++++++++++++++++++++++++++++++-
>  kernel/perf_event.c              |    5 ++++
>  4 files changed, 73 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index 641ccb9..274d0cd 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -1662,6 +1662,18 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
>  	return entry;
>  }
>  
> +void perf_arch_save_regs(struct pt_regs *regs, unsigned long ip, int skip)

Hmm, why would you call it 'save_regs' ?
It seems that this function is just for fixing registers 
instead of saving it into somewhere...

Thank you,


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

  reply	other threads:[~2010-03-05 15:08 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03  6:54 [GIT PULL] perf updates Frederic Weisbecker
2010-03-03  6:55 ` [PATCH 1/3] lockdep: Move lock events under lockdep recursion protection Frederic Weisbecker
2010-03-09  7:18   ` Hitoshi Mitake
2010-03-10  0:10     ` Frederic Weisbecker
2010-03-09  8:34   ` Jens Axboe
2010-03-09  8:35     ` Jens Axboe
2010-03-10  0:05       ` Frederic Weisbecker
2010-03-10 15:45         ` Peter Zijlstra
2010-03-10 15:56           ` Jens Axboe
2010-03-10 15:55         ` Jens Axboe
2010-03-09 23:45     ` Frederic Weisbecker
2010-03-10 15:55       ` Jens Axboe
2010-03-03  6:55 ` [RFC][PATCH 2/3] perf: Take a hot regs snapshot for trace events Frederic Weisbecker
2010-03-03  8:38   ` Peter Zijlstra
2010-03-03 20:07     ` Frederic Weisbecker
2010-03-04 19:01     ` Frederic Weisbecker
2010-03-05  3:08     ` [PATCH 0/2] Perf " Frederic Weisbecker
2010-03-05  3:08     ` [PATCH 1/2] perf: Introduce new perf_save_regs() for hot regs snapshot Frederic Weisbecker
2010-03-05 15:08       ` Masami Hiramatsu [this message]
2010-03-05 16:38         ` Frederic Weisbecker
2010-03-05 17:08           ` Masami Hiramatsu
2010-03-05 17:17             ` Frederic Weisbecker
2010-03-05 20:55             ` [PATCH 1/2] perf: Introduce new perf_fetch_caller_regs() " Frederic Weisbecker
2010-03-05 20:55             ` [PATCH 2/2] perf: Take a hot regs snapshot for trace events Frederic Weisbecker
2010-03-05  3:08     ` Frederic Weisbecker
2010-03-03 16:06   ` [RFC][PATCH 2/3] " Steven Rostedt
2010-03-03 16:37     ` Peter Zijlstra
2010-03-03 17:07       ` Steven Rostedt
2010-03-03 17:16         ` Peter Zijlstra
2010-03-03 17:45           ` Steven Rostedt
2010-03-03 20:37             ` Frederic Weisbecker
2010-03-04 11:25           ` Ingo Molnar
2010-03-04 15:16             ` Steven Rostedt
2010-03-04 15:36               ` Ingo Molnar
2010-03-04 15:55                 ` Steven Rostedt
2010-03-04 21:17                   ` Ingo Molnar
2010-03-04 21:30                     ` Steven Rostedt
2010-03-04 21:37                       ` Frederic Weisbecker
2010-03-04 21:52                         ` Thomas Gleixner
2010-03-04 22:01                           ` Frederic Weisbecker
2010-03-04 22:02                         ` Steven Rostedt
2010-03-04 22:09                           ` Frederic Weisbecker
2010-03-03  6:55 ` [PATCH 3/3] perf/x86-64: Use frame pointer to walk on irq and process stacks 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=4B911E57.60004@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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).