User Manual

AppDomains and Threads Tracker

The AppDomains and threads tracker can be used to associate instances with the AppDomain and thread they were created in. The AppDomains tracker is particularly useful when profiling ASP.NET applications, or other applications that rely on AppDomains for separation.

The AppDomain and threads tracker is enabled by using the AppDomain and Threads page under the session settings or in the start profiling wizard.

If the AppDomain tracker is enabled, the AppDomain (and optionally the thread) is recorded for each instance allocation (both managed instances and unmanaged resource instances). When comparing snapshots that contain AppDomain information, an AppDomain and threads selector will be visible in the profiler window. This selector can be used to filter the snapshot data so that it only includes information about instances allocated in the selected AppDomain and/or thread.

NOTE! The AppDomain and threads filter will not affect the information presented in the Real-time view or the Native memory view.

For AppDomains the allocation AppDomain of an instance is always the same as the AppDomain that the instance belongs to, i.e., it can only be reached from roots within the same AppDomain, since an instance cannot be transferred to another AppDomain. So the root paths for an instance will only include instances and roots that belong to the same AppDomain as the one associated with the instance.

For threads, the instance is associated with the thread it was created in, but it might be used by any other thread within the same AppDomain. So the root paths for an instance will include instances and roots that belong to threads other than the one associated with the instance.

NOTE! It is not always possible to associate an instance with an AppDomain or thread. The runtime can create instances internally, and unmanaged resource instances can be created in a native thread. To retrieve information about instances that are not associated with any AppDomain or thread, the AppDomain and selector must be set to show (all) AppDomains and (all) threads.

 

 

.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