From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"oprofile-list@lists.sourceforge.net"
<oprofile-list@lists.sourceforge.net>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [GIT PULL] oprofile updates for v2.6.39
Date: Thu, 24 Mar 2011 20:57:49 +0100 [thread overview]
Message-ID: <20110324195749.GS31407@erda.amd.com> (raw)
In-Reply-To: <20110317120136.GB31407@erda.amd.com>
Ingo,
On 17.03.11 13:01:36, Robert Richter wrote:
> please pull oprofile updates for v2.6.39 (tip/perf/core):
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core
please consider to pull one more late patch from oprofile/core. We
would like to see it in v2.6.39. It's a small change unlikely to break
anything and it completes the Sandy Bridge support in oprofile.
Thanks,
-Robert
The following changes since commit ec6b426c4dbb9eef40375c389746cab7e931a584:
oprofile, s390: Cleanups (2011-03-16 14:30:40 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core
Andi Kleen (1):
oprofile, x86: Allow setting EDGE/INV/CMASK for counter events
arch/x86/oprofile/nmi_int.c | 5 +++++
arch/x86/oprofile/op_counter.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
>From 914a76ca5eedc9f286a36f61c4eaa95b451ba3e6 Mon Sep 17 00:00:00 2001
From: Andi Kleen <ak@linux.intel.com>
Date: Wed, 16 Mar 2011 15:44:33 -0400
Subject: [PATCH] oprofile, x86: Allow setting EDGE/INV/CMASK for counter events
For some performance events it's useful to set the EDGE and INV
bits and the CMASK mask in the counter control register. The list
of predefined events Intel releases for each CPU has some events which
require these settings to get more "natural" to use higher level events.
oprofile currently doesn't allow this.
This patch adds new extra configuration fields for them, so that
they can be specified in oprofilefs.
An updated oprofile daemon can then make use of this to set them.
v2: Write back masked extra value to variable.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
---
arch/x86/oprofile/nmi_int.c | 5 +++++
arch/x86/oprofile/op_counter.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index e2b7b0c..ee165f1 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -49,6 +49,10 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0;
val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0;
val |= (counter_config->unit_mask & 0xFF) << 8;
+ counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV |
+ ARCH_PERFMON_EVENTSEL_EDGE |
+ ARCH_PERFMON_EVENTSEL_CMASK);
+ val |= counter_config->extra;
event &= model->event_mask ? model->event_mask : 0xFF;
val |= event & 0xFF;
val |= (event & 0x0F00) << 24;
@@ -440,6 +444,7 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root)
oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask);
oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel);
oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user);
+ oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra);
}
return 0;
diff --git a/arch/x86/oprofile/op_counter.h b/arch/x86/oprofile/op_counter.h
index e28398d..0b7b7b1 100644
--- a/arch/x86/oprofile/op_counter.h
+++ b/arch/x86/oprofile/op_counter.h
@@ -22,6 +22,7 @@ struct op_counter_config {
unsigned long kernel;
unsigned long user;
unsigned long unit_mask;
+ unsigned long extra;
};
extern struct op_counter_config counter_config[];
--
1.7.3.4
--
Advanced Micro Devices, Inc.
Operating System Research Center
prev parent reply other threads:[~2011-03-24 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 12:01 [GIT PULL] oprofile updates for v2.6.39 Robert Richter
2011-03-17 12:51 ` Ingo Molnar
2011-03-24 19:57 ` Robert Richter [this message]
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=20110324195749.GS31407@erda.amd.com \
--to=robert.richter@amd.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sourceforge.net \
/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