Commit 596b3e6
committed
trace2: capture thread name
With the upcoming introduction of regions, we will need to capture thread
names. This change adds a new static BuildThreadName() method that defines
a thread name by:
1. Determining if it is the entry thread and, if so, calling it "main",
per Trace2 convention.
2. If it's not the main thread, determining whether it is a thread pool
thread and naming it with a static prefix and the thread pool thread id.
3. If it is not the entry thread or a thread pool thread, use the thread
name, if it has one.
4. Return an empty string if none of the above are true.1 parent e891b92 commit 596b3e6
File tree
3 files changed
+37
-8
lines changed3 files changed
+37
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | | - | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| 271 | + | |
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
| |||
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
| 397 | + | |
392 | 398 | | |
393 | 399 | | |
394 | 400 | | |
| |||
418 | 424 | | |
419 | 425 | | |
420 | 426 | | |
| 427 | + | |
421 | 428 | | |
422 | 429 | | |
423 | 430 | | |
| |||
434 | 441 | | |
435 | 442 | | |
436 | 443 | | |
| 444 | + | |
437 | 445 | | |
438 | 446 | | |
439 | 447 | | |
| |||
480 | 488 | | |
481 | 489 | | |
482 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
483 | 515 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 85 | + | |
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
| |||
0 commit comments