aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2010-11-23 10:21:43 -0500
committerIngo Molnar <mingo@elte.hu>2010-11-26 09:14:54 -0500
commit6c7e550f13f8ad82efb6a5653ae628c2543c1768 (patch)
tree1c994b999648fbe51ffe4312e2d6827aedd5f012 /include/linux/perf_event.h
parent35d3778a8fe3c8b4a7513565e34d3bde00ce43ec (diff)
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>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index de2c41758e29..cbf04cc1e630 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -969,6 +969,11 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
969 struct perf_sample_data *data, 969 struct perf_sample_data *data,
970 struct pt_regs *regs); 970 struct pt_regs *regs);
971 971
972static inline bool is_sampling_event(struct perf_event *event)
973{
974 return event->attr.sample_period != 0;
975}
976
972/* 977/*
973 * Return 1 for a software event, 0 for a hardware event 978 * Return 1 for a software event, 0 for a hardware event
974 */ 979 */