getting CPU time for particulat thread
David Xu
davidxu at freebsd.org
Thu Oct 30 18:20:38 PDT 2008
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
More information about the freebsd-threads
mailing list