diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-09-04 11:00:56 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-04 11:00:56 +0200 |
commit | 21adf76e908dd03ae47c8f4dd53b180996a725ad (patch) | |
tree | 88307bdcec159241751bb621049ed9a3bf928560 | |
parent | 5b923564ccf43f92969c9e0fd199c8c5db657039 (diff) | |
parent | 53ff6bc37be449f546158a39c528d7814dfb15a1 (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
- In some cases where perf_event.fork.{pid,tid} should be used we were instead
using perf_event.comm.{pid,tid}, which is not a problem for for the 'pid'
case, that sits in the same place in these union_perf_event members, but
comm.tid sits where fork.ppid is, oops.
These cases were considered as (potentially) problematic:
- 'perf script' with !sample_id_all, i.e. only non old kernels without
perf_event_attr.sample_id_all.
- intel_pt could be affected when decoding without timestamps, as the exit
event is only used to flush out data which anyway gets flushed at the
end of the session.
- intel_bts also uses the exit event to flush data which would probably not
cause errors as it would get flushed at the end of the session instead.
Fix it. (Adrian Hunter)
- Due to relaxing the compiler checks for bison generated files, we missed
updating one parse_events_add_pmu() caller when this function had its
prototype changed, fix it. (Jiri Olsa)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/perf/builtin-script.c | 4 | ||||
-rw-r--r-- | tools/perf/util/intel-bts.c | 2 | ||||
-rw-r--r-- | tools/perf/util/intel-pt.c | 2 | ||||
-rw-r--r-- | tools/perf/util/parse-events.y | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index eb51325e8ad9..284a76e04628 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -768,8 +768,8 @@ static int process_exit_event(struct perf_tool *tool, if (!evsel->attr.sample_id_all) { sample->cpu = 0; sample->time = 0; - sample->tid = event->comm.tid; - sample->pid = event->comm.pid; + sample->tid = event->fork.tid; + sample->pid = event->fork.pid; } print_sample_start(sample, thread, evsel); perf_event__fprintf(event, stdout); diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index ea768625ab5b..eb0e7f8bf515 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -623,7 +623,7 @@ static int intel_bts_process_event(struct perf_session *session, if (err) return err; if (event->header.type == PERF_RECORD_EXIT) { - err = intel_bts_process_tid_exit(bts, event->comm.tid); + err = intel_bts_process_tid_exit(bts, event->fork.tid); if (err) return err; } diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index bb41c20e6005..535d86f8e4d1 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1494,7 +1494,7 @@ static int intel_pt_process_event(struct perf_session *session, if (pt->timeless_decoding) { if (event->header.type == PERF_RECORD_EXIT) { err = intel_pt_process_timeless_queues(pt, - event->comm.tid, + event->fork.tid, sample->time); } } else if (timestamp) { diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y index 591905a02b92..9cd70819c795 100644 --- a/tools/perf/util/parse-events.y +++ b/tools/perf/util/parse-events.y @@ -255,7 +255,7 @@ PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF sep_dc list_add_tail(&term->list, head); ALLOC_LIST(list); - ABORT_ON(parse_events_add_pmu(list, &data->idx, "cpu", head)); + ABORT_ON(parse_events_add_pmu(data, list, "cpu", head)); parse_events__free_terms(head); $$ = list; } |