summaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile/op_x86_model.h
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-02-23 18:14:58 +0100
committerRobert Richter <robert.richter@amd.com>2010-02-26 15:14:03 +0100
commit98a2e73a0690b3610f049a64154d8145e5771713 (patch)
treec58da8c5ffb458094af9681ec47f8b5e647f8d42 /arch/x86/oprofile/op_x86_model.h
parentba52078e1917c5116c0802298d88ad0e54a6728b (diff)
downloadblackbird-op-linux-98a2e73a0690b3610f049a64154d8145e5771713.tar.gz
blackbird-op-linux-98a2e73a0690b3610f049a64154d8145e5771713.zip
oprofile/x86: warn user if a counter is already active
This patch generates a warning if a counter is already active. Implemented for AMD and P6 models. P4 is not supported. Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Cc: Shashi Belur <shashi-kiran.belur@hp.com> Cc: Tony Jones <tonyj@suse.de> Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_x86_model.h')
-rw-r--r--arch/x86/oprofile/op_x86_model.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h
index 7b8e75d16081..59fa2bdb0da3 100644
--- a/arch/x86/oprofile/op_x86_model.h
+++ b/arch/x86/oprofile/op_x86_model.h
@@ -57,6 +57,17 @@ struct op_x86_model_spec {
struct op_counter_config;
+static inline void op_x86_warn_in_use(int counter)
+{
+ pr_warning("oprofile: counter #%d on cpu #%d may already be used\n",
+ counter, smp_processor_id());
+}
+
+static inline void op_x86_warn_reserved(int counter)
+{
+ pr_warning("oprofile: counter #%d is already reserved\n", counter);
+}
+
extern u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
struct op_counter_config *counter_config);
extern int op_x86_phys_to_virt(int phys);
OpenPOWER on IntegriCloud