[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171011164048.v6fxp56kofzb4hfb@hirez.programming.kicks-ass.net>
Date: Wed, 11 Oct 2017 18:40:48 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: zhouchengming <zhouchengming1@...wei.com>
Cc: rostedt@...dmis.org, mingo@...nel.org,
linux-kernel@...r.kernel.org, jolsa@...nel.org
Subject: Re: [PATCH 2/4] perf/ftrace: Fix function trace events
On Wed, Oct 11, 2017 at 05:02:28PM +0800, zhouchengming wrote:
> On 2017/10/11 15:45, Peter Zijlstra wrote:
> > + if (!(flags& PERF_EF_START))
> > + p_event->hw.state = PERF_HES_STOPPED;
>
> Don't we need to check the flags for ftrace perf_event?
> So if we should put this outside the if (!tp_event->class->reg()) ?
Oh, right you are, that's independent of the hlist nonsense.
> > + list = this_cpu_ptr(pcpu_list);
> > + hlist_add_head_rcu(&p_event->hlist_entry, list);
> > + }
>
> Now we don't add perf_event to the pcpu_list, so we also can avoid
> to alloc pcpu_list for function tp_event in perf_trace_event_reg().
Yeah that allocation is superfluous, Not entirely sure how to cleanly
get rid of that though; that's another web to untangle.
Powered by blists - more mailing lists