[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130225193851.GD17149@krava.brq.redhat.com>
Date: Mon, 25 Feb 2013 20:38:51 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 1/5] perf tools: Fix -C option for record command
On Mon, Feb 25, 2013 at 11:56:38AM -0700, David Ahern wrote:
> On 2/25/13 11:39 AM, Oleg Nesterov wrote:
> >To clarify, I am not trying to review this patch, I'd like to ask
> >the question...
> >
> >On 02/25, Jiri Olsa wrote:
> >>
> >>Currently the -C option does not work for record command,
> >>because of the targets mismatch when synthesizing threads.
> >>
> >>Fixing this by using proper target interface for the
> >>synthesize decision.
> >
> >OK, but my fix had the different goal. I thought that
> >
> > $ perf ... record -C0 sleep 1
> >
> >should attach the counter to the child process (workload) and set
> >event->cpu = 0 (instead of -1). With this patch we create the cpu
>
> 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).
>
> If you want to collect events for a workload you just run
> perf-record -- workload.
>
> Last time I dug into it (which was 8-12 months ago) -C required -a
> to work properly. -a (system_wide) meaning collect events for all
> cpus and then -C meaning but only for this cpu. Perhaps Namyhung's
> target changes may have simplified fixing that as Jiri's patch
> suggests.
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)
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
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists