diff options
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 74090a393a7c..f3359c2b3910 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -255,6 +255,7 @@ static int pmc_generic_enable(struct perf_counter *counter) | |||
255 | idx = find_first_zero_bit(cpuc->used, nr_counters_generic); | 255 | idx = find_first_zero_bit(cpuc->used, nr_counters_generic); |
256 | if (idx == nr_counters_generic) | 256 | if (idx == nr_counters_generic) |
257 | return -EAGAIN; | 257 | return -EAGAIN; |
258 | |||
258 | set_bit(idx, cpuc->used); | 259 | set_bit(idx, cpuc->used); |
259 | hwc->idx = idx; | 260 | hwc->idx = idx; |
260 | } | 261 | } |
@@ -274,6 +275,7 @@ static int pmc_generic_enable(struct perf_counter *counter) | |||
274 | void perf_counter_print_debug(void) | 275 | void perf_counter_print_debug(void) |
275 | { | 276 | { |
276 | u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left; | 277 | u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left; |
278 | struct cpu_hw_counters *cpuc; | ||
277 | int cpu, idx; | 279 | int cpu, idx; |
278 | 280 | ||
279 | if (!nr_counters_generic) | 281 | if (!nr_counters_generic) |
@@ -282,6 +284,7 @@ void perf_counter_print_debug(void) | |||
282 | local_irq_disable(); | 284 | local_irq_disable(); |
283 | 285 | ||
284 | cpu = smp_processor_id(); | 286 | cpu = smp_processor_id(); |
287 | cpuc = &per_cpu(cpu_hw_counters, cpu); | ||
285 | 288 | ||
286 | rdmsrl(MSR_CORE_PERF_GLOBAL_CTRL, ctrl); | 289 | rdmsrl(MSR_CORE_PERF_GLOBAL_CTRL, ctrl); |
287 | rdmsrl(MSR_CORE_PERF_GLOBAL_STATUS, status); | 290 | rdmsrl(MSR_CORE_PERF_GLOBAL_STATUS, status); |
@@ -291,6 +294,7 @@ void perf_counter_print_debug(void) | |||
291 | printk(KERN_INFO "CPU#%d: ctrl: %016llx\n", cpu, ctrl); | 294 | printk(KERN_INFO "CPU#%d: ctrl: %016llx\n", cpu, ctrl); |
292 | printk(KERN_INFO "CPU#%d: status: %016llx\n", cpu, status); | 295 | printk(KERN_INFO "CPU#%d: status: %016llx\n", cpu, status); |
293 | printk(KERN_INFO "CPU#%d: overflow: %016llx\n", cpu, overflow); | 296 | printk(KERN_INFO "CPU#%d: overflow: %016llx\n", cpu, overflow); |
297 | printk(KERN_INFO "CPU#%d: used: %016llx\n", cpu, *(u64 *)cpuc->used); | ||
294 | 298 | ||
295 | for (idx = 0; idx < nr_counters_generic; idx++) { | 299 | for (idx = 0; idx < nr_counters_generic; idx++) { |
296 | rdmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + idx, pmc_ctrl); | 300 | rdmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + idx, pmc_ctrl); |