Friday, June 14, 2013

CLR Profiler – Analyzing Object Memory Allocation for a Windows Application

The CLR Profiler provides various types of reports which help in determining the performance of the application and tuning it. The “Histogram Allocated Types” report shows the various types of objects which were created and allocated during the execution of the application. This report shows you on the share of object allocation to the Small Object Head and the Large Object Heap.

To view the “Histogram Allocated Types” report, use the following steps.
1. Start CLR Profiler (CLRProfiler.exe)
2. Make sure that the following check boxes are selected:
    Profiling active
    Allocations
    Calls
3. Click Start Application (or) Select File -> Profile Application
4. In the File dialog which opens, select the applications .Exe file and click Open
5. This will open the application, work on the application and finally close the application
6. Once the application exits, the Profiler summary screen will open, close this summary dialog.
7. Click on View -> Histogram Allocated Types option to open the Report

The following screen shows on how the “Histogram Allocated Types” report details will be displayed for a simple Windows Application.



The objects are classified based on their size and displayed in the appropriate bar of the Histogram. The first bar in the Histogram shows
<16 -="" 16="" br="" bytes="" nbsp="" objects="" of="" size="" these="" were=""> 20KB   -        The total size of all the objects with size <16 br="" bytes=""> 5.36% -        5.36% of the total objects were of size <16 br="" bytes.="">
Similarly you can interpret the other bars to understand the type and size of objects which were used to execute your application. The panel at the right shows the various objects which were created and allocated based on the type of the object.

Search Flipkart Products:
Flipkart.com

No comments: