Windows Embedded CE includes many performance monitoring and troubleshooting tools that can be used to measure the impact of Win32 APIs on system performance. These tools are helpful when identifying inefficient memory use, such as an application not releasing the system memory it allocates.
The following Windows Embedded CE tools are particularly useful to measure the real-time performance of your system components and applications:
¦ ILTiming Measures Interrupt Service Routine (ISR) and Interrupt Service Thread (IST) latencies.
¦ OSBench Measures system performance by tracking the time the kernel spends managing kernel objects.
¦ Remote Performance Monitor Measures system performance, including memory usage, network throughput, and other aspects.
Interrupt Latency Timing (ILTiming)
The ILTiming tool is particularly useful for Original Equipment Manufacturers (OEMs) who want to measure ISR and IST latencies. Specifically, ILTiming enables you to measure the time it takes to invoke an ISR after an interrupt occurred (ISR latency) and the time between when the ISR exits and the IST actually starts (IST latency). This tool uses a system hardware tick timer by default, but it is also possible to use alternative timers (high- performance counters).
Not all hardware platforms provide the required timer support for the ILTiming tool.
The ILTiming tool relies on the OALTimerIntrHandler function in the OAL to implement the ISR for managing the system tick interrupt. The timer interrupt handler stores the current time and returns a SYSINTR_TIMING interrupt event, which an ILTiming application thread waits to receive. This thread is the IST. The time elapsed between the reception of the interrupt in the ISR and the reception of the SYSINTR_TIMING event in the IST is the IST latency that the ILTiming tool measures.
You can find the ILTiming tool's source code in the %_WINCEROOT%PublicCommonOakUtils folder on your development computer if you have installed Microsoft Platform Builder for Windows Embedded CE 6.0 R2. The ILTiming tool supports several command-line parameters that you can use to set the IST priority and type according to the following syntax:
iltiming [-i0] [-i1] [-i2] [-i3] [-i4] [-p priority] [-ni] [-t interval] [-n interrupt] [-all] [-o file_name] [-h]
Table 3-1 describes the individual ILTiming command-line parameters in more detail.
Table 3-1 ILTiming parameters
Command-Line Parameter | Description |
---|---|
-i0 | No idle thread. This is equivalent to using the -ni parameter. |
-i1 | One thread spinning without performing any actual processing. |
-i2 | One thread spinning, calling SetThreadPriority (THREAD_PRIORITY_IDLE). |
-i3 | Two threads alternating SetEvent and WaitForSingleObject with a 10-second timeout. |
-i4 | Two threads alternating SetEvent and WaitForSingleObject with an infinite timeout. |
-i5 | One thread spinning, calling either VirtualAlloc (64 KB), VirtualFree, or both. Designed to flush the cache and the translation look-aside buffer (TLB). |
-p | Specifies the IST priority (zero through 255). The default setting is zero for highest priority. |
-ni | Specifies no idle priority thread. The default setting is equal to the number of idle priority thread spins. This is equivalent to using the -i0 parameter. |
-t | Specifies the SYSINTR_TIMING timing interval, with clock ticks in milliseconds. The default setting is five. |
-n | Specifies the number of interrupts. Using this parameter you can specify how long the test will run. The default setting is 10. |
-all | Specifies to output all data. The default setting is to output the summary only. |