Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e706114 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
parent 97b07b69
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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) {
@@ -785,6 +785,7 @@ static int __cmd_report(void)
	default: {
		fprintf(stderr, "skipping unknown header type: %d\n",
			event->header.type);
		total_unknown++;
	}
	}

@@ -799,6 +800,7 @@ static int __cmd_report(void)
		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;
	}