diff options
author | Franck Bui-Huu <fbuihuu@gmail.com> | 2010-11-23 15:21:43 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-11-26 14:14:54 (GMT) |
commit | 6c7e550f13f8ad82efb6a5653ae628c2543c1768 (patch) | |
tree | 1c994b999648fbe51ffe4312e2d6827aedd5f012 /include/linux/perf_event.h | |
parent | 35d3778a8fe3c8b4a7513565e34d3bde00ce43ec (diff) | |
download | linux-fsl-qoriq-6c7e550f13f8ad82efb6a5653ae628c2543c1768.tar.xz |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index de2c417..cbf04cc 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, 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 */ |