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%\Public\Common\Oak\Utils 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 priority | 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 interval | Specifies the SYSINTR_TIMING timing interval, with clock ticks in milliseconds. The default setting is five. |
-n interrupt | 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. |
-o file_name | Specifies to output to file. The default setting is to output to the debugger message window. |
ILTiming may create idle threads (command-line parameters: -i1, -i2, -i3, and -i4) to generate activity on the system. This enables the kernel to be in a non-preemptive kernel call that must be finished before handling the IST. It can be useful to enable idle threads in background tasks.
Operating System Benchmark (OSBench)
The OSBench tool can help you measure system performance by identifying the time that the kernel spends managing kernel objects. Based on the scheduler, OSBench collects timing measurements by means of scheduler performance-timing tests. A scheduler performance-timing test measures how much time basic kernel operations, such as thread synchronization, require.
OSBench enables you to track timing information for the following kernel operations:
■ Acquiring or releasing a critical section.
■ Waiting for or signaling an event.
■ Creating a semaphore or mutex.
■ Yielding a thread.
■ Calling system APIs.
To identify performance issues in different system configurations, use OSBench in conjunction with a stress test suite, such as the Microsoft Windows CE Test Kit (CETK).
The OSBench tool supports several command-line parameters that you can use according to the following syntax to collect timing samples for kernel operations:
osbench [-all] [-t test_case] [-list] [-v] [-n number] [-m address] [-o file_name] [-h]
Table 3-2 describes the individual OSBench command-line parameters in more detail.
Table 3-2 OSBench parameters
Command-Line Parameter | Description |
---|---|
-all | Run all tests (default: run only those specified by -t option): |
TestId 0: CriticalSections. | |
TestId 1: Event set-wakeup. | |
TestId 2: Semaphore release-acquire. | |
TestId 3: Mutex. | |
TestId 4: Voluntary yield. | |
TestId 5: PSL API call overhead. | |
TestId 6: Interlocked API's (decrement, increment, testexchange, exchange). | |
-t test_case | ID of test to run (need separate -t for each test). |
-list | List test ID's with descriptions. |
-v | Verbose: show extra measurement details. |
-n number | Number of samples per test (default=100). |
-m address | Virtual address to write marker values to (default=<none>). |
-o file_name | Output to comma-separated values (CSV) file (default: output only to debug). |