perf record: Allow specifying a pid to record
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 May 2009 01:50:46 +0000 (22:50 -0300)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 May 2009 07:35:24 +0000 (09:35 +0200)
commit1a853e36871b533ccc3f3c5bdd5cd0d867043a00
tree7280576c9e3e0795d8d0d9efa6611bb35bacc661
parent5bb9efe33ea4001a17ab98186a40a134a3061d67
perf record: Allow specifying a pid to record

Allow specifying a pid instead of always fork+exec'ing a command.

Because the PERF_EVENT_COMM and PERF_EVENT_MMAP events happened before
we connected, we must synthesize them so that 'perf report' can get what
it needs.

[ Impact: add new command line option ]

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20090515015046.GA13664@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/builtin-record.c