diff options
author | Stephane Eranian <eranian@google.com> | 2012-08-29 09:01:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-13 10:59:46 -0400 |
commit | 35534b201c9f115c68962c095b5a9aad204d025f (patch) | |
tree | 1c89f2d0fd099149ea645ae10760d4b70466fa6c /arch | |
parent | e4390fa632d7c592e68e8106b7daea923ac995f5 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 0a5571080e74..38e4894165b9 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) | |||
661 | } | 661 | } |
662 | } | 662 | } |
663 | 663 | ||
664 | static struct uncore_event_desc snb_uncore_events[] = { | ||
665 | INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"), | ||
666 | { /* end: all zeroes */ }, | ||
667 | }; | ||
668 | |||
664 | static struct attribute *snb_uncore_formats_attr[] = { | 669 | static struct attribute *snb_uncore_formats_attr[] = { |
665 | &format_attr_event.attr, | 670 | &format_attr_event.attr, |
666 | &format_attr_umask.attr, | 671 | &format_attr_umask.attr, |
@@ -704,6 +709,7 @@ static struct intel_uncore_type snb_uncore_cbox = { | |||
704 | .constraints = snb_uncore_cbox_constraints, | 709 | .constraints = snb_uncore_cbox_constraints, |
705 | .ops = &snb_uncore_msr_ops, | 710 | .ops = &snb_uncore_msr_ops, |
706 | .format_group = &snb_uncore_format_group, | 711 | .format_group = &snb_uncore_format_group, |
712 | .event_descs = snb_uncore_events, | ||
707 | }; | 713 | }; |
708 | 714 | ||
709 | static struct intel_uncore_type *snb_msr_uncores[] = { | 715 | static struct intel_uncore_type *snb_msr_uncores[] = { |