Commit 21adf76e authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-urgent-for-mingo' of...

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 5b923564 53ff6bc3
...@@ -768,8 +768,8 @@ static int process_exit_event(struct perf_tool *tool, ...@@ -768,8 +768,8 @@ static int process_exit_event(struct perf_tool *tool,
if (!evsel->attr.sample_id_all) { if (!evsel->attr.sample_id_all) {
sample->cpu = 0; sample->cpu = 0;
sample->time = 0; sample->time = 0;
sample->tid = event->comm.tid; sample->tid = event->fork.tid;
sample->pid = event->comm.pid; sample->pid = event->fork.pid;
} }
print_sample_start(sample, thread, evsel); print_sample_start(sample, thread, evsel);
perf_event__fprintf(event, stdout); perf_event__fprintf(event, stdout);
......
...@@ -623,7 +623,7 @@ static int intel_bts_process_event(struct perf_session *session, ...@@ -623,7 +623,7 @@ static int intel_bts_process_event(struct perf_session *session,
if (err) if (err)
return err; return err;
if (event->header.type == PERF_RECORD_EXIT) { 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) if (err)
return err; return err;
} }
......
...@@ -1494,7 +1494,7 @@ static int intel_pt_process_event(struct perf_session *session, ...@@ -1494,7 +1494,7 @@ static int intel_pt_process_event(struct perf_session *session,
if (pt->timeless_decoding) { if (pt->timeless_decoding) {
if (event->header.type == PERF_RECORD_EXIT) { if (event->header.type == PERF_RECORD_EXIT) {
err = intel_pt_process_timeless_queues(pt, err = intel_pt_process_timeless_queues(pt,
event->comm.tid, event->fork.tid,
sample->time); sample->time);
} }
} else if (timestamp) { } else if (timestamp) {
......
...@@ -255,7 +255,7 @@ PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF sep_dc ...@@ -255,7 +255,7 @@ PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF sep_dc
list_add_tail(&term->list, head); list_add_tail(&term->list, head);
ALLOC_LIST(list); 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); parse_events__free_terms(head);
$$ = list; $$ = list;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment