Game Development Reference
In-Depth Information
Table 34.2 Performance Counters in .NET CLR Memory (continued)
Performance Counter
Description
Promoted Memory from Gen 0
Total bytes of memory that are promoted from
generation 0 to generation 1 after a garbage
collection.
Promoted Memory from Gen 1
Total bytes of memory that are promoted from
generation 1 to generation 2 after a garbage
collection.
Promoted Finalization Memory from Gen 0
Total bytes of memory that are promoted from
generation 0 to generation 1 because they are waiting
to be finalized. This counter is non-cumulative, so the
value observed at the end of the last garbage
collection is displayed.
Promoted Finalization Memory from Gen 1
Total bytes of memory that are promoted from
generation 1 to generation 2 because they are waiting
to be finalized. This counter is non-cumulative, so the
value observed at the end of the last garbage
collection is displayed. If the last collection was
generation 0 only, then the counter is reset to 0.
There are many performance counters available to track the .NET garbage collec-
tion, reducing the amount of work required to analyze your allocation profile in a
quantitative manner.
Profiling API and the CLR Profiler
The CLR contains an extremely powerful API that allows third parties to create
custom applications that can profile managed applications. In addition to the API,
the Microsoft CLR runtime team developed an unsupported tool that can analyze
managed memory using the Profiling API. This tool is called the CLR Profiler, and
has a variety of uses.
Note
Download the tool by navigating to the following URL or accessing the Companion Web site:
http://msdn.microsoft.com/netframework/downloads/tools/default.aspx
Launching the application will present a dialog like the one shown in Figure 34.5.
From here you can target an application to test, and specify what you want to profile.
 
Search Nedrilad ::




Custom Search