<div dir="ltr"><p>Hi,</p><p>thanks for your reply.</p><p>it seems that we can only enable profiling on version 2.1. but i work on version 1.5.2 currently. </p><p>i have done a lot of work on version 1.5.2 so it&#39;s hard to me to change to 2.1. (sorry i don&#39;t mention the version used earlier)</p>
<p>if i work on version 1.5.2, how can i measure the CPU utilization?</p><p>Any suggestions are welcome.</p><p></p><p>best,</p><p>kashin</p><br><div class="gmail_quote">2008/7/22 Geoffrey Lee &lt;<a href="mailto:glee@ok-labs.com">glee@ok-labs.com</a>&gt;:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">On Fri, Jul 18, 2008 at 03:13:44PM +0800, kashin Lin wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; i write a iguana application in the iguana/example directory. the<br>
&gt; application only executes in a few secs and<br>
&gt;<br>
&gt; will be blocked(yield CPU) and resume when execution. i want to measure the<br>
&gt; CPU utilization when running<br>
&gt;<br>
&gt; the application (no OKLinux).<br>
&gt;<br>
&gt; i remember there is an idle thread in okl4 which will be selected if CPU is<br>
&gt; idle. so my first idea<br>
&gt;<br>
&gt; is to get the &quot;total idle thread execution time&quot; when in application<br>
&gt; execution meantime (a few secs).<br>
&gt;<br>
&gt; then the CPU utilization will be: &nbsp; &nbsp; &nbsp; 1 - &nbsp;&quot;total idle thread exec time&quot; /<br>
&gt; &quot;application execution meantime&quot;<br>
&gt;<br>
&gt; 1. but how to get the idle thread execution time?<br>
&gt;<br>
&gt; 2. similarly, how can i measure &quot;how long does the application really be<br>
&gt; selected to run in the meantime of execution?&quot;<br>
&gt;<br>
&gt; Does OKL4/Iguana do any statistics or have any function can help me know<br>
&gt; those information?<br>
&gt;<br>
&gt; p.s. in my platform, there is a harware time can use to measure the time ex:<br>
&gt;<br>
&gt; start = read_counter();<br>
<br>
<br>
</div>You can compile with enable_profiling=True to get profiling dumps<br>
from the kernel debugger.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;-gl<br>
<div class="Ih2E3d"><br>
&gt;<br>
&gt; ...<br>
&gt;<br>
&gt; end = read_counter();<br>
&gt;<br>
&gt; length = end - start;<br>
&gt;<br>
&gt; any suggestions is welcome. thanks in advance.<br>
&gt;<br>
&gt; best,<br>
&gt;<br>
&gt; kashin<br>
<br>
</div>&gt; _______________________________________________<br>
&gt; Developer mailing list<br>
&gt; <a href="mailto:Developer@okl4.org">Developer@okl4.org</a><br>
&gt; <a href="https://lists.okl4.org/mailman/listinfo/developer" target="_blank">https://lists.okl4.org/mailman/listinfo/developer</a><br>
<font color="#888888"><br>
<br>
--<br>
<br>
</font></blockquote></div><br></div>