mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: torvalds@osdl.org, akpm@osdl.org, oprofile-list@lists.sf.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH] fix OProfile events with zero event values
Date: Sat, 21 Aug 2004 20:31:42 +0100	[thread overview]
Message-ID: <20040821193142.GB9501@compsoc.man.ac.uk> (raw)


A silly bug prevented certain events from being used.

Please apply

regards
john


Index: linux-cvs/arch/i386/oprofile/op_model_athlon.c
===================================================================
RCS file: /home/moz/cvs//linux-2.5/arch/i386/oprofile/op_model_athlon.c,v
retrieving revision 1.7
diff -u -a -p -r1.7 op_model_athlon.c
--- linux-cvs/arch/i386/oprofile/op_model_athlon.c	21 Aug 2003 23:57:03 -0000	1.7
+++ linux-cvs/arch/i386/oprofile/op_model_athlon.c	21 Aug 2004 20:28:53 -0000
@@ -70,7 +70,7 @@ static void athlon_setup_ctrs(struct op_
 
 	/* 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: linux-cvs/arch/i386/oprofile/op_model_p4.c
===================================================================
RCS file: /home/moz/cvs//linux-2.5/arch/i386/oprofile/op_model_p4.c,v
retrieving revision 1.11
diff -u -a -p -r1.11 op_model_p4.c
--- linux-cvs/arch/i386/oprofile/op_model_p4.c	30 Jun 2004 22:50:31 -0000	1.11
+++ linux-cvs/arch/i386/oprofile/op_model_p4.c	21 Aug 2004 20:28:53 -0000
@@ -578,7 +578,7 @@ static void p4_setup_ctrs(struct op_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: linux-cvs/arch/i386/oprofile/op_model_ppro.c
===================================================================
RCS file: /home/moz/cvs//linux-2.5/arch/i386/oprofile/op_model_ppro.c,v
retrieving revision 1.8
diff -u -a -p -r1.8 op_model_ppro.c
--- linux-cvs/arch/i386/oprofile/op_model_ppro.c	19 Feb 2004 04:56:30 -0000	1.8
+++ linux-cvs/arch/i386/oprofile/op_model_ppro.c	21 Aug 2004 20:28:53 -0000
@@ -67,7 +67,7 @@ static void ppro_setup_ctrs(struct op_ms
 
 	/* 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: linux-cvs/arch/arm/oprofile/op_model_xscale.c
===================================================================
RCS file: /home/moz/cvs//linux-2.5/arch/arm/oprofile/op_model_xscale.c,v
retrieving revision 1.3
diff -u -a -p -r1.3 op_model_xscale.c
--- linux-cvs/arch/arm/oprofile/op_model_xscale.c	29 Apr 2004 14:10:01 -0000	1.3
+++ linux-cvs/arch/arm/oprofile/op_model_xscale.c	21 Aug 2004 20:28:53 -0000
@@ -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;

                 reply	other threads:[~2004-08-21 19:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040821193142.GB9501@compsoc.man.ac.uk \
    --to=levon@movementarian.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®