* [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs
@ 2012-08-29 13:01 Stephane Eranian
2012-08-30 9:11 ` Yan, Zheng
2012-09-14 6:16 ` [tip:perf/urgent] perf/x86: Export " tip-bot for Stephane Eranian
0 siblings, 2 replies; 3+ messages in thread
From: Stephane Eranian @ 2012-08-29 13:01 UTC (permalink / raw)
To: linux-kernel; +Cc: peterz, andi, zheng.z.yan, mingo
This patch exports the clockticks event and its encoding to user level.
The clockticks event was exported for Nehalem/Westmere but not for Sandy
Bridge (client). Given that it uses a special encoding, it needs to be
exported to user tools, so users can do:
# perf stat -a -C 0 -e uncore_cbox_0/clockticks/ sleep 1
Signed-off-by: Stephane Eranian <eranian@google.com>
---
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 0a55710..38e4894 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -661,6 +661,11 @@ static void snb_uncore_msr_init_box(struct intel_uncore_box *box)
}
}
+static struct uncore_event_desc snb_uncore_events[] = {
+ INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"),
+ { /* end: all zeroes */ },
+};
+
static struct attribute *snb_uncore_formats_attr[] = {
&format_attr_event.attr,
&format_attr_umask.attr,
@@ -704,6 +709,7 @@ static struct intel_uncore_type snb_uncore_cbox = {
.constraints = snb_uncore_cbox_constraints,
.ops = &snb_uncore_msr_ops,
.format_group = &snb_uncore_format_group,
+ .event_descs = snb_uncore_events,
};
static struct intel_uncore_type *snb_msr_uncores[] = {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs
2012-08-29 13:01 [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs Stephane Eranian
@ 2012-08-30 9:11 ` Yan, Zheng
2012-09-14 6:16 ` [tip:perf/urgent] perf/x86: Export " tip-bot for Stephane Eranian
1 sibling, 0 replies; 3+ messages in thread
From: Yan, Zheng @ 2012-08-30 9:11 UTC (permalink / raw)
To: Stephane Eranian; +Cc: linux-kernel, peterz, andi, mingo
On 08/29/2012 09:01 PM, Stephane Eranian wrote:
>
> This patch exports the clockticks event and its encoding to user level.
> The clockticks event was exported for Nehalem/Westmere but not for Sandy
> Bridge (client). Given that it uses a special encoding, it needs to be
> exported to user tools, so users can do:
>
> # perf stat -a -C 0 -e uncore_cbox_0/clockticks/ sleep 1
>
> Signed-off-by: Stephane Eranian <eranian@google.com>
The Sandy Bridge uncore only contains a few events that are similar to offcore event.
That's why I didn't add any generic event for Sandy Bridge uncore. But thanks anyway.
Acked-by: Yan, Zheng <zheng.z.yan@intel.com>
> ---
>
> diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> index 0a55710..38e4894 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> @@ -661,6 +661,11 @@ static void snb_uncore_msr_init_box(struct intel_uncore_box *box)
> }
> }
>
> +static struct uncore_event_desc snb_uncore_events[] = {
> + INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"),
> + { /* end: all zeroes */ },
> +};
> +
> static struct attribute *snb_uncore_formats_attr[] = {
> &format_attr_event.attr,
> &format_attr_umask.attr,
> @@ -704,6 +709,7 @@ static struct intel_uncore_type snb_uncore_cbox = {
> .constraints = snb_uncore_cbox_constraints,
> .ops = &snb_uncore_msr_ops,
> .format_group = &snb_uncore_format_group,
> + .event_descs = snb_uncore_events,
> };
>
> static struct intel_uncore_type *snb_msr_uncores[] = {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/urgent] perf/x86: Export Sandy Bridge uncore clockticks event in sysfs
2012-08-29 13:01 [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs Stephane Eranian
2012-08-30 9:11 ` Yan, Zheng
@ 2012-09-14 6:16 ` tip-bot for Stephane Eranian
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Stephane Eranian @ 2012-09-14 6:16 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, eranian, hpa, mingo, a.p.zijlstra, zheng.z.yan,
tglx
Commit-ID: 35534b201c9f115c68962c095b5a9aad204d025f
Gitweb: http://git.kernel.org/tip/35534b201c9f115c68962c095b5a9aad204d025f
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Wed, 29 Aug 2012 15:01:22 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 13 Sep 2012 16:59:46 +0200
perf/x86: Export Sandy Bridge uncore clockticks event in sysfs
This patch exports the clockticks event and its encoding to user level.
The clockticks event was exported for Nehalem/Westmere but not for Sandy
Bridge (client). Given that it uses a special encoding, it needs to be
exported to user tools, so users can do:
# perf stat -a -C 0 -e uncore_cbox_0/clockticks/ sleep 1
Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120829130122.GA32336@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 0a55710..38e4894 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -661,6 +661,11 @@ static void snb_uncore_msr_init_box(struct intel_uncore_box *box)
}
}
+static struct uncore_event_desc snb_uncore_events[] = {
+ INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"),
+ { /* end: all zeroes */ },
+};
+
static struct attribute *snb_uncore_formats_attr[] = {
&format_attr_event.attr,
&format_attr_umask.attr,
@@ -704,6 +709,7 @@ static struct intel_uncore_type snb_uncore_cbox = {
.constraints = snb_uncore_cbox_constraints,
.ops = &snb_uncore_msr_ops,
.format_group = &snb_uncore_format_group,
+ .event_descs = snb_uncore_events,
};
static struct intel_uncore_type *snb_msr_uncores[] = {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-14 6:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 13:01 [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs Stephane Eranian
2012-08-30 9:11 ` Yan, Zheng
2012-09-14 6:16 ` [tip:perf/urgent] perf/x86: Export " tip-bot for Stephane Eranian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.