Re: [PATCH 1/5] perf tools: Fix -C option for record command

From: Oleg Nesterov
Date: Tue Feb 26 2013 - 09:45:41 EST


On 02/25, Jiri Olsa wrote:
>
> On Mon, Feb 25, 2013 at 11:56:38AM -0700, David Ahern wrote:
>
> > If a target is given (-a, -C, -p or -t) that is what the data is
> > collected for -- all cpus, a cpu, or one or more task ids. The
> > workload in that case becomes a means for bounding the data
> > collection (start and end points).

OK, so I misunderstood the intent and misread the code. Thanks
David.

> yes, that's what actually this patch fixies.. now you can run:
>
> perf record -C 0 ls
>
> and that will attach to cpu 0 only (same as '-a -C 0' before)

Yes, and thus this is consistent with -a and correct. Thanks and
sorry for noise.


But,

> maybe we could consider having:
>
> perf record -C 0 ls
> - attaching to CPU 0 and ls workload pid
>
> perf record -a -C 0 ls
> - attaching to CPU 0 globaly

Can't really comment since I am not a perf user, but imho looks good.

And useful. And least this behaviour was useful to me when I tried
to test the perf/uprobe changes.

Oleg.

--
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/