aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-02 15:42:56 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-02 15:42:59 -0400
commitf76bd108e5031202bb40849306f98c4afebe4ef6 (patch)
tree455e14a23642a82513eebd4e4f7d3b76842869cd /kernel/perf_counter.c
parentcd6feeeafddbef6abfe4d90fb26e42fd844d34ed (diff)
parenteced1dfcfcf6b0a35e925d73916a9d8e36ab5457 (diff)
Merge branch 'perfcounters/urgent' into perfcounters/core
Merge reason: We are going to modify a place modified by perfcounters/urgent. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 53abcbefa0bf..d988dfb4bbab 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -50,7 +50,7 @@ static atomic_t nr_task_counters __read_mostly;
50 * 1 - disallow cpu counters to unpriv 50 * 1 - disallow cpu counters to unpriv
51 * 2 - disallow kernel profiling to unpriv 51 * 2 - disallow kernel profiling to unpriv
52 */ 52 */
53int sysctl_perf_counter_paranoid __read_mostly; 53int sysctl_perf_counter_paranoid __read_mostly = 1;
54 54
55static inline bool perf_paranoid_cpu(void) 55static inline bool perf_paranoid_cpu(void)
56{ 56{
@@ -4103,6 +4103,7 @@ perf_counter_alloc(struct perf_counter_attr *attr,
4103 hwc->sample_period = attr->sample_period; 4103 hwc->sample_period = attr->sample_period;
4104 if (attr->freq && attr->sample_freq) 4104 if (attr->freq && attr->sample_freq)
4105 hwc->sample_period = 1; 4105 hwc->sample_period = 1;
4106 hwc->last_period = hwc->sample_period;
4106 4107
4107 atomic64_set(&hwc->period_left, hwc->sample_period); 4108 atomic64_set(&hwc->period_left, hwc->sample_period);
4108 4109