public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf, x86: Enable PEBS mode automatically for mem-{loads,stores} v4
@ 2013-07-19 15:05 Andi Kleen
  2013-07-22  9:59 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2013-07-19 15:05 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, acme, Andi Kleen, eranian

From: Andi Kleen <ak@linux.intel.com>

[The patch to enable this in the user tools has been sent separately]

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.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf, x86: Enable PEBS mode automatically for mem-{loads,stores} v4
  2013-07-19 15:05 [PATCH] perf, x86: Enable PEBS mode automatically for mem-{loads,stores} v4 Andi Kleen
@ 2013-07-22  9:59 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2013-07-22  9:59 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel, acme, Andi Kleen, eranian


* Andi Kleen <andi@firstfloor.org> wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> [The patch to enable this in the user tools has been sent separately]

Why are they not in the same series, Cc:-ed to the same parties?

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-22  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 15:05 [PATCH] perf, x86: Enable PEBS mode automatically for mem-{loads,stores} v4 Andi Kleen
2013-07-22  9:59 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox