Methods View

The methods view is used to present information about methods that have performed instance allocations.

The methods information is presented in a tree. This tree includes three levels of information:

1.   Container information
The assembly/module, type, and namespace that contains the base method. This level presents summary information from child items in the tree. For example, the Live instances summary information for a type includes the sum of all live instances created by all methods in the type.
This level is only included if the Show hierarchical checkbox is checked.

2.   Base method
This level presents the base methods and provides allocation information for the method itself. The actual allocations included in the information depends on the Include setting described below.

3.   Callers of the method and functions called by the method
This level can be used to get information about functions that called the base method, and functions that are called by it. By expanding the Called by and Calls child nodes, partial call stacks that start or end with the base method can be built (the partial call stack is presented in a tooltip). Allocation information will be presented for all allocations that match this partial call stack.

Matching Partial Call Stack

Each level 2 and 3 item has an associated partial call stack. The partial call stack for a base method (level 2) item simply contains the base method. The partial call stack for a level 3 item starts or ends with the base method (as mentioned above).

The allocation information for these items is retrieved from the call stacks that match the partial call stack of the item. To be considered a match, an allocation call stack must contain all functions in the partial call stack. If the Include option is set to Direct, the match must start at the top function of the allocation call stack. If the Include option is Direct and skipped frames, the match must start at the first function that is not skipped in the allocation call stack (for more information see the description of the Include setting below).

A function can be skipped due to the Base functions setting, by the call stack reducer, the session call stacks setting, or by the call stack functions setting. Skipped functions in a call stack is marked with a [Skipped frame(s)] entry. A [Skipped frame(s)] entry in the partial call stack can match one or more frames in the allocation call stack.

Example:

The following stacks will match:

Allocation call stack

Partial call stack

Function1()

Function1()

Function2()

[Skipped frame(s)]

Function3()

Function4()

Function4()

 

Function5()

 

The following stacks will only match if Include is Direct and skipped frames or Direct and child allocations:

Allocation call stack

Partial call stack

[Skipped frame(s)]

Function1()

Function1()

[Skipped frame(s)]

Function2()

Function4()

Function3()

 

Function4()

 

Function5()

 

The following stacks will only match if Include is Direct and child allocations:

Allocation call stack

Partial call stack

Function1()

Function2

Function2()

[Skipped frame(s)]

Function3()

Function4()

Function4()

 

Function5()

 

If a partial call stack has matched an allocation stack with skipped frames, this will be indicated by three dots in the user interface, e.g., using the icon IndirectMethod or the icon IndirectlyCalls.

Base functions

The Base functions dropdown list defines which functions should be included as base functions in the methods tree. The available options are:

•      Source
Only includes functions and methods that have source information.

•      Publically visible
Only includes native functions that are exported or managed methods that are externally visible.

•      All
Includes all functions and methods that are available in all call stacks.

Call Stacks Functions

The Call Stacks Functions command (on the View menu) can be used to determine which methods are included when presenting caller functions and called functions.

The available options are:

•      Source
Only includes functions and methods that have source information as caller functions or called functions.

•      Publically visible
Only includes native functions that are exported or managed methods that are externally visible as caller functions or called functions.

•      All
Includes all available functions and methods as caller functions or called functions.

NOTE! This is an application wide setting, changing this option will affect all call stack viewers, as well as the methods view.

Include

This dropdown list defines which allocations should be included when presenting the allocation information. The available options are (a base method is considered to be a partial call stack with only a single entry):

•      Direct allocations
Only includes allocations that are performed directly by the partial call stack (i.e. the top method in the allocation call stack must not be skipped and it must be the same as the top method in the partial call stack).

•      Direct and skipped frames allocations
Only includes allocations that are performed by the partial call stack or any skipped function called by it. For example, the partial call stack containing the single method MyClass.SomePublicMethod()will match:

  MyClass.SomePublicMethod()
  ...

and
  [Skipped frame(s)]
  MyClass.SomePublicMethod()
  ...

but not
  SomeOtherClass.SomeOtherMethod()
  [Skipped frame(s)]
  MyClass.SomePublicMethod()
  ...


•      Direct and all child allocations
Includes all allocations performed by the partial call stack, or any other method that has been called by it (directly or indirectly).

Show hierarchical

If the Show hierarchical check box is checked (the default), the functions and methods view will be presented hierarchically, based on assembly/module, type and namespace. Otherwise, the level 1 items will not be included, and the base methods will be presented in a flat list (see below).

 

Methods Allocation Information

The information presented for the methods tree items is similar to the information presented on the Types/Resources page. However,  it only includes data from allocations performed by the method, container or partial call stack.

NOTE! The numbers presented for a type (when showing hierarchical) are not the same as the numbers presented under the Types/Resources page. Here they refer to instance allocations performed by a method in the type, in the Types/Resources view they refer to the allocated instances of the type.

For more information about the information presented, see Type/Resource Details Page. The following information columns are always included:

•      Live instances

•      New live instances

If the Standard field set is selected, the following columns are also included in the methods list:

•      Live bytes

•      New live bytes

•      Allocs/sec (or Allocs)

•      Bytes/sec (or Alloced bytes)

If the Dispose info field set is selected, the following columns are also included in the methods list:

•      Disposed instances

•      Delta undisposed instances

•      Allocs/sec (or Allocs)

If the Heap Utilization field set is selected, the following columns are also included in the methods list:

•      Allocs/sec (or Allocs)

•      Gen #0  - Allocs/sec (or Allocs)
Gen #1 - Allocs/sec (or Allocs)
Gen #2 - Allocs/sec (or Allocs)
Large - Allocs/sec (or Allocs)

•      Unreachable instances

•      Unreachable bytes

If the Memory Leaks field set is selected, the following columns are also included in the methods list:

•      Memory leak instances

•      Allocs/sec (or Allocs)

 

 

.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