User Manual > Session Settings

ญญCall Stacks Settings Page

The Call Stacks settings page is used to define how call stacks should be collected and reduced. The call stacks settings are divided into three pages: General, Managed, and Native (professional only).

                                                                 

The following settings are available under the General page:

Max stack depth

Defines the maximum number of frames that should be included in a call stack. If the depth of the call stack is greater than this value, the stack will be truncated and a [Truncated] entry will be added at the bottom. To disable call stack truncation, press Ctrl-0 (zero). This will set the stack depth to (unlimited).

Enable stack reducer

Indicates whether the stack reducer should be enabled. The stack reducer reduces the memory used by call stacks by skipping "unimportant" frames from call stacks. For more information, see Call Stacks Reduction.

Max skippable stack frames

Defines the total number of stack frames that are allowed in all call stacks, before the call stack reducer tries to remove frames. This settings is only used when the stack reducer is enabled.

Skip recursive functions

Indicates whether recursive functions should be skipped, i.e. replaced with [Skipped]. Skipping recursive functions can help reduce the amount of memory used by call stacks, but some information will be lost.

Under the Managed page, it is possible to define which managed methods should be included in the call stacks. The options are:

•      All
Indicates that all methods should be included in the call stacks (unless skipped by the stack reducer). This is the recommended option if the call stack reducer is enabled.

•      Methods with source and publically visible methods
Indicates that only methods that have source information and methods that are publically visible should be included in the call stacks. This will reduce the amount of memory used by call stacks, but will cause some loss of information.

•      Only methods with source
Indicates that only methods with source information should be included in the call stacks. This will consume the least amount of call stacks memory, but the call stack information will be significantly limited.

The Native page is used to define how Native call stacks should be collected.

Perform native stack walk

This option is used to select whether native stack walks should be performed. By enabling native stack walks, detailed information can be retrieved about unmanaged resource creation. However, the stack walks will slow down the profiled process and the profiler needs to have access to the symbol files of the native libraries in the call stack. The symbol file locations are defined using the Symbol File Locations preferences page.

NOTE! The first time a frame is encountered by the native stack walker, .NET Memory Profiler needs to retrieve information about the frame from the debug symbols. This can take some time, especially if the symbols need to be downloaded. However, the symbol information will be cached by .NET Memory Profiler, which will make subsequent stack walks very much faster.

Max stack walk depth

Defines how many frames the native stack walker should investigate during a stack walk (this includes both frames that will be included in the stack and frames that are skipped based on the Include native functions settings). To remove the stack walk depth limit, press Ctrl-0 (zero).

Max native frames

Defines the maximum number of native frames that are allowed to be included during a stack walk. To remove the native frames limit, press Ctrl-0 (zero).

Include native functions

•      All
Indicates that all functions should be included in the call stacks (unless skipped by the stack reducer). This is the recommended option if the call stack reducer is enabled.

•      Functions with source and exported functions
Indicates that only functions that have source information and functions that are exported from a library (DLL) should be included in the call stacks. This will reduce the amount of memory used by call stacks, but will cause some loss of information.

•      Only functions with source
Indicates that only functions with source information should be included in the call stacks. This will consume the least amount of call stacks memory, but the call stack information will be significantly limited.

Perform stack walk on managed entry

Defines whether a native stack walk should be performed when a managed method is entered. Enabling this option will include additional call stack frames during native to manage transitions (i.e. native stack information will be presented between the [Managed to native transition] and [Native to managed transition] frames) and thread start methods (e.g. the Main method). The additional information provided by these frames is often not very important, so unless needed it is recommended that this option be disabled.

Hook known exported functions

This settings defines whether all (known) exported functions should be hooked by the unmanaged resources tracker, even functions that will not create any unmanaged resource. Hooking all exported functions provides some additional call stack information. However, this information is also provided  by the native stack walker, so if the native stack walker is enabled, it is recommended that this option is not.

 

 

.NET Memory Profiler User Manual

ฉ Copyright 2002-2009. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB