From owner-freebsd-current@FreeBSD.ORG Wed Apr 1 07:38:30 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6B90106566B for ; Wed, 1 Apr 2009 07:38:30 +0000 (UTC) (envelope-from ccuiyyan@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1C38FC08 for ; Wed, 1 Apr 2009 07:38:30 +0000 (UTC) (envelope-from ccuiyyan@gmail.com) Received: by wa-out-1112.google.com with SMTP id m38so2030159waf.27 for ; Wed, 01 Apr 2009 00:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=kzSgK+UrIffAMPSUnhQMcTNO5BAU76aeLVxDINDlgcQ=; b=MkQGT+oi94BCw96BVkaZB1i9TKCszUbfW/ru2dRAkt1RpQGBO195G/IzaJAav7HeDo OzBBNpaALYTykSiUgpqMLge9bv0l5KWTvoKwg4YyYYHq1ajpG1Azz0D9FILfQuAxePWm j1PbhtWJ4rnCuwHegWWKsg1J+Ycln/Lt3H3I8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=slwFuoUicCfbKDl4BJmyFtnWmJaQuW015C+6MLGuyo8R2PRtdS1lxRfTRAOGAcoJrf /0u2gIFeilf5kqu74AsP/5NhXdI6soXk6/U1ybChxClHSTXYKtHIrdQ1qk/WFe3mnJu9 DAEcF06OdRgA6dv6kUGN1d2gg4FWtcSZxGmVQ= MIME-Version: 1.0 Received: by 10.115.89.1 with SMTP id r1mr5026725wal.84.1238571510057; Wed, 01 Apr 2009 00:38:30 -0700 (PDT) Date: Wed, 1 Apr 2009 15:38:29 +0800 Message-ID: <4451ccf20904010038p64ed2540mec3249f89bb7b8c2@mail.gmail.com> From: =?GB2312?B?tN7R0mNjdWl5eWFuQHNpbmEuY29t?= To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Performance Tools in FreeBSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 07:38:30 -0000 Dear all: I wonder to know which kind of performance tools FreeBSD hackers use to identify scalability or performance bottlenecks. I really have a hard time in that. To identify bottlenecks in our benchmarks, i try PMC and Dtrace. However, PMC seems not to be supported in AMD Opteron CPU because i get a "invalid arguments" error when i use the command pmcstat -S instructions -O . However, "instructions, cycles,..." are documented in pmc manual. By the way, I enable the options in configuration file options HWPMC_HOOKS and device hwpmc. So i give up PMC and turn to Dtrace in BSD. Dtrace in FreeBSD can work, but the information is meaningless. Profile provider cannot be used. (When i used, the kernel goes into kdb.) Tick provider can be used (It can only work on one CPU by definition). However, when i use aggregation like "dtrace -n 'tick-10ms /arg0!=0/{@ks[probefunc] = count();}'" There are no human readable results. Only tools i can use is the stack() command. However, the results are limited. I know Dtrace is a tool in FreeBSD under development. Are there any tools recommended to do kernel profiling or callgraph effectively? (which functions take the most time) Best Wishes! Yan