* Strange behavior of perf top with PEBS @ 2016-07-20 13:28 Nikolay Borisov 2016-07-20 14:34 ` Jiri Olsa 0 siblings, 1 reply; 10+ messages in thread From: Nikolay Borisov @ 2016-07-20 13:28 UTC (permalink / raw) To: Peter Zijlstra, jolsa; +Cc: Linux-Kernel@Vger. Kernel. Org, andi Hello, Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf code) I observed that "perf top" counts no cycles and produces no output. After a bit of head scratching and testing I figured that running "perf top -e cycles" actually works whereas the default option is equivalent to running "perf top -e cycles:p". So the latter version seems to not work on my machine. Here is what my CPU is: cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 microcode : 0x60f cpu MHz : 2992.637 cache size : 6144 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm dtherm tpr_shadow vnmi flexpriority And the PEBS that is detected: Performance Events: PEBS fmt0+, 4-deep LBR, Core2 events, Intel PMU driver Looking at the code in arch/x86/kernel/cpu/perf_event_intel_ds.c it seems that the number after the fmt decides the level (according to http://man7.org/linux/man-pages/man1/perf-list.1.html#EVENT%C2%A0MODIFIERS) So in this case fmt0 should means that :p is not supported but perf top doesn't give any error. Increasing the number of p's : "perf top -e cycles:pp" shows the following error: 'precise' request may not be supported. Try removing 'p' modifier. In this case shouldn't adding even a single :p modifier cause the aforementioned error to be printed? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-07-20 13:28 Strange behavior of perf top with PEBS Nikolay Borisov @ 2016-07-20 14:34 ` Jiri Olsa 2016-07-20 14:36 ` Nikolay Borisov 2016-07-20 14:38 ` Jiri Olsa 0 siblings, 2 replies; 10+ messages in thread From: Jiri Olsa @ 2016-07-20 14:34 UTC (permalink / raw) To: Nikolay Borisov; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On Wed, Jul 20, 2016 at 04:28:34PM +0300, Nikolay Borisov wrote: > Hello, > > Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf > code) I observed that "perf top" counts no cycles and produces no > output. After a bit of head scratching and testing I figured that > running "perf top -e cycles" actually works whereas the default option > is equivalent to running "perf top -e cycles:p". So the latter version > seems to not work on my machine. hum, I think Core2 has PEBs valid only for instructions not cycles.. I'll check why perf top forcing the precise for cycles I thought we had that automated already jirka ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-07-20 14:34 ` Jiri Olsa @ 2016-07-20 14:36 ` Nikolay Borisov 2016-07-20 14:38 ` Jiri Olsa 1 sibling, 0 replies; 10+ messages in thread From: Nikolay Borisov @ 2016-07-20 14:36 UTC (permalink / raw) To: Jiri Olsa; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On 07/20/2016 05:34 PM, Jiri Olsa wrote: > On Wed, Jul 20, 2016 at 04:28:34PM +0300, Nikolay Borisov wrote: >> Hello, >> >> Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf >> code) I observed that "perf top" counts no cycles and produces no >> output. After a bit of head scratching and testing I figured that >> running "perf top -e cycles" actually works whereas the default option >> is equivalent to running "perf top -e cycles:p". So the latter version >> seems to not work on my machine. > > hum, I think Core2 has PEBs valid only for instructions not cycles.. FYI running perf top -e instructions:p also produces no data on that particular CPU. > > I'll check why perf top forcing the precise for cycles > I thought we had that automated already > > jirka > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-07-20 14:34 ` Jiri Olsa 2016-07-20 14:36 ` Nikolay Borisov @ 2016-07-20 14:38 ` Jiri Olsa 2016-07-26 11:30 ` Nikolay Borisov 1 sibling, 1 reply; 10+ messages in thread From: Jiri Olsa @ 2016-07-20 14:38 UTC (permalink / raw) To: Nikolay Borisov; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On Wed, Jul 20, 2016 at 04:34:17PM +0200, Jiri Olsa wrote: > On Wed, Jul 20, 2016 at 04:28:34PM +0300, Nikolay Borisov wrote: > > Hello, > > > > Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf > > code) I observed that "perf top" counts no cycles and produces no > > output. After a bit of head scratching and testing I figured that > > running "perf top -e cycles" actually works whereas the default option > > is equivalent to running "perf top -e cycles:p". So the latter version > > seems to not work on my machine. > > hum, I think Core2 has PEBs valid only for instructions not cycles.. > > I'll check why perf top forcing the precise for cycles > I thought we had that automated already oops, too soon ;) we have: perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events commit 517e6341fa123ec3a2f9ea78ad547be910529881 Author: Peter Zijlstra <peterz@infradead.org> Date: Sat Apr 11 12:16:22 2015 +0200 so i guess it should work.. checking ;-) jirka ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-07-20 14:38 ` Jiri Olsa @ 2016-07-26 11:30 ` Nikolay Borisov 2016-08-04 15:29 ` Jiri Olsa 0 siblings, 1 reply; 10+ messages in thread From: Nikolay Borisov @ 2016-07-26 11:30 UTC (permalink / raw) To: Jiri Olsa, Nikolay Borisov Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On 07/20/2016 05:38 PM, Jiri Olsa wrote: > On Wed, Jul 20, 2016 at 04:34:17PM +0200, Jiri Olsa wrote: >> On Wed, Jul 20, 2016 at 04:28:34PM +0300, Nikolay Borisov wrote: >>> Hello, >>> >>> Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf >>> code) I observed that "perf top" counts no cycles and produces no >>> output. After a bit of head scratching and testing I figured that >>> running "perf top -e cycles" actually works whereas the default option >>> is equivalent to running "perf top -e cycles:p". So the latter version >>> seems to not work on my machine. >> >> hum, I think Core2 has PEBs valid only for instructions not cycles.. >> >> I'll check why perf top forcing the precise for cycles >> I thought we had that automated already > > oops, too soon ;) we have: > > perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events > commit 517e6341fa123ec3a2f9ea78ad547be910529881 > Author: Peter Zijlstra <peterz@infradead.org> > Date: Sat Apr 11 12:16:22 2015 +0200 > > > so i guess it should work.. checking ;-) Any update on that? > > jirka > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-07-26 11:30 ` Nikolay Borisov @ 2016-08-04 15:29 ` Jiri Olsa 2016-08-05 9:30 ` Nikolay Borisov 0 siblings, 1 reply; 10+ messages in thread From: Jiri Olsa @ 2016-08-04 15:29 UTC (permalink / raw) To: Nikolay Borisov; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On Tue, Jul 26, 2016 at 02:30:46PM +0300, Nikolay Borisov wrote: > > > On 07/20/2016 05:38 PM, Jiri Olsa wrote: > > On Wed, Jul 20, 2016 at 04:34:17PM +0200, Jiri Olsa wrote: > >> On Wed, Jul 20, 2016 at 04:28:34PM +0300, Nikolay Borisov wrote: > >>> Hello, > >>> > >>> Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf > >>> code) I observed that "perf top" counts no cycles and produces no > >>> output. After a bit of head scratching and testing I figured that > >>> running "perf top -e cycles" actually works whereas the default option > >>> is equivalent to running "perf top -e cycles:p". So the latter version > >>> seems to not work on my machine. > >> > >> hum, I think Core2 has PEBs valid only for instructions not cycles.. > >> > >> I'll check why perf top forcing the precise for cycles > >> I thought we had that automated already > > > > oops, too soon ;) we have: > > > > perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events > > commit 517e6341fa123ec3a2f9ea78ad547be910529881 > > Author: Peter Zijlstra <peterz@infradead.org> > > Date: Sat Apr 11 12:16:22 2015 +0200 > > > > > > so i guess it should work.. checking ;-) > > Any update on that? sorry for late response.. I checked on f22 kernel and it's missing the core2 PEBs fix: 1424a09a9e18 perf/x86: fix PEBS issues on Intel Atom/Core2 which was introduced in 4.5.. you should upgrade or include this patch jirka ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-08-04 15:29 ` Jiri Olsa @ 2016-08-05 9:30 ` Nikolay Borisov 2016-08-05 10:23 ` Jiri Olsa 0 siblings, 1 reply; 10+ messages in thread From: Nikolay Borisov @ 2016-08-05 9:30 UTC (permalink / raw) To: Jiri Olsa; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On 08/04/2016 06:29 PM, Jiri Olsa wrote: > On Tue, Jul 26, 2016 at 02:30:46PM +0300, Nikolay Borisov wrote: [SNIP] > > sorry for late response.. > > I checked on f22 kernel and it's missing the core2 PEBs fix: > 1424a09a9e18 perf/x86: fix PEBS issues on Intel Atom/Core2 > > which was introduced in 4.5.. you should upgrade or include > this patch > Thanks for the reply. Isn't this supposed to be tagged as stable since it essentially breaks the default invocation of perf top? > jirka > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-08-05 9:30 ` Nikolay Borisov @ 2016-08-05 10:23 ` Jiri Olsa 2016-08-08 13:03 ` Peter Zijlstra 0 siblings, 1 reply; 10+ messages in thread From: Jiri Olsa @ 2016-08-05 10:23 UTC (permalink / raw) To: Nikolay Borisov; +Cc: Peter Zijlstra, Linux-Kernel@Vger. Kernel. Org, andi On Fri, Aug 05, 2016 at 12:30:32PM +0300, Nikolay Borisov wrote: > > > On 08/04/2016 06:29 PM, Jiri Olsa wrote: > > On Tue, Jul 26, 2016 at 02:30:46PM +0300, Nikolay Borisov wrote: > [SNIP] > > > > sorry for late response.. > > > > I checked on f22 kernel and it's missing the core2 PEBs fix: > > 1424a09a9e18 perf/x86: fix PEBS issues on Intel Atom/Core2 > > > > which was introduced in 4.5.. you should upgrade or include > > this patch > > > > Thanks for the reply. Isn't this supposed to be tagged as stable since > it essentially breaks the default invocation of perf top? yep, it seems like good one to have in stable, Peter? thanks, jirka ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-08-05 10:23 ` Jiri Olsa @ 2016-08-08 13:03 ` Peter Zijlstra 2016-08-08 13:19 ` Greg Kroah-Hartman 0 siblings, 1 reply; 10+ messages in thread From: Peter Zijlstra @ 2016-08-08 13:03 UTC (permalink / raw) To: Jiri Olsa Cc: Nikolay Borisov, Linux-Kernel@Vger. Kernel. Org, andi, Greg Kroah-Hartman On Fri, Aug 05, 2016 at 12:23:20PM +0200, Jiri Olsa wrote: > On Fri, Aug 05, 2016 at 12:30:32PM +0300, Nikolay Borisov wrote: > > > > > > On 08/04/2016 06:29 PM, Jiri Olsa wrote: > > > On Tue, Jul 26, 2016 at 02:30:46PM +0300, Nikolay Borisov wrote: > > [SNIP] > > > > > > sorry for late response.. > > > > > > I checked on f22 kernel and it's missing the core2 PEBs fix: > > > 1424a09a9e18 perf/x86: fix PEBS issues on Intel Atom/Core2 > > > > > > which was introduced in 4.5.. you should upgrade or include > > > this patch > > > > > > > Thanks for the reply. Isn't this supposed to be tagged as stable since > > it essentially breaks the default invocation of perf top? > > yep, it seems like good one to have in stable, Peter? Greg, could you pick: 1424a09a9e18 ("perf/x86: fix PEBS issues on Intel Atom/Core2") Into 4.4-stable ? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Strange behavior of perf top with PEBS 2016-08-08 13:03 ` Peter Zijlstra @ 2016-08-08 13:19 ` Greg Kroah-Hartman 0 siblings, 0 replies; 10+ messages in thread From: Greg Kroah-Hartman @ 2016-08-08 13:19 UTC (permalink / raw) To: Peter Zijlstra Cc: Jiri Olsa, Nikolay Borisov, Linux-Kernel@Vger. Kernel. Org, andi On Mon, Aug 08, 2016 at 03:03:43PM +0200, Peter Zijlstra wrote: > On Fri, Aug 05, 2016 at 12:23:20PM +0200, Jiri Olsa wrote: > > On Fri, Aug 05, 2016 at 12:30:32PM +0300, Nikolay Borisov wrote: > > > > > > > > > On 08/04/2016 06:29 PM, Jiri Olsa wrote: > > > > On Tue, Jul 26, 2016 at 02:30:46PM +0300, Nikolay Borisov wrote: > > > [SNIP] > > > > > > > > sorry for late response.. > > > > > > > > I checked on f22 kernel and it's missing the core2 PEBs fix: > > > > 1424a09a9e18 perf/x86: fix PEBS issues on Intel Atom/Core2 > > > > > > > > which was introduced in 4.5.. you should upgrade or include > > > > this patch > > > > > > > > > > Thanks for the reply. Isn't this supposed to be tagged as stable since > > > it essentially breaks the default invocation of perf top? > > > > yep, it seems like good one to have in stable, Peter? > > Greg, could you pick: > > 1424a09a9e18 ("perf/x86: fix PEBS issues on Intel Atom/Core2") > > Into 4.4-stable ? Now queued up, thanks. greg k-h ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-08-08 13:19 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-07-20 13:28 Strange behavior of perf top with PEBS Nikolay Borisov 2016-07-20 14:34 ` Jiri Olsa 2016-07-20 14:36 ` Nikolay Borisov 2016-07-20 14:38 ` Jiri Olsa 2016-07-26 11:30 ` Nikolay Borisov 2016-08-04 15:29 ` Jiri Olsa 2016-08-05 9:30 ` Nikolay Borisov 2016-08-05 10:23 ` Jiri Olsa 2016-08-08 13:03 ` Peter Zijlstra 2016-08-08 13:19 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox