Re: perf tools miscellaneous questions

From: Francis Moreau
Date: Mon Nov 08 2010 - 14:43:58 EST


Vince Weaver <vweaver1@xxxxxxxxxxxx> writes:

> This is rapidly getting of topic, especially for linux-kernel

Don't think so but feel free to remove LKML from Cc.

[...]

> Most events are poorly documented, if at all. And the Linux kernel
> predefined event list is loosely based upon the intel architectural
> events, which not every processor has and I've heard from insiders saying
> that you should be very careful for the results from those events.

I agree, that's why I try to clarify some events.

Perf tools are cool stuffs, IMHO, but it's pretty hard for me to
interpret results. I tried to compare some numbers in my previous posts
but I got some 'random' figures for now.

Another example is given below where I'm trying to bench a 2 functions
which do the same thing but differently.

$ perf stat -e cache-misses:u,l1d-loads-misses:u,cycles:u -p $(pgrep test)
C-c C-c
Performance counter stats for process id '30263':

406532 cache-misses
4986030 L1-dcache-load-misses
120247366 cycles

2.482196928 seconds time elapsed


$ perf stat -e cache-misses:u,l1d-loads-misses:u,cycles:u -p $(pgrep test)
C-c C-c
Performance counter stats for process id '30271':

459683 cache-misses
2513338 L1-dcache-load-misses
159968076 cycles

2.129021265 seconds time elapsed

Which numbers are important here ? cache-misses ? L1-dcache-load-misses
?

I just can say that the first run looks faster.

--
Francis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/