Skip to content

Commit

Permalink
oprofile: discover counters for op ppro too
Browse files Browse the repository at this point in the history
Discover number of counters for all family 6 models even when not
in arch perfmon mode.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Andi Kleen authored and Robert Richter committed Oct 13, 2008
1 parent b991702 commit 5951290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions arch/x86/oprofile/op_model_ppro.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ static void ppro_shutdown(struct op_msrs const * const msrs)
}


struct op_x86_model_spec const op_ppro_spec = {
.num_counters = 2,
.num_controls = 2,
struct op_x86_model_spec op_ppro_spec = {
.num_counters = 2, /* can be overriden */
.num_controls = 2, /* dito */
.fill_in_addresses = &ppro_fill_in_addresses,
.setup_ctrs = &ppro_setup_ctrs,
.check_ctrs = &ppro_check_ctrs,
Expand Down Expand Up @@ -238,6 +238,8 @@ void arch_perfmon_setup_counters(void)

op_arch_perfmon_spec.num_counters = num_counters;
op_arch_perfmon_spec.num_controls = num_counters;
op_ppro_spec.num_counters = num_counters;
op_ppro_spec.num_controls = num_counters;
}

struct op_x86_model_spec op_arch_perfmon_spec = {
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/oprofile/op_x86_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct op_x86_model_spec {
void (*shutdown)(struct op_msrs const * const msrs);
};

extern struct op_x86_model_spec const op_ppro_spec;
extern struct op_x86_model_spec op_ppro_spec;
extern struct op_x86_model_spec const op_p4_spec;
extern struct op_x86_model_spec const op_p4_ht2_spec;
extern struct op_x86_model_spec const op_amd_spec;
Expand Down

0 comments on commit 5951290

Please sign in to comment.