From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
andi@firstfloor.org, mingo@elte.hu
Subject: Re: [PATCH] perf/x86: export Sandy Bridge uncore clockticks event in sysfs
Date: Thu, 30 Aug 2012 17:11:09 +0800 [thread overview]
Message-ID: <503F2E2D.9000803@intel.com> (raw)
In-Reply-To: <20120829130122.GA32336@quad>
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[] = {
>
next prev parent reply other threads:[~2012-08-30 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 13:01 Stephane Eranian
2012-08-30 9:11 ` Yan, Zheng [this message]
2012-09-14 6:16 ` [tip:perf/urgent] perf/x86: Export " tip-bot for Stephane Eranian
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=503F2E2D.9000803@intel.com \
--to=zheng.z.yan@intel.com \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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
Powered by JetHome