Re: [PATCH 2/2] perf: Userspace software event and ioctl

From: Ingo Molnar
Date: Fri Sep 26 2014 - 07:31:44 EST



* Pawel Moll <pawel.moll@xxxxxxx> wrote:

> On Fri, 2014-09-26 at 12:23 +0100, Ingo Molnar wrote:
> > > As in: allows *all* tasks to inject the data? Are you sure we
> > > don't want more fine-grained control, in particular per task?
> >
> > Yeah. If the profiler allows it, then any task that is being
> > traced can inject data.
>
> The "that is being traced" fragment was the key here. I missed
> the fact that perf trace already takes a list of pids, so we're
> not talking about all tasks in the system. That should work.

Yeah, when we generate a user trace event, we should look at the
currently active perf context's (percpu ones plus task ones), and
inject into those only.

This way we limit event generation to those buffers that are
actively interested in this task.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/