Messages in this thread | | | Date | Tue, 29 Mar 2016 14:06:09 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH V2 1/1] perf/core: don't find side-band event from all pmus |
| |
On Wed, Mar 23, 2016 at 11:24:37AM -0700, kan.liang@intel.com wrote: > The V2 patch is mainly based on Peter's suggestion. But I didn't rename > perf_event_aux to perf_event_sb. Because it looks there are many aux things > in the codes, e.g. AUX area in ring buffer. I'm not sure if we need to change > all aux to sb. We may do the rename later in separate patch.
Right.. no problem doing that in a separate patch.
> +static void perf_event_sb_mask(unsigned int sb_mask, > + perf_event_aux_output_cb output, > + void *data) > +{ > + int sb; > + > + for (sb = 0; sb < sb_nr; sb++) { > + if (!(sb_mask & (1 << sb))) > + continue; > + perf_event_sb_iterate(sb, output, data); > + } > +}
> @@ -5852,7 +5910,8 @@ static void perf_event_task(struct task_struct *task, > > perf_event_aux(perf_event_task_output, > &task_event, > - task_ctx); > + task_ctx, > + (1 << sb_task) | (1 << sb_mmap) | (1 << sb_comm)); > }
So one side-effect of this change is that the above event can be delivered 3 times if you're 'lucky'.
Acme; does userspace care?
| |