-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathThreadSamplingEvent.cs
More file actions
51 lines (49 loc) · 1.68 KB
/
ThreadSamplingEvent.cs
File metadata and controls
51 lines (49 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.Diagnostics.Tracing.Etlx;
using Microsoft.Performance.SDK;
using Utilities;
namespace DotNetEventPipe.DataOutputTypes
{
/// <summary>
/// A CPU sampling event that samples at some interval
/// Shows process and threads, and stacks that were running on which CPUs at specific times.
/// </summary>
public readonly struct ThreadSamplingEvent
{
public int ProcessID { get; }
public string ProcessName { get; }
public int ProcessorNumber { get; }
public int ThreadID { get; }
public Timestamp Timestamp { get; }
public string[] CallStack { get; }
/// <summary>
/// filename of the binary / library for the instruction pointer
/// </summary>
public TraceModuleFile Module { get; }
/// <summary>
/// Functionname of the instruction pointer
/// </summary>
public string FullMethodName { get; }
public ThreadSamplingEvent(
int processID,
string processName,
int processorNumber,
int threadID,
Timestamp timestamp,
string[] callStack,
TraceModuleFile module,
string fullMethodName
)
{
ProcessID = processID;
ProcessName = Common.StringIntern(processName);
ProcessorNumber = processorNumber;
ThreadID = threadID;
Timestamp = timestamp;
CallStack = callStack; // Cache whole common stack??
Module = module;
FullMethodName = Common.StringIntern(fullMethodName);
}
}
}