The Load Library Tracer determines what dynamic link libraries are loaded and unloaded by the profiled application and how many times they were loaded and unloaded. Loading and unloading of dynamic link libraries multiple times can significantly slow down the application, and this profiler can help you find such problems.
To understand why loading and unloading of DLLs multiple times during the application execution can significantly slow down the application, let us explain how dynamic link libraries are used:
When an application loads a dynamic link library for the first time, the operating system loads the library into memory and returns the library’s handle to the application.
If the application attempts to load the library once again, the operating system increases the reference counter for the library and returns the library’s handle to the application.
When an application unloads the library, the operating system decreases the reference counter.
When the counter value is 0, the operating system unloads the library from memory.
Now imagine a situation that some function within an application loads a DLL in memory, calls DLL functions and then unloads the DLL as it is no longer needed. Some time later another function written by another developer loads the same DLL in memory, calls some DLL routines and then unloads the DLL. Loading and unloading of dynamic link libraries requires some time and doing that multiple times will decrease the overall application performance.
With the Load Library Tracer profiler you can easily detect such situations and optimize your code.
By using the Load Library Tracer profiler you can trace the use of dynamic link libraries and detect bottlenecks caused by frequent loading and unloading of libraries.
The Load Library Tracer supports both 32- and 64-bit applications. It analyzes DLLs loaded both at load time and run time.
The profiler reports about all modules used by the application under test, even the modules that are not directly loaded by the application. For example, if you profile an executable file that loads Lib1.dll, which in its turn loads Lib2.dll, the profiler will include both Lib1 and Lib2 into the report.
Profiling results are generated upon the end of the profiling session when the profiled application is terminated. The Get Results command is not available for the profiler.
Profiling results are displayed in the Report and Details panels and contain information on dynamic link libraries loaded and unloaded by the profiled application. Note that profiler results also include information on the active module of your profiling project as it is also loaded in memory during the profiling run.
For a detailed description of the results, see Load Library Tracer Results.