aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-03-02 06:35:37 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-02 09:06:46 -0500
commit320ebf09cbb6d01954c9a060266aa8e0d27f4638 (patch)
tree0069898e64171dd89834327b0180c6d90860b46a /include/linux/perf_event.h
parentbb1165d6882f423f90fc7007a88c6c993b7c2ac4 (diff)
perf, x86: Restrict the ANY flag
The ANY flag can show SMT data of another task (like 'top'), so we want to disable it when system-wide profiling is disabled. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 04f06b4be297..90e0521b1690 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -857,6 +857,21 @@ extern int sysctl_perf_event_paranoid;
857extern int sysctl_perf_event_mlock; 857extern int sysctl_perf_event_mlock;
858extern int sysctl_perf_event_sample_rate; 858extern int sysctl_perf_event_sample_rate;
859 859
860static inline bool perf_paranoid_tracepoint_raw(void)
861{
862 return sysctl_perf_event_paranoid > -1;
863}
864
865static inline bool perf_paranoid_cpu(void)
866{
867 return sysctl_perf_event_paranoid > 0;
868}
869
870static inline bool perf_paranoid_kernel(void)
871{
872 return sysctl_perf_event_paranoid > 1;
873}
874
860extern void perf_event_init(void); 875extern void perf_event_init(void);
861extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); 876extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size);
862extern void perf_bp_event(struct perf_event *event, void *data); 877extern void perf_bp_event(struct perf_event *event, void *data);