Re: [PATCH] perf/ftrace: fix doubled traces of perf on ftrace:function

From: Jiri Olsa
Date: Mon Aug 28 2017 - 07:07:15 EST


On Fri, Aug 25, 2017 at 09:49:37PM +0800, Zhou Chengming wrote:

SNIP

> diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> index 562fa69..70c5025 100644
> --- a/kernel/trace/trace_event_perf.c
> +++ b/kernel/trace/trace_event_perf.c
> @@ -306,6 +306,7 @@ void perf_trace_buf_update(void *record, u16 type)
> perf_ftrace_function_call(unsigned long ip, unsigned long parent_ip,
> struct ftrace_ops *ops, struct pt_regs *pt_regs)
> {
> + struct perf_event *event;
> struct ftrace_entry *entry;
> struct hlist_head *head;
> struct pt_regs regs;
> @@ -329,8 +330,9 @@ void perf_trace_buf_update(void *record, u16 type)
>
> entry->ip = ip;
> entry->parent_ip = parent_ip;
> + event = container_of(ops, struct perf_event, ftrace_ops);

nit, white space at the end of the line ^^^

but the change looks good to me

Reviewed-by: Jiri Olsa <jolsa@xxxxxxxxxx>

thanks,
jirka