Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758662Ab1ENS5H (ORCPT ); Sat, 14 May 2011 14:57:07 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:35441 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755535Ab1ENS5E (ORCPT ); Sat, 14 May 2011 14:57:04 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=F5vmnA2Xnvv4XUbo8OtfZ3IOHU5ApSGwtwDM2JwVZLXeELYgUtHXa+FNlrGN9ZVPp/ ZwjzI1Oep9i8wjHxTEl2bmk4Av5sHj3cEBIdBP0kOI+zsoPfQEQhcIcJI+YvRRS0CgWm ZIB+y3laAmica43QNOee9CRhcffCu2Sy2qcsE= Message-ID: <4DCED07C.505@gmail.com> Date: Sat, 14 May 2011 12:57:00 -0600 From: David Ahern User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110421 Fedora/3.1.9-2.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: Wim Heirman CC: Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , =?ISO-8859-1?Q?Fr=E9d=E9ric_Weisbecker?= , Brice Goglin Subject: Re: perf-stat per thread results References: <4DCD4FC5.8020608@gmail.com> <20110513154410.GA6373@elte.hu> <4DCDB886.7090909@gmail.com> <4DCEC068.3050301@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2435 Lines: 60 On 05/14/11 12:52, Wim Heirman wrote: > 2011/5/14 David Ahern : >> On 05/14/11 06:49, Wim Heirman wrote: >>>> Hmm.... my mileage varies using latest kernel >>>> (446cc6345d3de6571bdd0840f48aca441488a28d) >>>> >>>> $ /tmp/build-perf/perf record --stat -fo /tmp/perf.data -p $(pidof rsyslogd) >>>> ^C[ perf record: Woken up 1 times to write data ] >>>> [ perf record: Captured and wrote 0.007 MB /tmp/perf.data (~308 samples) ] >>>> >>>> $ /tmp/build-perf/perf report -T -i /tmp/perf.data >>>> # Events: 6 cycles >>>> # >>>> # Overhead Command Shared Object Symbol >>>> # ........ ........ ................. .......................... >>>> # >>>> 97.61% rsyslogd libc-2.13.so [.] __libc_disable_asynccancel >>>> 2.39% rsyslogd [kernel.kallsyms] [k] native_write_msr_safe >>>> >>>> >>>> # >>>> # (For a higher level overview, try: perf report --sort comm,dso) >>>> # >>>> # PID TID >>>> >>>> >>>> ie., I do not get the counter values. Specifying the counter with -e >>>> (e.g., -e branch-misses) does not help -- still no counter output. >>> >>> Is rsyslogd multithreaded? (Or at least, do the non-main threads >>> execute any work during your perf-record measurement) If not, then >>> what you see is consistent with what I'm getting, i.e. everything but >>> the main thread is reported. >> >> It is multithreaded, but my point is that I do not get counter output at >> the end -- the PID/TID table is empty. I do not get counters for single >> threaded processes nor for commands run by perf record -- e.g., >> /tmp/build-perf/perf record --stat -e instructions -fo /tmp/perf.data -- >> sleep 1 > > My guess was that none of the threads got scheduled while you did your > perf-record run (rsyslogd usually isn't exactly very CPU intensive). > And the main thread isn't ever reported, at least that's the bug I'm > seeing. Can you try with a compute-intensive, multi-threaded program? > > Wim. The reports show data was collected. I have done a number of simple examples -- all of which execute at least 1 instruction, but the counters are not displayed (which they should be per the commit changelog commit). David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/