Re: [PATCH 1/2] perf: Add persistent events

From: Steven Rostedt
Date: Mon May 24 2010 - 23:11:28 EST


On Sat, 2010-05-22 at 21:04 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxxxx>
>
> Register and enable events marked as persistent right after perf events
> has initialized.
>
> Not-yet-signed-off-by: Borislav Petkov <bp@xxxxxxxxx>
> ---
> include/linux/ftrace_event.h | 10 +++++++
> include/linux/perf_event.h | 1 +
> kernel/perf_event.c | 59 +++++++++++++++++++++++++++++++++++++----
> kernel/trace/trace.h | 1 -
> 4 files changed, 64 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
> index c0f4b36..b40d637 100644
> --- a/include/linux/ftrace_event.h
> +++ b/include/linux/ftrace_event.h
> @@ -13,6 +13,8 @@ struct dentry;
>
> DECLARE_PER_CPU(struct trace_seq, ftrace_event_seq);
>
> +extern struct list_head ftrace_events;
> +
> struct trace_print_flags {
> unsigned long mask;
> const char *name;
> @@ -134,6 +136,7 @@ struct ftrace_event_call {
> int perf_refcount;
> int (*perf_event_enable)(struct ftrace_event_call *);
> void (*perf_event_disable)(struct ftrace_event_call *);
> + unsigned int type;
> };

If you look at lastest tip/perf/core, can you add this to the
ftrace_event_class instead. Or if it must be per event, can we find a
way to include it into the flags field. Changes to flags must have the
event_mutex held.

-- Steve

>
> #define PERF_MAX_TRACE_SIZE 2048
> @@ -155,6 +158,13 @@ enum {
> FILTER_PTR_STRING,
> };



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/