From owner-freebsd-hackers@freebsd.org Sun Aug 23 22:13:16 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C5CC9BF661 for ; Sun, 23 Aug 2015 22:13:16 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 429EE163 for ; Sun, 23 Aug 2015 22:13:16 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZTdVo-000GVs-MJ for freebsd-hackers@FreeBSD.org; Mon, 24 Aug 2015 01:13:12 +0300 Date: Mon, 24 Aug 2015 01:13:12 +0300 From: Slawa Olhovchenkov To: freebsd-hackers@FreeBSD.org Subject: How to application sample profiling? Message-ID: <20150823221312.GD21849@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2015 22:13:16 -0000 I have multi-thread application fully utilise all CPU cores. I am need to determine lines give mostly CPU loads. How I can do this? `pmcstat -P BU_CPU_CLK_UNHALTED -t application_pid -n 500000 -O sample.out` consume to many CPU (performance drop x100 times) and mostly show himself in kernel and pmc locks and none for application. pmcstat -S BU_CPU_CLK_UNHALTED -- same here.