perf record: We should fork only if a program was specified to run
commitd4db3f164529013b11a171bb1bd38e8681ddaec8
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 27 Dec 2009 23:36:57 +0000 (27 21:36 -0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 28 Dec 2009 08:02:50 +0000 (28 09:02 +0100)
tree0198f14c37e86f88a7bc3443f93abc8cfbb266d4
parent0422a4fc2c6a41c3d4184984797512af2650014e
perf record: We should fork only if a program was specified to run

IOW: Now 'perf record -a' works, this was a bug introduced in:

856e96608a72412d319e498a3a7c557571f811bd
"perf record: Properly synchronize child creation"

Also fix the -C usage, i.e. allow for profiling all the tasks in
one CPU.

Reported-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-record.c