Implementing a Custom Event Tracking Library (Windows Embedded CE 6.0)
1/5/2010
The default event-tracking library, CeLog.dll, receives events from the kernel and writes them to a RAM buffer for access by flush tools. However, you can implement your own CeLog event-tracking library with programming elements included in Windows CE 5.0.
Implementing a custom event-tracking library offers important opportunities:
- You can make a library that uses thread switch events to track run-times for all threads in the system. With this information, you might discover threads that consume a lot of CPU time, and therefore a lot of power, over long periods of time.
Similarly, you can measure how often and how long the CPU leaves idle during times when the system is inactive, also for discovering power consumption problems. - You can use thread preemption and interrupt events to measure how often and for how long a performance-critical thread is preempted or interrupted.
- You can use the process creation and module load events to implement tools that require notification of such events, for purposes such as symbol lookup.
- You can combine thread switch events with your own logging calls to record per-thread performance data, such as recording the number of times each thread called your code.
- You can create a library that records memory usage by using the CeLog heap events, discarding matched allocations and memory frees so that you only track allocations that have not been freed. In this manner, you can detect heap leaks without storing a continuous stream of data.
In This Section
- Implementing an Event Tracking Library
Describes the interfaces between an event tracking library and the kernel.
- OAL Elements for CeLog Event Tracking
Describes the programming elements in an OEM Adaptation Layer that affect the operation of your event-tracking library.
- Registering an Event Tracking Library
Describes how to load your event-tracking library and make it receive CeLog events from the kernel.
- CeLog Buffering Scheme
Provides background information about the RAM buffer that is shared between CeLog.dll and flushing tools such as CeLogFlush.exe. If your event-tracking library conforms to this interface, you can use the existing flush tools with your library.
Related Sections
- Developing an OEM Adaptation Layer
Provides an overview about the OEM adaptation layer (OAL) and contains links to topics that discuss the following: an in-depth overview of the OAL, the OAL development process, and a reference section for the OAL programming elements.