On 06/03/14 02:40, Vince Weaver wrote:
On Thu, 6 Mar 2014, Alen Stojanov wrote:
However, whenever I try to run matrices of bigger size, the reported flops are
not even close to the flops that I am supposed to obtain (anticipated results:
600 * 600 * 600 * 2 = 432'000'000):
perf stat -e r538010 ./mmmtest 600
Performance counter stats for './mmmtest 600':
2,348,148,851 r538010
0.955511968 seconds time elapsed
...
CPU: Intel(R) Xeon(R) CPU E5-2643 0 @ 3.30GHz, 8 cores
Linux Kernel: 3.11.0-12-generic
GCC Version: gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8)
Monitored events: FP_COMP_OPS_EXE:SSE_SCALAR_DOUBLE - Raw event: 0x538010
(converted using libpfm4)
...
Do you know why does this happens ? How can I instruct perf to obtain accurate
results ?
one thing you might want to do is put :u on your event name so you are
only measuring user space accesses not kernel too.
Well, even if the perf is measuring kernel events, I really doubt that
the kernel is doing any double precision floating point operations.
Nevertheless, I tried the :u option, and this does not change anything:
perf stat -e r538010:u ./mmmtest 100
Performance counter stats for './mmmtest 100':
2,079,002 r538010:u
0.003887873 seconds time elapsed
perf stat -e r538010:u ./mmmtest 600
Performance counter stats for './mmmtest 600':
2,349,426,507 r538010:u
0.956538237 seconds time elapsed
floating point events are notoriously unreliable on modern intel
processors.
The event might also be counting speculative events or uops and it gets
more complicated with AVX in the mix. What does the intel documentation
say for the event for your architecture?
I agree on this. However, if you would look at the .s file, you can see
that it does not have any AVX instructions inside. And if I would
monitor any other event on the CPU that counts any flop operations, I
get 0s. It seems that the FP_COMP_OPS_EXE:SSE_SCALAR_DOUBLE is the only
one that occurs. I don't think that FP_COMP_OPS_EXE:SSE_SCALAR_DOUBLE
counts speculative events.
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html