提交 3e706114 编写于 作者: I Ingo Molnar

perf report: add counter for unknown events

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: NIngo Molnar <mingo@elte.hu>
上级 97b07b69
...@@ -645,7 +645,7 @@ static int __cmd_report(void) ...@@ -645,7 +645,7 @@ static int __cmd_report(void)
char *buf; char *buf;
event_t *event; event_t *event;
int ret, rc = EXIT_FAILURE; 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); input = open(input_name, O_RDONLY);
if (input < 0) { if (input < 0) {
...@@ -785,6 +785,7 @@ static int __cmd_report(void) ...@@ -785,6 +785,7 @@ static int __cmd_report(void)
default: { default: {
fprintf(stderr, "skipping unknown header type: %d\n", fprintf(stderr, "skipping unknown header type: %d\n",
event->header.type); event->header.type);
total_unknown++;
} }
} }
...@@ -796,9 +797,10 @@ static int __cmd_report(void) ...@@ -796,9 +797,10 @@ static int __cmd_report(void)
close(input); close(input);
if (dump_trace) { if (dump_trace) {
fprintf(stderr, " IP events: %10ld\n", total); fprintf(stderr, " IP events: %10ld\n", total);
fprintf(stderr, " mmap events: %10ld\n", total_mmap); fprintf(stderr, " mmap events: %10ld\n", total_mmap);
fprintf(stderr, " comm events: %10ld\n", total_comm); fprintf(stderr, " comm events: %10ld\n", total_comm);
fprintf(stderr, " unknown events: %10ld\n", total_unknown);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册