perf session: Share the common trace sample_check routine as perf_session__has_traces
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1261957026-15580-5-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
4a58e61161
commit
27295592c2
@ -393,3 +393,14 @@ done:
|
||||
out_err:
|
||||
return err;
|
||||
}
|
||||
|
||||
int perf_session__has_traces(struct perf_session *self)
|
||||
{
|
||||
if (!(self->sample_type & PERF_SAMPLE_RAW)) {
|
||||
pr_err("No trace sample to read. Did you call perf record "
|
||||
"without -R?");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user