@@ -186,7 +186,7 @@ public static TraceLogEventSource CreateFromTraceEventSession(TraceEventSession
186
186
/// importantly TraceEvent.CallStack() will work. Thus you can get real time stacks from events).
187
187
/// </summary>
188
188
/// <param name="rundownConfiguration">
189
- /// If enabled, a rundown is triggered immediately as a separate session.
189
+ /// If enabled, a rundown is triggered immediately as a separate session.
190
190
/// This is used to initialize module and method information and then the session is closed.
191
191
/// This only makes sense in realtime sessions when you need to resolve function names during the session.
192
192
/// </param>
@@ -215,7 +215,8 @@ public static TraceLogEventSource CreateFromEventPipeSession(EventPipeSession se
215
215
using ( var rundownSession = rundownDiagnosticsClient . StartEventPipeSession (
216
216
new EventPipeProvider ( ClrTraceEventParser . ProviderName , EventLevel . Informational , ( long ) ClrTraceEventParser . Keywords . Default ) ,
217
217
requestRundown : true
218
- ) ) {
218
+ ) )
219
+ {
219
220
traceLog . ProcessInitialRundown ( rundownSession ) ;
220
221
}
221
222
}
@@ -10865,7 +10866,10 @@ public static TraceProcess Process(this TraceEvent anEvent)
10865
10866
throw new InvalidOperationException ( "Attempted to use TraceLog support on a non-TraceLog TraceEventSource." ) ;
10866
10867
}
10867
10868
TraceProcess ret = log . Processes . GetProcess ( anEvent . ProcessID , anEvent . TimeStampQPC ) ;
10868
- Debug . Assert ( ret != null ) ;
10869
+ // When the trace was converted, a TraceProcess should have been created for
10870
+ // every mentioned Process ID.
10871
+ // When we care, we should ensure this is true for the RealTime case.
10872
+ Debug . Assert ( ret != null || log . IsRealTime ) ;
10869
10873
return ret ;
10870
10874
}
10871
10875
/// <summary>
@@ -10880,7 +10884,10 @@ public static TraceThread Thread(this TraceEvent anEvent)
10880
10884
throw new InvalidOperationException ( "Attempted to use TraceLog support on a non-TraceLog TraceEventSource." ) ;
10881
10885
}
10882
10886
TraceThread ret = log . Threads . GetThread ( anEvent . ThreadID , anEvent . TimeStampQPC ) ;
10883
- Debug . Assert ( ret != null ) ;
10887
+ // When the trace was converted, a TraceThread should have been created for
10888
+ // every mentioned Thread ID.
10889
+ // When we care, we should ensure this is true for the RealTime case.
10890
+ Debug . Assert ( ret != null || log . IsRealTime ) ;
10884
10891
return ret ;
10885
10892
}
10886
10893
/// <summary>
0 commit comments