computer motherboard

Excluding MFC from profiling

This tutorial describes how to exclude 3rd party libraries, such as MFC, from being profiled. Various techniques are available, depending upon how the 3rd party library is linked – dynamically or statically.

Dynamic Linking

This tutorial describes how to setup Performance Validator to exclude various DLLs from performance profiling when you are dynamically linking your application with MFC and/or the C Runtime. The tutorial also describes how to setup Performance Validator to include or exclude different source files from performance profiling when you are dynamically linking your application with MFC and/or the C Runtime.

To exclude MFC, C runtime, STL and related DLLs from profiling

 

  • Open the settings dialog by clicking the tools icon on the toolbar.
    Performance Validator settings icon
  • The Settings Dialog is displayed. Select the Hook Insertion tab.
    Performance Validator hook insertion settings dialog
  • Deselect the check boxes in the section named DLL Hook Insertion.
  • Click OK to accept the settings.

To exclude source files from profiling based on their path

 

  • Open the settings dialog by clicking the tools icon on the toolbar.
    Performance Validator settings icon
  • The Settings Dialog is displayed. Select the File Locations tab.
    Performance Validator source code file locations settings dialog
  • Set the Path Type to “Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s source code. The image shows one directory for an example statically linked application.
  • Set the Path Type to “Third Party Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s 3rd party source code (MFC, CRT, 3rd party vendor controls, etc).
    Performance Validator third party source code file locations settings dialog
    The image shows the directories for a typical Visual Studio 6.0 installation.
  • Select the Hook Insertion tab.
    Performance Validator hook insertion settings dialog
  • Select the check boxes in the section marked Source Code Line Hook Insertion. The image shows that 3rd party source code has been marked to be ignored (deselected).

Static Linking

This tutorial describes how to setup Performance Validator to include or exclude different source files from performance profiling when you are statically linking your application with MFC and/or the C Runtime.

When you statically link to MFC and/or the CRT, the code for the MFC and/or CRT libraries is included in your application. This means that Performance Validator’s filtering by DLL policy will not work, as DLLs are not used to provide MFC and/or CRT support for statically linked applications.

This means that Performance Validator needs to know where the source code for your application, source code for 3rd parties (MFC, CRT, etc) and any other source code is kept.

 

  • Open the settings dialog by clicking the tools icon on the toolbar.
    Performance Validator settings icon
  • The Settings Dialog is displayed. Select the File Locations tab.
    Performance Validator source code file locations settings dialog
  • Set the Path Type to “Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s source code. The image shows one directory for an example statically linked application.
  • Set the Path Type to “Third Party Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s 3rd party source code (MFC, CRT, 3rd party vendor controls, etc).
    Performance Validator third party source code file locations settings dialog
    The image shows the directories for a typical Visual Studio 6.0 installation.
  • Select the Hook Insertion tab.
    Performance Validator hook insertion settings dialog
  • Select the check boxes in the section marked Source Code Line Hook Insertion. The image shows that 3rd party source code has been marked to be ignored (deselected).

Fully functional, free for 30 days