lkml.org 
[lkml]   [2017]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2017-10-11 18:41    [W:0.067 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site