From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francis Moreau Subject: Re: perf tools miscellaneous questions Date: Mon, 08 Nov 2010 20:43:48 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Vince Weaver's message of "Sat, 6 Nov 2010 16:50:35 -0400 (EDT)") Sender: linux-perf-users-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Vince Weaver Cc: Victor Jimenez , Reid Kleckner , Frederic Weisbecker , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , Stephane Eranian , linux-perf-users-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Vince Weaver 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