Profiling .NET Managed Code in Visual Studio (Memory Profiling)

Related Topics

 

1.    Open a .NET or managed Visual C++ solution in Visual Studio.

2.    Select PurifyPlus > Purify > Engage Purify Integration.

3.    Run your program as you normally do. Visual Studio runs the instrumented version of the program and Purify shows run (thread) status and a memory allocation graph in the Purify Data Browser.

Notes:

§      Purify's integration is not automatically turned on; you must turn it on, or engage it, after you start Visual Studio if you want to profile managed programs.

§      Before you run your program, you can use the Purify menu commands or toolbar to change Purify settings and preferences, and to create filters for your program.

§      By default, Purify does not collect detailed object data. To collect and view detailed object data, in the PowerCheck tab in the Settings for <exename> dialog box, select Generate Object Reference Graph data, then rerun your program.

§      In the PurifyPlus Navigator, each aggregate run images\navexit.gif, snapshot, images\navsnap.gif and diff images\navdiff.gif entry represents a separate dataset which Purify keeps in memory until you either close the run, snapshot, or diff, or disengage Purify. Since you normally use snapshots and diffs to perform your data analysis, you can conserve Purify memory by discarding the unneeded run datasets. Use the Workspace tab in the Preferences dialog box to change the default to automatically discard the aggregate run dataset after each program run.

§      If you want to conserve Purify memory but don't want to have Purify automatically discard the aggregate run datasets, you can discard them manually by right-clicking a run images\navexit.gif in the PurifyPlus Navigator and selecting Close from the shortcut menu.

§      Rational Runtime analysis tools use Byte Code Insertion (BCI) technology to instrument .NET managed programs dynamically in memory. The instrumented files are not saved or reused.

§      For information on the recommended settings for Visual Studio, click images\shortcut.gif.

(C) Copyright IBM Corporation 1992, 2010.