Commit 7100bf4 1 parent 0dbd59a commit 7100bf4 Copy full SHA for 7100bf4
File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ public sealed class UltraNativeCallstackTraceEvent : TraceEvent
68
68
private static readonly string [ ] _payloadNames =
69
69
[
70
70
nameof ( FrameThreadId ) ,
71
+ nameof ( ThreadState ) ,
72
+ nameof ( ThreadCpuUsage ) ,
73
+ nameof ( PreviousFrameCount ) ,
71
74
nameof ( FrameSize ) ,
72
75
nameof ( FrameAddresses )
73
76
] ;
@@ -81,9 +84,15 @@ internal UltraNativeCallstackTraceEvent(Action<UltraNativeCallstackTraceEvent>?
81
84
82
85
public ulong FrameThreadId => ( ulong ) GetInt64At ( 0 ) ;
83
86
84
- public int FrameSize => GetInt32At ( 8 ) ;
87
+ public UltraSamplerThreadState ThreadState => ( UltraSamplerThreadState ) GetInt32At ( 8 ) ;
85
88
86
- public unsafe ReadOnlySpan < ulong > FrameAddresses => new ( ( byte * ) DataStart + 12 , FrameSize / sizeof ( ulong ) ) ;
89
+ public double ThreadCpuUsage => GetInt32At ( 12 ) / 1000.0 ;
90
+
91
+ public int PreviousFrameCount => GetInt32At ( 16 ) ;
92
+
93
+ public int FrameSize => GetInt32At ( 20 ) ;
94
+
95
+ public unsafe ReadOnlySpan < ulong > FrameAddresses => new ( ( byte * ) DataStart + 24 , FrameSize / sizeof ( ulong ) ) ;
87
96
88
97
/// <inheritdoc />
89
98
@@ -94,8 +103,14 @@ public override object PayloadValue(int index)
94
103
case 0 :
95
104
return FrameThreadId ;
96
105
case 1 :
97
- return FrameSize ;
106
+ return ( int ) ThreadState ;
98
107
case 2 :
108
+ return GetInt32At ( 12 ) ;
109
+ case 3 :
110
+ return PreviousFrameCount ;
111
+ case 4 :
112
+ return FrameSize ;
113
+ case 5 :
99
114
return FrameAddresses . ToArray ( ) ;
100
115
default :
101
116
throw new ArgumentOutOfRangeException ( nameof ( index ) ) ;
You can’t perform that action at this time.
0 commit comments