summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-09-04 11:00:56 +0200
committerIngo Molnar <mingo@kernel.org>2015-09-04 11:00:56 +0200
commit21adf76e908dd03ae47c8f4dd53b180996a725ad (patch)
tree88307bdcec159241751bb621049ed9a3bf928560
parent5b923564ccf43f92969c9e0fd199c8c5db657039 (diff)
parent53ff6bc37be449f546158a39c528d7814dfb15a1 (diff)
downloadop-kernel-dev-21adf76e908dd03ae47c8f4dd53b180996a725ad.zip
op-kernel-dev-21adf76e908dd03ae47c8f4dd53b180996a725ad.tar.gz
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.c4
-rw-r--r--tools/perf/util/intel-bts.c2
-rw-r--r--tools/perf/util/intel-pt.c2
-rw-r--r--tools/perf/util/parse-events.y2
4 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index eb51325..284a76e 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 ea76862..eb0e7f8 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 bb41c20..535d86f 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 591905a..9cd7081 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;
}
OpenPOWER on IntegriCloud