perf: Introduce is_sampling_event()
and use it when appropriate. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1290525705-6265-1-git-send-email-fbuihuu@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
35d3778a8f
commit
6c7e550f13
@ -969,6 +969,11 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
|
||||
struct perf_sample_data *data,
|
||||
struct pt_regs *regs);
|
||||
|
||||
static inline bool is_sampling_event(struct perf_event *event)
|
||||
{
|
||||
return event->attr.sample_period != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 for a software event, 0 for a hardware event
|
||||
*/
|
||||
|
Reference in New Issue
Block a user