[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 03 Mar 2010 11:06:27 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [RFC][PATCH 2/3] perf: Take a hot regs snapshot for trace
events
On Wed, 2010-03-03 at 07:55 +0100, Frederic Weisbecker wrote:
> +/*
> * Output
> */
> static bool perf_output_space(struct perf_mmap_data *data, unsigned long tail,
> @@ -4337,6 +4347,8 @@ static const struct pmu perf_ops_task_clock = {
> void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
> int entry_size)
> {
> + struct pt_regs regs;
> +
> struct perf_raw_record raw = {
> .size = entry_size,
> .data = record,
> @@ -4347,14 +4359,11 @@ void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
> .raw = &raw,
> };
>
> - struct pt_regs *regs = get_irq_regs();
> -
> - if (!regs)
> - regs = task_pt_regs(current);
> + PERF_SAVE_REGS(®s);
>
> /* Trace events already protected against recursion */
> do_perf_sw_event(PERF_TYPE_TRACEPOINT, event_id, count, 1,
> - &data, regs);
> + &data, ®s);
Off-topic: Why is the above a perf sw event? Couldn't that also be a
normal TRACE_EVENT()?
-- Steve
> }
> EXPORT_SYMBOL_GPL(perf_tp_event);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists