]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix OProfile events with zero event values
authorJohn Levon <levon@movementarian.org>
Sun, 22 Aug 2004 06:52:58 +0000 (23:52 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 22 Aug 2004 06:52:58 +0000 (23:52 -0700)
A silly bug prevented certain events from being used.

arch/arm/oprofile/op_model_xscale.c
arch/i386/oprofile/op_model_athlon.c
arch/i386/oprofile/op_model_p4.c
arch/i386/oprofile/op_model_ppro.c

index 284874be3d5e3be100bed79ee238d215c5fa6c99..be689db15456ac5894cad38b04a0ffc392af8484 100644 (file)
@@ -7,7 +7,7 @@
  * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
  * @remark Copyright 2004 Intel Corporation
  * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
- * @remark Copyright 2004 Oprofile Authors
+ * @remark Copyright 2004 OProfile Authors
  *
  * @remark Read the file COPYING
  *
@@ -249,7 +249,7 @@ static int xscale_setup_ctrs(void)
        int i;
 
        for (i = CCNT; i < MAX_COUNTERS; i++) {
-               if (counter_config[i].event)
+               if (counter_config[i].enabled)
                        continue;
 
                counter_config[i].event = EVT_UNUSED;
index 5f6cc84abfa763651d3814c07c6e671622c210e0..dbbc0ff8ce92c3c22f1e10c239465f8e9612460d 100644 (file)
@@ -70,7 +70,7 @@ static void athlon_setup_ctrs(struct op_msrs const * const msrs)
 
        /* enable active counters */
        for (i = 0; i < NUM_COUNTERS; ++i) {
-               if (counter_config[i].event) {
+               if (counter_config[i].enabled) {
                        reset_value[i] = counter_config[i].count;
 
                        CTR_WRITE(counter_config[i].count, msrs, i);
index e92eaed25f1bac996609501ab281ccf89c07a5e5..e82f689068d209763216fcdfc59b6612dac7c567 100644 (file)
@@ -578,7 +578,7 @@ static void p4_setup_ctrs(struct op_msrs const * const msrs)
        
        /* setup all counters */
        for (i = 0 ; i < num_counters ; ++i) {
-               if (counter_config[i].event) {
+               if (counter_config[i].enabled) {
                        reset_value[i] = counter_config[i].count;
                        pmc_setup_one_p4_counter(i);
                        CTR_WRITE(counter_config[i].count, VIRT_CTR(stag, i));
index 21578b26d91ad1b7c44ea469a287d8bd1908a8dc..e10b49e50191b75c0a0a131fa823eb6496f9c54e 100644 (file)
@@ -67,7 +67,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
 
        /* enable active counters */
        for (i = 0; i < NUM_COUNTERS; ++i) {
-               if (counter_config[i].event) {
+               if (counter_config[i].enabled) {
                        reset_value[i] = counter_config[i].count;
 
                        CTR_WRITE(counter_config[i].count, msrs, i);