Skip to content

Commit

Permalink
perf report: add counter for unknown events
Browse files Browse the repository at this point in the history
Add a counter for unknown event records.

[ Impact: improve debugging ]

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed May 26, 2009
1 parent 97b07b6 commit 3e70611
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Documentation/perf_counter/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ static int __cmd_report(void)
char *buf;
event_t *event;
int ret, rc = EXIT_FAILURE;
unsigned long total = 0, total_mmap = 0, total_comm = 0;
unsigned long total = 0, total_mmap = 0, total_comm = 0, total_unknown;

input = open(input_name, O_RDONLY);
if (input < 0) {
Expand Down Expand Up @@ -785,6 +785,7 @@ static int __cmd_report(void)
default: {
fprintf(stderr, "skipping unknown header type: %d\n",
event->header.type);
total_unknown++;
}
}

Expand All @@ -796,9 +797,10 @@ static int __cmd_report(void)
close(input);

if (dump_trace) {
fprintf(stderr, " IP events: %10ld\n", total);
fprintf(stderr, " mmap events: %10ld\n", total_mmap);
fprintf(stderr, " comm events: %10ld\n", total_comm);
fprintf(stderr, " IP events: %10ld\n", total);
fprintf(stderr, " mmap events: %10ld\n", total_mmap);
fprintf(stderr, " comm events: %10ld\n", total_comm);
fprintf(stderr, " unknown events: %10ld\n", total_unknown);

return 0;
}
Expand Down

0 comments on commit 3e70611

Please sign in to comment.