From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753491AbbEHOqe (ORCPT ); Fri, 8 May 2015 10:46:34 -0400 Received: from casper.infradead.org ([85.118.1.10]:38541 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbbEHOqd (ORCPT ); Fri, 8 May 2015 10:46:33 -0400 Date: Fri, 8 May 2015 16:46:20 +0200 From: Peter Zijlstra To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Jiri Olsa , LKML , David Ahern , Stephane Eranian , Andi Kleen , Minchan Kim Subject: Re: [RFC/PATCH] perf stat: Show sample events stat for a data file Message-ID: <20150508144620.GN27504@twins.programming.kicks-ass.net> References: <1430292465-8863-1-git-send-email-namhyung@kernel.org> <20150429092751.GR5029@twins.programming.kicks-ass.net> <20150429115822.GA31120@danjae.kornet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150429115822.GA31120@danjae.kornet> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2015 at 08:58:22PM +0900, Namhyung Kim wrote: > > It would be nice if this thing could support 'perf record -s' which > > enables perf_event_attr::inherit_stat, which in turn results in > > PERF_RECORD_READ entries after every PERF_RECORD_EXIT which give the > > total number of events for each recorded task. > > Hmm.. this is one of the areas that I don't understand what's going > on. It'd be nice if you can help me understand and possibly improve > the doc too. > > So the combination of 'perf record -s' and 'perf report -T' should > show some per-thread counter values, right? I've found a bug on it. Right, they should. perf-record -s should give the event count per monitored thread, which when summed, should match what perf-stat gives for that workload. And agreed on the bug, I can see it too. > Anyway, I don't understand the numbers it shows. Me neither. I don't quite know why it has 5 cycles columns, we only measure the one cycles event. > > So the cycles values on 'perf report -T' are a lot more than the value > of perf stat. And I have no idea why it shows 5 different cycles for > each thread. Could you shed some light on this? Sadly no, not making sense. But I can confirm this is what it does. Lemme go poke at this, its weird.