>>The text file created by the profiler in the emulator contains a number of
>>statistics at the end of the file; these include "cycles counted" and "total
>>clocks".  I have found that these two values often differ by about 10%.  Can
>>anyone give a precise explanation of the difference between these?
>
>As the author or the profiling code, I'll give it a shot.
>
>...
>In theory, these two numbers should be identical--every clock cycle should
>be accounted for.  In practice, this isn't the case, and I've never quite
>been able to pin down exactly why.
>
>I *think* it has something to do with how Poser works its way into the OS.
>Sometimes Poser itself makes OS calls, and the profiler is currently
>configured to not count time spent in those calls against the functions,
>because those calls don't happen on the real device.  (the global
>gProfilingCounted gets set to false to implement that.)


Bob,

thanks very much for the explanation.  I also spent some time looking at the
code and trying to figure out why the numbers differ and it wasn't obvious to me
at all, so I guess it makes me feel a little better to know that it isn't even
so obvious to you, the author of the code.  I agree that the numbers are good
enough for everyday profiling, and mostly I was just curious to find out about
what's really going on behind the scenes.  I might try to look into this more at
some point, though I'm currently swamped with other projects too.

-adam


Reply via email to