Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288656
b: refs/heads/master
c: 0c09571
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel authored and Arnaldo Carvalho de Melo committed Feb 14, 2012
1 parent 2ba79f1 commit 8ca82e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b52956c961be3a04182ae7b776623531601e0fb7
refs/heads/master: 0c095715b388d19d7a0b7e8eaceeceb018f5b3d1
6 changes: 6 additions & 0 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,12 @@ static void perf_event__process_sample(struct perf_tool *tool,
return;
}

if (!machine) {
pr_err("%u unprocessable samples recorded.",
top->session->hists.stats.nr_unprocessable_samples++);
return;
}

if (event->header.misc & PERF_RECORD_MISC_EXACT_IP)
top->exact_samples++;

Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/hist.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct events_stats {
u32 nr_unknown_events;
u32 nr_invalid_chains;
u32 nr_unknown_id;
u32 nr_unprocessable_samples;
};

enum hist_column {
Expand Down
10 changes: 10 additions & 0 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,10 @@ static int perf_session_deliver_event(struct perf_session *session,
++session->hists.stats.nr_unknown_id;
return -1;
}
if (machine == NULL) {
++session->hists.stats.nr_unprocessable_samples;
return -1;
}
return tool->sample(tool, event, sample, evsel, machine);
case PERF_RECORD_MMAP:
return tool->mmap(tool, event, sample, machine);
Expand Down Expand Up @@ -964,6 +968,12 @@ static void perf_session__warn_about_errors(const struct perf_session *session,
session->hists.stats.nr_invalid_chains,
session->hists.stats.nr_events[PERF_RECORD_SAMPLE]);
}

if (session->hists.stats.nr_unprocessable_samples != 0) {
ui__warning("%u unprocessable samples recorded.\n"
"Do you have a KVM guest running and not using 'perf kvm'?\n",
session->hists.stats.nr_unprocessable_samples);
}
}

#define session_done() (*(volatile int *)(&session_done))
Expand Down

0 comments on commit 8ca82e1

Please sign in to comment.