From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757514Ab2CTUAU (ORCPT ); Tue, 20 Mar 2012 16:00:20 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58703 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756691Ab2CTUAS convert rfc822-to-8bit (ORCPT ); Tue, 20 Mar 2012 16:00:18 -0400 Message-ID: <1332273597.18960.454.camel@twins> Subject: Re: [PATCH 1/1] Fix number of events displayed in header From: Peter Zijlstra To: Ashay Rane Cc: David Ahern , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, Paul Mackerras , Ingo Molnar , linux-kernel@vger.kernel.org, Ashay Rane Date: Tue, 20 Mar 2012 20:59:57 +0100 In-Reply-To: References: <1332271396-21756-1-git-send-email-ashay.r@gmail.com> <20120320194241.GA24870@infradead.org> <4F68DE88.1040301@gmail.com> <1332272870.18960.450.camel@twins> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2012-03-20 at 14:51 -0500, Ashay Rane wrote: > The problem I am seeing is that the `perf record' output does not > comform with the output of `perf stat'. For example, for `hackbench 10 > process 1000', I see 19 x 10^9 cycles reported by `perf stat'. > However, `perf report -n' prints "Events: 2K cycles" and `perf report > -n --dso hackbench' prints "Events: 47 cycles". Ah, read it as if perf report is saying: Samples: 47 of event: cycles. That is, its telling you the cycles event had 47 overflows causing 47 samples to be taken (IP, etc..) and written out. The point of reporting this number is that it puts the accuracy of the percentages into perspective. The more samples, the greater the coverage and more accurate the actual percentage of time spend in the various functions.