Re: Keeping track of the CPU time for a thread
Adam Lackorzynski <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Thu Jun 21, 2012 at 17:44:25 +0000, Mohammad A Haque wrote: > I want to measure how much CPU time a thread has consumed. When the > CPU time consumption exceeds a certain limit (specific to that > thread), I want to raise an interrupt. Please suggest me how can I do > it efficiently? The L4::Thread interface has the stats_time function to get the consumed time of a thread (FINE_GRAINED_CPUTIME in the kernel might be of interest here). Triggering an interrupt goes with its trigger function. Then it's just about plugging this together. Adam -- Adam [email protected] Lackorzynski http://os.inf.tu-dresden.de/~adam/