Understanding Kernel Profiler Output (Windows Embedded CE 6.0)

1/5/2010

The following table shows information that is reported by the kernel profiler.

Kernel profiler output Description

Total Samples Dropped

The kernel profiler discards samples during buffered profiling if the kernel profiler takes more samples than the buffer can hold. The kernel profiler should not discard samples during unbuffered profiling.

During buffered profiling, if the buffer is too full to hold all of the samples, the most recent samples are discarded. The data that is lost is data from the end of the profiler run.

If the kernel profiler discards samples and there is plenty of system memory available, increase the size of the buffer for the kernel profiler. For more information, see Changing the Size of the Buffer for the Kernel Profiler.

Start the kernel profiler as close to the beginning of your test as possible, and stop the kernel profiler as close to the end of your test as possible. If your test requires the collection of more samples than the kernel profiler can store in the largest possible buffer, try using the profiler in unbuffered mode, because in unbuffered mode there is no limit on the number of samples that the profiler can collect. For more information, see Buffered and Unbuffered Profiling.

UNKNOWN Modules

The kernel profiler reports a hit in UNKNOWN if the module is not in the MODULES section of ROM. For information about adding a module to the MODULES section of ROM, see Building a Run-Time Image That Supports the Kernel Profiler.

The kernel profiler counts a hit in a function in an UNKNOWN module as <UNACCOUNTED FOR>.

<UNACCOUNTED FOR> Functions

The kernel truncates its sorted list of functions at 500 functions. The truncated list of 500 functions is not the top 500 functions by time consumed. The 500 functions listed are the first 500 functions in the table of contents in ROM that have profiler hit counts that are not zero. In other words, the order of the functions in ROM determines which functions appear if there are more than 500 functions. Windows Embedded CE does not currently support a way to circumvent the 500-function limit.

It is unusual for the kernel profiler to record hits in more than 500 functions. While there are far more than 500 functions in ROM, typically there are far fewer than 500 functions with hits.

The kernel profiler reports hits in UNKNOWN modules as unaccounted for. The kernel profiler also reports hits in modules that do not have .map files as unaccounted for. The kernel profiler reports hits that are not in the list of 500 functions as unaccounted for.

INTERRUPTS_ENABLE

The kernel profiler reports hits in the INTERRUPTS_ENABLE function in Nk.exe when interrupts are turned off. The kernel profiler takes an interrupt periodically and records the instruction pointer for the running thread. The interrupt for the kernel profiler cannot fire while interrupts are turned off.

If interrupts are disabled at the moment when a profiler interrupt is scheduled to fire, the interrupt is delayed until interrupts are enabled. In such a situation, there is a profiler hit inside the INTERRUPTS_ENABLE function. This hit on INTERRUPTS_ENABLE gives the appearance that the OS spent time in the INTERRUPTS_ENABLE function. The percentage of time for which you see hits in the INTERRUPTS_ENABLE function is the percentage of time spent with interrupts off.

With the kernel profiler, there is no way to know which code the OS spends time inside while interrupts are turned off. If the kernel profiler reports high numbers for INTERRUPTS_ENABLE, use CeLog and Remote Kernel Tracker to examine which interrupts fire most often. The OS may be spending time inside the ISRs for those interrupts. For more information, see Kernel Tracker.

Page Faults

The kernel profiler reports faults on code as hits in the following functions:

  • ProcessPageFault in Nk.exe
  • LoaderPageIn in Nk.exe
  • PageInXXX in Nk.exe
  • ReadFileWithSeek from Filesys.exe or a file system driver
  • RelocatePage in Nk.exe
  • DecompressROM in Nk.exe

The kernel profiler reports faults on data, such as memory-mapped files including database volumes and the hive-based registry, as hits in the following functions:

  • ProcessPageFault in Nk.exe
  • MappedPageInXXX in Nk.exe
  • ReadFileWithSeek from a file system
  • WriteFileWithSeek from a file system

ObjectCall

When an application calls a function that is exported by a system service, the ObjectCall function in the kernel routes the call to the appropriate system service. If a Monte Carlo profiling report contains many hits inside the ObjectCall function, run the kernel profiler again in system call mode to discover which system functions are called most often. For more information about system call profiling, see System Call Profiling.

See Also

Concepts

Information Not Reported by the Kernel Profiler
Kernel Profiler Modes
Setting Up the Kernel Profiler

Other Resources

Kernel Profiler
Controlling the Kernel Profiler