Tips for Visual Studio Users (Memory Profiling)

Related Topics

If you chose at installation to integrate Purify in Visual Studio, you have instant access to all of Purify's memory profiling capabilities from within Visual Studio. Using the Purify integration, you can:

§          Run a .NET or managed Visual C++ program within Visual Studio, and control data recording while profiling the program

§          Save memory profiling data to Purify memory profiling data files (.pmy) or ASCII text files (.txt)

§          Compare runs

§          Display Purify's Data Browser, Function Detail, and Object Detail windows

§          Filter memory profiling data

§          Print memory profiling data

§          Change Purify's settings and preferences

§          Open Purify data files (.pmy)

§          Get help on how to use Purify

During installation, a PurifyPlus menu and submenus are automatically added to Visual Studio. The first time you use Purify in Visual Studio, display the Purify menu by selecting PurifyPlus > Purify from the Visual Studio menu.

The Purify menu includes the following tools that you can use when profiling memory for managed code programs.

images\vsnet_pur_engage.gif

Engage/Disengage Purify Integration. Turns on or off the Purify integration. With the Purify integration engaged, a managed program is automatically profiled when you build or run it.

Do not use this tool for error detection in native-compiled code. Launch native-code programs in Visual Studio by using the Run Program dialog box.

images\vsnet_pur_exe.gif

Purify Executable Settings. Changes Purify's executable settings. Purify uses executable settings each time you run the current program.

images\vsnet_pur_def.gif

Purify Default Settings. Changes Purify's default settings. Purify uses default settings for any program you run, unless overridden by executable-specific settings.

images\vsnet_pur_pref.gif

Purify Preferences. Changes Purify's preferences. Purify uses preferences to control the presentation of its windows and data.

images\vsnet_pur_filtermgr.gif

Purify Filter Manager. Displays the Purify Filter Manager: Memory Profiling Data dialog box.

images\vsnet_pur_browser.gif

Purify Data Browser. Displays a Purify Data Browser window for the selected run

images\vsnet_pur_objdetail.gif

Purify Object Detail. Displays detailed information about the selected object, including an object reference tree.

images\vsnet_pur_funcdetail.gif

Purify Function Detail. Displays detailed information about the selected function, procedure, or method, including its callers and descendants.

images\vsnet_pur_props.gif

Purify Properties. Displays run statistics and other information for the selected run.

images\vsnet_pur_snap.gif

Snapshot Memory Profiling Data. Captures memory profiling data recorded up to that point for the current run and creates a snapshot entry in the PurifyPlus Navigator. Purify continues to record data.

images\vsnet_pur_diff.gif

Compare Runs. For memory profiling or code coverage runs; compares one run to another run to create a new dataset, and creates a Diff entry in the PurifyPlus Navigator.

images\vsnet_pur_garbcollect.gif

Garbage Collect. Forces the .NET CLR to perform a garbage collection.

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.

§      Rational Runtime analysis tools use Byte Code Insertion (BCI) technology to instrument .NET and managed Visual C++ 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.