提交 48095b72 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

perf tests: Handle throttle events in 'object code reading' test

Unhandled events cause an error that fails the test, fix it.
Reported-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/5281DFE5.3000909@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 33c2dcfd
......@@ -275,8 +275,19 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
if (event->header.type == PERF_RECORD_SAMPLE)
return process_sample_event(machine, evlist, event, state);
if (event->header.type < PERF_RECORD_MAX)
return machine__process_event(machine, event, NULL);
if (event->header.type == PERF_RECORD_THROTTLE ||
event->header.type == PERF_RECORD_UNTHROTTLE)
return 0;
if (event->header.type < PERF_RECORD_MAX) {
int ret;
ret = machine__process_event(machine, event, NULL);
if (ret < 0)
pr_debug("machine__process_event failed, event type %u\n",
event->header.type);
return ret;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册