Date: Wed, 01 Feb 2006 12:31:57 -0800 From: Julian Elischer <julian@elischer.org> To: Daniel Eischen <deischen@freebsd.org> Cc: Ilya E Veretenkin <ilyaver@mail.ru>, freebsd-threads@freebsd.org Subject: Re: getting particular thread cpu time Message-ID: <43E11ABD.6050503@elischer.org> In-Reply-To: <Pine.GSO.4.43.0602011422190.8773-100000@sea.ntplx.net> References: <Pine.GSO.4.43.0602011422190.8773-100000@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43E11ABD.6050503>