[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting particular thread cpu time



Daniel Eischen wrote:

On Wed, 1 Feb 2006, Julian Elischer wrote:



Daniel Eischen wrote:



Libpthread is M:N by default, so the kernel doesn't know about
userland threads.




though we might think about ways that we can get that information..
maybe a way that the user thread scheduler can be asked for the info?



We don't currently maintain per-thread system and user time.
It's not just that either, there has to be some way to identify
each thread and the kernel would need that info (name, thread
id, ??) also. You _could_ add pthread_getrusage_np(), or
something like that, to the threads libraries which would
make it visible to the application, but I hesitate to think
this information would be useful to the kernel so that ps
and top can show it. I think ps and top should just show
the kernel entities and that's it. I wouldn't strongly
oppose making these utilities show userland thread info
as long as it didn't impact performance.



I was thinking of a tool to help developers do usage monitoring on their programs.
as a debugging aid..


We DO put usage information into the KSE mailbox do we not?
when you come back from a kernel call you should find stats there from memory.
(however I'm not going to go look now as I need to get on with $REALJOB
and have promised myself that this will wait until I get enough time to do teh stats properly.



_______________________________________________ freebsd-threads_(_at_)_freebsd_(_dot_)_org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-threads To unsubscribe, send any mail to "freebsd-threads-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org