perf record: Fix use of sample_id_all userspace with !sample_id_all kernels
authorArnaldo Carvalho de Melo <[email protected]>
Sat, 25 Dec 2010 14:12:25 +0000 (12:12 -0200)
committerArnaldo Carvalho de Melo <[email protected]>
Sat, 25 Dec 2010 14:12:25 +0000 (12:12 -0200)
commita43d3f08c64125edbdfdc3d3aa512d3e37321f37
tree3d8a2e82045f13c0b1e1fe67601c632002882e93
parent765532c8aaac624b5f8687af6d319c6a1138a257
perf record: Fix use of sample_id_all userspace with !sample_id_all kernels

Check if parse_single_tracepoint_event has already asked for PERF_SAMPLE_TIME.

This is kludgy but short term fix for problems introduced by eac23d1c that
broke 'perf script' by having different sample_types when using multiple
tracepoint events when we use a perf binary that tries to use sample_id_all on
an older kernel.

We need to move counter creation to perf_session, support different
sample_types, etc.

Ongoing work on the perf test infrastructure needs this so that we can create
counters to monitor threads generating specific events, etc.

Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Torok Edwin <[email protected]>
Cc: Ian Munsie <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-record.c