From owner-freebsd-threads@FreeBSD.ORG Mon Oct 6 21:29:10 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F36991065699 for ; Mon, 6 Oct 2008 21:29:09 +0000 (UTC) (envelope-from petri@helenius.fi) Received: from silver.he.iki.fi (mx.helenius.fi [IPv6:2001:1bc8:1018::42]) by mx1.freebsd.org (Postfix) with ESMTP id 83C9B8FC22 for ; Mon, 6 Oct 2008 21:29:09 +0000 (UTC) (envelope-from petri@helenius.fi) Received: from localhost (localhost [127.0.0.1]) by silver.he.iki.fi (Postfix) with ESMTP id 8CA6ABBFE for ; Tue, 7 Oct 2008 00:29:06 +0300 (EEST) Received: from silver.he.iki.fi ([127.0.0.1]) by localhost (silver.he.iki.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MP4am6FurKmU for ; Tue, 7 Oct 2008 00:29:03 +0300 (EEST) Received: from [IPv6:2001:1bc8:1018:0:5585:2de2:2674:216b] (unknown [IPv6:2001:1bc8:1018:0:5585:2de2:2674:216b]) by silver.he.iki.fi (Postfix) with ESMTP for ; Tue, 7 Oct 2008 00:29:02 +0300 (EEST) Message-ID: <48EA8320.5050500@helenius.fi> Date: Tue, 07 Oct 2008 00:29:04 +0300 From: Petri Helenius User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: getrusage with pthreads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 21:29:10 -0000 Is there a way to get thread-specific CPU utilization like the getrusage returns for the whole process? Looking at the kernel sources the utilization is accumulated on thread basis and then summed up but it would be useful to be able to determine utilization on a single thread between two checkpoints. Would pmc or ITIMER_PROF help? Pete