[okl4-developer] How to measure CPU utilization
kashin Lin
kashin08 at gmail.com
Wed Jul 23 03:15:33 EST 2008
Hi,
thanks for your reply.
it seems that we can only enable profiling on version 2.1. but i work on
version 1.5.2 currently.
i have done a lot of work on version 1.5.2 so it's hard to me to change to
2.1. (sorry i don't mention the version used earlier)
if i work on version 1.5.2, how can i measure the CPU utilization?
Any suggestions are welcome.
best,
kashin
2008/7/22 Geoffrey Lee <glee at ok-labs.com>:
> On Fri, Jul 18, 2008 at 03:13:44PM +0800, kashin Lin wrote:
> > Hi,
> >
> > i write a iguana application in the iguana/example directory. the
> > application only executes in a few secs and
> >
> > will be blocked(yield CPU) and resume when execution. i want to measure
> the
> > CPU utilization when running
> >
> > the application (no OKLinux).
> >
> > i remember there is an idle thread in okl4 which will be selected if CPU
> is
> > idle. so my first idea
> >
> > is to get the "total idle thread execution time" when in application
> > execution meantime (a few secs).
> >
> > then the CPU utilization will be: 1 - "total idle thread exec
> time" /
> > "application execution meantime"
> >
> > 1. but how to get the idle thread execution time?
> >
> > 2. similarly, how can i measure "how long does the application really be
> > selected to run in the meantime of execution?"
> >
> > Does OKL4/Iguana do any statistics or have any function can help me know
> > those information?
> >
> > p.s. in my platform, there is a harware time can use to measure the time
> ex:
> >
> > start = read_counter();
>
>
> You can compile with enable_profiling=True to get profiling dumps
> from the kernel debugger.
>
> -gl
>
> >
> > ...
> >
> > end = read_counter();
> >
> > length = end - start;
> >
> > any suggestions is welcome. thanks in advance.
> >
> > best,
> >
> > kashin
>
> > _______________________________________________
> > Developer mailing list
> > Developer at okl4.org
> > https://lists.okl4.org/mailman/listinfo/developer
>
>
> --
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080723/a04e5842/attachment.htm
More information about the Developer
mailing list