Does anybody know anything about the Wind River Workbench Performance
Profiler output?
In particular there is a task in the System Viewer results called "Kernel
State" which is not elaborated upon that is taking up around 20% of our CPU
time. What is this task? Can we reduce its impact on the results? Is this
time available to other tasks?
There is no further documentation on this in the (vast) Workbench help
libaries.
Any help appreciated.
Kevin
Kevin Wallis
Senior Software Engineer
BAE SYSTEMS Rochester
You didn't tell us what version of VxWorks (or Workbench) that you're
using. You didn't tell us what CPU arch you're using either.
I'm not positive, but I don't think "kernel state" is a task: it
refers to the amount of time the CPU spends executing VxWorks kernel
related code -- that is, code that involves handling the scheduling of
tasks. Let's say a task is currently running and it does a semTake()
on a mutex semaphore that would cause it to sleep. The current task
has to be taken off the run queue and a context switch has to be made
so that the task with the next highest priority can run in its place.
The time spent doing that work is not charged to the application code;
instead it's accounted separately.
It's possible that your application is making a lot of kernel calls
(semTake(), semGive(), taskDelay(), taskLock()/taskUnlock()) or is
just triggering a lot of context switching between tasks, which is
causing it to spend an inordinate amount of time "in the kernel." It's
also possible you're using one particular kernel API that for some
reason has less than optimal performance in your particular version of
VxWorks and/or on your chosen CPU platform.
-Bill
An additional note about the <kernelState> flag to which Bill was
referring ...
On older versions of VxWorks, the system used to idle with the
<kernelState> set to TRUE. Somewhere around VxWorks 6.0 I think that
changed so that the system would idle with <kernelState> set to
FALSE. Thus, if your VxWorks version is old enough, it is conceivable
that if the system is idle, it may be detecting <kernelState> as TRUE.
Peter
Thanks for your feedback, that's a great help.
We're running VxWorks 6.6 on an MPC8548 CPU. So I'm guessing that means
<kernelState> is likely set to FALSE for "Idle".
Kevin
"Sparky" <lieutenan...@gmail.com> wrote in message
news:a1387621-f28d-4015...@g26g2000yqe.googlegroups.com...