aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-02-16 05:22:34 -0500
committerIngo Molnar <mingo@elte.hu>2011-02-16 07:30:55 -0500
commit163ec4354a5135c6c38c3f4a9b46a31900ebdf48 (patch)
tree59063e726453ace397c66d95cab09ac43265be41 /include/linux
parent4979d2729af22f6ce8faa325fc60a85a2c2daa02 (diff)
perf: Optimize throttling code
By pre-computing the maximum number of samples per tick we can avoid a multiplication and a conditional since MAX_INTERRUPTS > max_samples_per_tick. 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')
-rw-r--r--include/linux/perf_event.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 38c8b2554842..8ceb5a6fd9c9 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1110,6 +1110,10 @@ extern int sysctl_perf_event_paranoid;
1110extern int sysctl_perf_event_mlock; 1110extern int sysctl_perf_event_mlock;
1111extern int sysctl_perf_event_sample_rate; 1111extern int sysctl_perf_event_sample_rate;
1112 1112
1113extern int perf_proc_update_handler(struct ctl_table *table, int write,
1114 void __user *buffer, size_t *lenp,
1115 loff_t *ppos);
1116
1113static inline bool perf_paranoid_tracepoint_raw(void) 1117static inline bool perf_paranoid_tracepoint_raw(void)
1114{ 1118{
1115 return sysctl_perf_event_paranoid > -1; 1119 return sysctl_perf_event_paranoid > -1;