Re: Intel Ivy Bridge "mem" events not working?

Panagiotis Mousouliotis <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <CAONfH=O_mmQ1hEEWDNEjyjVaZJyFY4=3JAi6WKqFooTfp4-EFA@mail.gmail.com>
Hi William,

thank you very much for your quick answer.

The family and model information for the machine I use are:
cpu family    : 6
model        : 58

but in any case I attach the output of the "cat /proc/cpuinfo" command.

So, my next move is to try my program on a different machine.

Thanks again,
-Panos

On Wed, Apr 6, 2016 at 7:19 PM, William Cohen <[email protected]> wrote:

> On 04/06/2016 11:46 AM, Panagiotis Mousouliotis wrote:
> > Hello,
> >
> > I installed today oprofile cloning it from the git repository.
> >
> > When I give the command:
> >
> > $ ocount -e mem_uops_retired ./convNaive2 0.5 5
> >
> > I get:
> >
> > perf_event_open failed with Invalid argument
> > Caught runtime error while setting up counters
> > Internal Error.  Perf event setup failed.
> > Error running ocount
> >
> > I get the same output for all the events starting with "mem".
> >
> > When I use events that do not start with "mem", it works:
> > $ ocount -e l2_lines_out ./convNaive2 0.5 5
> > 0.5,5,0.092632
> >
> > Events were actively counted for 227235819 nanoseconds.
> > Event counts (actual) for
> /home/pmousoul/Desktop/Program_Execution_Performance_Measurement_Tools/code/convNaive2:
> >     Event                Count                    % time counted
> >     l2_lines_out         255,436                  100.00
> >
> > I'm I doing something wrong and I'm just not able to notice it?
> >
> > My system is:
> > processor: i5-3337U
> > kernel version: 3.16.0-67-generic x86_64 GNU/Linux
> >
> > I tried the oprofile-1.1.0 (tar.gz) version but I got the same results.
> >
> > Now I'm thinking to test an older kernel on the same machine..
> >
> > Any thoughts?
>
> Hi Panos,
>
> The error message looks like the kernel is rejecting the event number
> (event 0xd0, default unit mask 0x81).   There are certainly cases where the
> kernel checks the event number and reject it for certain processor family
> and model numbers. Could you include the family and model information from
> /proc/cpuinfo?
>
> It looks like these particular events are disabled for Intel Ivybridge:
>
>
> http://lxr.free-electrons.com/source/arch/x86/kernel/cpu/perf_event_intel.c?v=3.16#L135
>
> 134         /*
> 135          * Errata BV98 -- MEM_*_RETIRED events can leak between
> counters of SMT
> 136          * siblings; disable these events because they can corrupt
> unrelated
> 137          * counters.
> 138          */
>
> -Will
> >
> >
> > Thanks for your time,
> > Panos
> >
> >
> >
> ------------------------------------------------------------------------------
> >
> >
> >
> > _______________________________________________
> > oprofile-list mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/oprofile-list
> >
>
>

------------------------------------------------------------------------------

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
cpuinfo.txt (text/plain, 3.7 KB)
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping	: 9
microcode	: 0x17
cpu MHz		: 897.187
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 3592.12
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping	: 9
microcode	: 0x17
cpu MHz		: 800.015
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 3592.12
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping	: 9
microcode	: 0x17
cpu MHz		: 819.140
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 3592.12
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping	: 9
microcode	: 0x17
cpu MHz		: 894.515
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 3592.12
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.