From owner-freebsd-performance@FreeBSD.ORG Mon Oct 27 20:37:45 2014 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A641F782 for ; Mon, 27 Oct 2014 20:37:45 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5C7F52 for ; Mon, 27 Oct 2014 20:37:45 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id rl12so5249188iec.3 for ; Mon, 27 Oct 2014 13:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=F81LrBTgiJKiNq1BEZyA7WYtg+1w3rnbBNLOqctQQNI=; b=gqPESfgnUCUtrmS2QbBY8lR2iItZBVdSebZYb4j2q4FHOoqDhncMJJqCk13nS2bR2t Y4SfrM26a4uwDeuL4+b8+tdLKN3bwsYGuCbFA8tf7FwRq77w/Us9Cq1JSzkX5lHuPKgT 8otQv5PDtJpgaz47p4KiGL0l4p0u3795znsII4+z9n+pSK1h0fkpVEPLOHL96Sqf7vyD p6S3D5PHgrF2zHjMbQL7GAP4T3BVJVwOUdHxnH6wZZ/dr3ZyrATtbzWB4EoLQaUhKZUT 9sAv6KmT5ngiEA4Nn9WqPw+QSHoPcbOFE1o+7whrii9U6GD10elZcoH6z6BQso80PuLC gm1A== X-Received: by 10.42.8.70 with SMTP id h6mr4121563ich.85.1414442264824; Mon, 27 Oct 2014 13:37:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.50.203 with HTTP; Mon, 27 Oct 2014 13:37:24 -0700 (PDT) From: Brendan Gregg Date: Mon, 27 Oct 2014 13:37:24 -0700 Message-ID: Subject: pmcstat -z32 -G truncates callgraph to 8 To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2014 20:37:45 -0000 G'Day, I'm using pmcstat to capture call graphs, however, these always seem truncated to 8 stack frames. Anyone else hit this? Anyone know a fix or workaround? Example: pmcstat -S CPU_CLK_UNHALTED.THREAD_P -z 32 -O out.pmclog pmstat -R out.pmclog -z 32 -G out.pmc The problem is that out.pmc never goes deeper than 8 frames, despite -z 32, and despite PMC_CALLCHAIN_DEPTH_MAX = 32. I need deeper stacks to generate flame graphs (https://github.com/brendangregg/FlameGraph), and was trying Ed Maste's stackcollapse-pmc.pl to do it. Using pmcstat -F, and bringing up the output in Kcachegrind, shows that some stacks are indeed deeper than 8 as expected (although it seems to only work for kernel stacks, and not user-level). I don't know if Kcachegrind is doing its own workaround, of if the -F output is deeper than -G (still studying the output formats)... thanks, Brendan