Commit 85178f6
committed
[EventPipe] Restrict SequencePoint sequence numbers
Previously, EventPipeThread's lifetimes were inherently tied to the
lifetime of all SequencePoints that track the thread's last sequence
number. In adding ThreadSessionState cleanup, SequencePoints forced
deletions to be deferred.
SequencePoints do not need to extend EventPipeThreads lifetimes, as they
only need to track the last known sequence number of that thread by the
time the SequencePoint is written. To disassociate the two lifetimes and
allow ThreadSessionStates to be cleaned up as soon as possible:
1) Update SequencePoints in tandem with event processing
Delaying SequencePoint updating until the SequencePoint is written
requires the buffer_manager's thread_session_state_list to not trim any
ThreadSessionStates. Updating the mapped ThreadId:sequence_number in
tandem allows the thread_session_state_list to be trimmed immediately.
2) Restrict ThreadId:sequence_number tracking
Previously, SequencePoints tracked all threads and their last known
sequence number regardless of whether there have been new events, and
mandated reactionary removal when the ThreadSessionState was
being deleted. Instead, by tightening the conditions for when a
SequencePoint should track a particulr thread, they should never need to
track threads unnecessarily. The conditions for when a SequencePoint
needs to track a thread are:
a) EventPipeThread is registered during SequencePoint init
or
b) EventPipeThread is unregistered during SP init and there are new
event write attempts since the last SP1 parent d381449 commit 85178f6
File tree
4 files changed
+68
-0
lines changed- src/native/eventpipe
4 files changed
+68
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
| |||
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
411 | 431 | | |
412 | 432 | | |
413 | 433 | | |
| |||
1188 | 1208 | | |
1189 | 1209 | | |
1190 | 1210 | | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1191 | 1217 | | |
1192 | 1218 | | |
1193 | 1219 | | |
| |||
1210 | 1236 | | |
1211 | 1237 | | |
1212 | 1238 | | |
| 1239 | + | |
1213 | 1240 | | |
1214 | 1241 | | |
1215 | 1242 | | |
| |||
1237 | 1264 | | |
1238 | 1265 | | |
1239 | 1266 | | |
| 1267 | + | |
1240 | 1268 | | |
1241 | 1269 | | |
1242 | 1270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
172 | 208 | | |
173 | 209 | | |
174 | 210 | | |
| |||
0 commit comments