Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147176
b: refs/heads/master
c: 0dff86a
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Dec 23, 2008
1 parent d2631f2 commit 8cd8549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95cdd2e7851cce79ab839cb0b3cbe68d7911d0f1
refs/heads/master: 0dff86aa7b9ec65a6d07167b7afb050b5fc98ddc
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ static int pmc_generic_enable(struct perf_counter *counter)
idx = find_first_zero_bit(cpuc->used, nr_counters_generic);
if (idx == nr_counters_generic)
return -EAGAIN;

set_bit(idx, cpuc->used);
hwc->idx = idx;
}
Expand All @@ -274,6 +275,7 @@ static int pmc_generic_enable(struct perf_counter *counter)
void perf_counter_print_debug(void)
{
u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left;
struct cpu_hw_counters *cpuc;
int cpu, idx;

if (!nr_counters_generic)
Expand All @@ -282,6 +284,7 @@ void perf_counter_print_debug(void)
local_irq_disable();

cpu = smp_processor_id();
cpuc = &per_cpu(cpu_hw_counters, cpu);

rdmsrl(MSR_CORE_PERF_GLOBAL_CTRL, ctrl);
rdmsrl(MSR_CORE_PERF_GLOBAL_STATUS, status);
Expand All @@ -291,6 +294,7 @@ void perf_counter_print_debug(void)
printk(KERN_INFO "CPU#%d: ctrl: %016llx\n", cpu, ctrl);
printk(KERN_INFO "CPU#%d: status: %016llx\n", cpu, status);
printk(KERN_INFO "CPU#%d: overflow: %016llx\n", cpu, overflow);
printk(KERN_INFO "CPU#%d: used: %016llx\n", cpu, *(u64 *)cpuc->used);

for (idx = 0; idx < nr_counters_generic; idx++) {
rdmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + idx, pmc_ctrl);
Expand Down

0 comments on commit 8cd8549

Please sign in to comment.