ILTiming.exe (Windows CE 5.0)
ILTiming.exe determines the ISR and IST latencies. By default, this tool uses the system tick interrupt as the test interrupt vector. However, not all hardware platforms have an unused timer available.
To determine the ISR and IST interrupt latencies, ILTiming.exe directs the timer to return SYSTINTR_TIMING at specified tick intervals. ILTiming.exe waits on the SYSINTR_TIMING interrupt event, thus becoming the IST. ILTiming.exe gets the current time each time it receives the SYSTINTR_TIMING message.
ILTiming.exe calls the KernelIoControl function to create an I/O control with the dwIoControlCode variable equal to IOCTL_HAL_ILTIMING. ILTiming.exe starts and stops the testing in the OAL and gets the ISR timings from this same I/O control, which is defined in %_WINCEROOT%\Public\Common\Oak\Inc\Pkfuncs.h. The interface for this I/O control is in %_WINCEROOT%\Public\Common\Oak\Inc\Iltiming.h.
ILTiming.exe passes the ILTIMING_MESSAGE structure while calling KernelIoControl with IOCTL_HAL_ILTIMING.
The following table shows the messages that the OAL uses to fill in the structure based on the value of **wMsg****member.
Message | Description |
---|---|
ILTIMING_MSG_ENABLE | The OAL hooks the system tick to cause a SYSINTR_TIMING interrupt event. No structure fields are updated. |
ILTIMING_MSG_DISABLE | The OAL unhooks the system tick from causing a SYSINTR_TIMING interrupt event. No structure fields are updated. |
ILTIMING_MSG_GET_TIMES | The OAL fills in all structure fields except for pfnPerfCountSinceTick. |
ILTIMING_MSG_GET_PFN | The OAL returns a pointer to the PerfCountSinceTick function in the pfnPerfCountSinceTick member. This function is called in kernel mode directly from the application to minimize overhead. |
In most cases, you should set the OEMIdle function to not reprogram the timer during ILTiming.exe measurements. ILTiming.exe requires special modifications to the OAL, but not the kernel. It should run on any of the samples and design templates.
You can use the following command-line parameters with the ILTiming.exe tool.
iltiming [-i0] [-i1] [-i2] [-i3] [-i4] [-p priority] [-ni]
[-t interval][-n interrupt] [-all] [-o file_name] [-h]
The following table shows the command-line parameters used with ILTiming.exe.
Command-line parameter | Description |
---|---|
-i0 | Indicates that there is no idle thread. This is equivalent to using the -ni parameter. |
-i1 | Runs idle thread type 1. |
-i2 | Runs idle thread type 2. |
-i3 | Runs idle thread type 3. |
-i4 | Runs idle thread type 4. |
-i5 | Runs idle thread type 5. |
-ppriority | Indicates the IST priority. The default setting is 0, for highest priority. |
-ni | Indicates that there is 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. |
-tinterval | Indicates SYSINTR_TIMING timing interval, with clock ticks in milliseconds. The default setting is 5. |
-ninterrupt | Indicates the number of interrupts. The default setting is 10. |
-all | Specifies to output all data. The default setting to output the summary only. |
-ofile_name | Specifies to output to file. The default setting to output to the debugger message window. |
-h | Displays a Help screen. |
You can choose to run the IST at one of the 256 priority levels by using the -p parameter.
You may have an idle thread running in the background, which will affect the IST latencies by enabling the kernel to be in a non-preemptive kernel call that must finish before the IST is run. You can use one of five idle thread types:
Idle thread type | Description |
---|---|
Idle Thread 1 | One thread spinning. |
Idle Thread 2 | One thread spinning, calling SetThreadPriority(THREAD_PRIORITY_IDLE). |
Idle Thread 3 | Two threads alternating SetEvent and WaitForSingleObject with a 10-second time out. |
Idle Thread 4 | Two threads alternating SetEvent and WaitForSingleObject with an infinite time out. |
Idle Thread 5 | One thread spinning, calling either VirtualAlloc or VirtualFree or both. Designed to flush the cache and the translation look-aside buffer (TLB). |
The ISR rate is set by the -t parameter. The following command line will cause the system tick ISR to return SYSINTR_TIMING every tenth tick.
iltiming -t10
The source code for ILTiming.exe is included in Platform Builder.
See Also
Real-Time Measurement Tools | ILTiming Support
Send Feedback on this topic to the authors