From: Andi Kleen <andi@firstfloor.org>
To: acme@infradead.org
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>,
eranian@google.com
Subject: [PATCH 2/2] perf, x86: Enable PEBS mode automatically for mem-{loads,stores} v4
Date: Mon, 22 Jul 2013 06:52:18 -0700 [thread overview]
Message-ID: <1374501138-13496-2-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1374501138-13496-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
With the earlier patches to automatically try cpu// and add
a precise sys attribute, we can now enable PEBS for the mem-loads,
mem-stores events everywhere.
This allows to use
perf record -e mem-loads ...
instead of
perf record -e cpu/mem-loads/p ...
Always use precise=2 even though it is costly pre-Haswell
Cc: eranian@google.com
v2: Different white space
v3: Always use precise=2, as people seem to think overhead doesn't matter.
v4: Longer lines
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/kernel/cpu/perf_event_intel.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index fbc9210..1871866 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -176,9 +176,9 @@ static struct extra_reg intel_snbep_extra_regs[] __read_mostly = {
EVENT_EXTRA_END
};
-EVENT_ATTR_STR(mem-loads, mem_ld_nhm, "event=0x0b,umask=0x10,ldlat=3");
-EVENT_ATTR_STR(mem-loads, mem_ld_snb, "event=0xcd,umask=0x1,ldlat=3");
-EVENT_ATTR_STR(mem-stores, mem_st_snb, "event=0xcd,umask=0x2");
+EVENT_ATTR_STR(mem-loads, mem_ld_nhm, "event=0x0b,umask=0x10,ldlat=3,precise=2");
+EVENT_ATTR_STR(mem-loads, mem_ld_snb, "event=0xcd,umask=0x1,ldlat=3,precise=2");
+EVENT_ATTR_STR(mem-stores, mem_st_snb, "event=0xcd,umask=0x2,precise=2");
struct attribute *nhm_events_attrs[] = {
EVENT_PTR(mem_ld_nhm),
@@ -2034,8 +2034,9 @@ static __init void intel_nehalem_quirk(void)
}
}
-EVENT_ATTR_STR(mem-loads, mem_ld_hsw, "event=0xcd,umask=0x1,ldlat=3");
-EVENT_ATTR_STR(mem-stores, mem_st_hsw, "event=0xd0,umask=0x82")
+EVENT_ATTR_STR(mem-loads, mem_ld_hsw,
+ "event=0xcd,umask=0x1,ldlat=3,precise=2");
+EVENT_ATTR_STR(mem-stores, mem_st_hsw, "event=0xd0,umask=0x82,precise=2")
static struct attribute *hsw_events_attrs[] = {
EVENT_PTR(mem_ld_hsw),
--
1.8.3.1
next prev parent reply other threads:[~2013-07-22 13:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 13:52 [PATCH 1/2] tools, perf: Add a precise event qualifier v2 Andi Kleen
2013-07-22 13:52 ` Andi Kleen [this message]
2013-07-23 5:40 ` Vince Weaver
2013-07-23 6:01 ` Andi Kleen
2013-07-23 21:27 ` Vince Weaver
2013-07-23 22:51 ` Andi Kleen
2013-07-24 0:39 ` Sasha Levin
2013-07-24 1:33 ` Andi Kleen
2013-07-24 18:31 ` Vince Weaver
2013-07-24 18:54 ` Vince Weaver
2013-07-24 18:47 ` Vince Weaver
2013-07-24 19:05 ` Andi Kleen
2013-07-26 3:58 ` Vince Weaver
2013-09-12 16:57 ` Ingo Molnar
2013-09-12 17:36 ` Andi Kleen
2013-09-12 17:59 ` Ingo Molnar
2013-09-13 8:56 ` Peter Zijlstra
2013-09-13 9:50 ` Ingo Molnar
2013-09-13 11:29 ` Peter Zijlstra
2013-09-13 14:31 ` Vince Weaver
2013-09-13 17:48 ` Andi Kleen
2013-09-12 19:35 ` Vince Weaver
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=1374501138-13496-2-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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