Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2008 09:22:26 +0800
From:      David Xu <davidxu@freebsd.org>
To:        info@yourkit.com
Cc:        freebsd-threads@freebsd.org
Subject:   Re: getting CPU time for particulat thread
Message-ID:  <490A5DD2.8030703@freebsd.org>
In-Reply-To: <678291552.20081030201553@yourkit.com>
References:  <678291552.20081030201553@yourkit.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Vladimir Kondratyev wrote:
> Hi folks,
> 
> is there any ability to get CPU time consumed by particular thread?
> 
> We are porting YourKit Java Profiler (http://www.yourkit.com) to FreeBSD
> platform. Everything works almost fine, but we cannot find a way how to receive
> thread CPU times?
> 
> Any help is greatly appreciated.
> 
> Thank you in advance.
> 
> Sincerely,
> Vladimir Kondratyev
> YourKit, LLC
> http://www.yourkit.com
> "Don't get lost in data, get information!"
> 

if you just want to get current thread's time, there is a feature in 
-HEAD branch, call clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) to
get total cpu time for the current thread.

Regards,
David Xu




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?490A5DD2.8030703>