Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Steven Rostedt
I believe that Jiri understands this code better than I do. On Tue, 10 Oct 2017 17:21:46 +0200 Peter Zijlstra wrote: > On Tue, Oct 10, 2017 at 03:04:48PM +0200, Peter Zijlstra wrote: > > On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > > > But now

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Steven Rostedt
I believe that Jiri understands this code better than I do. On Tue, 10 Oct 2017 17:21:46 +0200 Peter Zijlstra wrote: > On Tue, Oct 10, 2017 at 03:04:48PM +0200, Peter Zijlstra wrote: > > On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > > > But now you've got me looking at

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 03:04:48PM +0200, Peter Zijlstra wrote: > On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > > But now you've got me looking at 75e8387685f6, which also looks > > completely insane. > > The reason I insta stumbled on that patch is that it only addresses the

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 03:04:48PM +0200, Peter Zijlstra wrote: > On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > > But now you've got me looking at 75e8387685f6, which also looks > > completely insane. > > The reason I insta stumbled on that patch is that it only addresses the

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 08:18:13PM +0800, chengjian (D) wrote: > and what cases should the events be delivered multiple times? Task-A Task-B Task-C Task-D fd = sys_perf_event_open(B) fd = sys_perf_event_open(C) wake_up_process(C)

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 08:18:13PM +0800, chengjian (D) wrote: > and what cases should the events be delivered multiple times? Task-A Task-B Task-C Task-D fd = sys_perf_event_open(B) fd = sys_perf_event_open(C) wake_up_process(C)

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > But now you've got me looking at 75e8387685f6, which also looks > completely insane. The reason I insta stumbled on that patch is that it only addresses the ftrace situation and doesn't mention the other _5_ places that use this

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 01:33:21PM +0200, Peter Zijlstra wrote: > But now you've got me looking at 75e8387685f6, which also looks > completely insane. The reason I insta stumbled on that patch is that it only addresses the ftrace situation and doesn't mention the other _5_ places that use this

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread chengjian (D)
On 2017/10/10 19:33, Peter Zijlstra wrote: No, this _cannot_ be right. The whole point of the @task argument was to deliver the event multiple times -- maybe not to the same event, but it needs to be delivered multiple times in some cases. Therefore this is broken. But now you've got me

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread chengjian (D)
On 2017/10/10 19:33, Peter Zijlstra wrote: No, this _cannot_ be right. The whole point of the @task argument was to deliver the event multiple times -- maybe not to the same event, but it needs to be delivered multiple times in some cases. Therefore this is broken. But now you've got me

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 09:19:39AM +0800, Cheng Jian wrote: > diff --git a/kernel/events/core.c b/kernel/events/core.c > index baa134c..5682ead 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -7988,12 +7988,16 @@ void perf_tp_event(u16 event_type, u64 count, void > *record,

Re: [PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-10 Thread Peter Zijlstra
On Tue, Oct 10, 2017 at 09:19:39AM +0800, Cheng Jian wrote: > diff --git a/kernel/events/core.c b/kernel/events/core.c > index baa134c..5682ead 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -7988,12 +7988,16 @@ void perf_tp_event(u16 event_type, u64 count, void > *record,

[PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-09 Thread Cheng Jian
When use perf to trace the sched_wakeup and sched_wakeup_new tracepoint, there is a bug that output the same event repetitiously. It can be reproduced by : perf record -e sched:sched_wakeup_new ./bug_fork bug_fork is an demo that can generating wakeup_new events : the parent

[PATCH] perf/ftrace : Fix repetitious traces when specify a target task

2017-10-09 Thread Cheng Jian
When use perf to trace the sched_wakeup and sched_wakeup_new tracepoint, there is a bug that output the same event repetitiously. It can be reproduced by : perf record -e sched:sched_wakeup_new ./bug_fork bug_fork is an demo that can generating wakeup_new events : the parent