DkmManagedHeapSampler Class

Definition

DkmManagedHeapSampler represents a sampler for objects in the managed heap.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

public ref class DkmManagedHeapSampler : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("14537042-a674-0f63-20ba-a9fab411d46a")]
public class DkmManagedHeapSampler : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("14537042-a674-0f63-20ba-a9fab411d46a")>]
type DkmManagedHeapSampler = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmManagedHeapSampler
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmManagedHeapSampler
Attributes
Implements

Properties

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
RuntimeInstance

The DkmRuntimeInstance class represents an execution environment which is loaded into a DkmProcess and which contains code to be debugged.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

UniqueId

Guid which uniquely identifies this DkmManagedHeapSampler.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

WorkerConnection

[Optional] Specifies a connection to a worker process where the Heap Sampler's operations will be processed.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

Methods

Close()

Closes a DkmManagedHeapSampler object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmManagedHeapSampler objects are automatically closed when their associated DkmRuntimeInstance object is closed.

This method may only be called by the component which created the object.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

Create(DkmRuntimeInstance, DkmDataItem)

Create a new DkmManagedHeapSampler object instance. The caller is responsible for closing the created object after they are done.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

Create(DkmRuntimeInstance, DkmWorkerProcessConnection, DkmDataItem)

Create a new DkmManagedHeapSampler object instance. The caller is responsible for closing the created object after they are done.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
GetRoots()

Returns roots from the sampled heap.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

GetSampledHeapData(UInt32)

Returns the next requested portion of serialized object graph data.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

GetSampledHeapTypeStats()

Returns the heap type stats.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

InitializeHeapObjectWalk(UInt32, Boolean)

Initializes heap sampler.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

NextObjects(UInt32)

Walks the given number of objects on the heap.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

NextReferences(UInt32)

Walks the given number of references on the heap.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

NextRoots(UInt32)

Walks the given number of GC roots on the heap.

Location constraint: API must be called from an IDE component (component level > 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)

Explicit Interface Implementations

IDisposable.Dispose()

To be added.

Applies to