Commit Graph

51 Commits

Author SHA1 Message Date
Bartosz Taudul
b83cb3f2ce
Don't use hacks to determine end time. 2023-04-28 00:00:20 +02:00
Bartosz Taudul
745ca83de6
PreprocessLocks() doesn't use yPos. 2023-04-26 00:47:50 +02:00
Bartosz Taudul
798249c81c
Remove error indicators for CPU zones. 2023-04-26 00:46:45 +02:00
Bartosz Taudul
788d9b77fc
Use proper start time to determine if break combining locks.
Without this correction the code would combine all lock regions according
to the minimum visibility range rules, and assign the combined area the
highest lock state within all items. This could produce quote long combined
lock regions, where apparently lock contention happened.

Combined lock regions should instead be split to show exactly where the
lock contention is present. Combining is still performed here, but only
within the minimum visibility range.

This new behavior was also present previously, but was mistakenly omitted
during code refactor.
2023-04-15 22:56:44 +02:00
Bartosz Taudul
e68214a88a
Change LockState to bitmask. 2023-04-15 22:56:44 +02:00
Bartosz Taudul
f7a8998663
Push locks draw lists to DrawThread(). 2023-04-15 22:56:44 +02:00
Bartosz Taudul
7f301dfec0
Precalculate draw lists for locks. 2023-04-15 22:56:44 +02:00
Bartosz Taudul
1b824797a9
Do not project running regions end time to last time.
Just display known running regions, keeping the unended ones infinitely
collapsed. This makes the CPU core usage graph possibly display wrong
data at the end of capture. Note that this behavior was also present in
previous releases.
2023-04-07 22:37:22 +02:00
Bartosz Taudul
1ff9e0012b
Add a note why context switches only have coarse visibility check. 2023-04-05 19:39:39 +02:00
Bartosz Taudul
f48415315a
Build samples draw list only if visible. 2023-04-05 19:03:40 +02:00
Bartosz Taudul
a9ee4c499e
Build messages draw list only if visible. 2023-04-05 18:55:23 +02:00
Bartosz Taudul
9500add83b
Push yPos to TimelineItem::Preprocess(). 2023-04-05 18:07:09 +02:00
Bartosz Taudul
c0136dbdcc
Don't do unnecessary work if items are not visible. 2023-03-25 16:54:38 +01:00
Bartosz Taudul
13b31db561
Cosmetics. 2023-03-25 16:54:38 +01:00
Bartosz Taudul
e3ec455aba
Decouple check for existence from building draw lists.
We need to know if samples, context switches and messages are present to be
able to correctly calculate thread height. However, if the thread is not
visible, it is not necessary to provide a list of items to draw.
2023-03-25 16:52:27 +01:00
Bartosz Taudul
7ec68f8b52
Push item visibility to Preprocess(). 2023-03-25 15:10:58 +01:00
Bartosz Taudul
8908b68557
Fix lockup in context switch processing. 2023-03-25 00:45:13 +01:00
Bartosz Taudul
1e63406ac7
Replace previous iterator manipulation with a boolean. 2023-03-25 00:30:44 +01:00
Bartosz Taudul
efa095e25f
Simplify context switch precalculation. 2023-03-25 00:30:44 +01:00
Bartosz Taudul
734753a941
Fix MinVisNs type in messages preprocessing. 2023-03-24 23:15:11 +01:00
Bartosz Taudul
b3e9ede557
Move context switch minpx calculation to rendering code. 2023-03-24 23:10:58 +01:00
Bartosz Taudul
f2700b2786
Remove rather useless check.
The prev == it condition could only fire on the first run of the loop,
and on all subsequent runs prev (=next-1) will never be "it" anymore.

Lack of this condition changes nothing, as the following lines checking
for time distance between next and prev satisfy the same exit condition
(i.e. next-1 will be "it" only if lower_bound does not find anything,
hence next is farther away than MinVisNs).
2023-03-23 22:17:36 +01:00
Bartosz Taudul
e0cc6edbfb
Zone end times must be consistent. 2023-03-23 22:17:33 +01:00
Bartosz Taudul
40e08e9594
Draw messages using precalculated list. 2023-03-23 22:16:47 +01:00
Bartosz Taudul
e321e91c7d
TimelineItemThread can now determine visibility internally. 2023-03-23 21:56:04 +01:00
Bartosz Taudul
a141aafaab
Preprocess thread messages. 2023-03-23 21:47:40 +01:00
Bartosz Taudul
f55d0d0f55
Fix distance calculation in folding.
The folding process starts at the "next" item. The nextTime variable
represents a time point before which everything should be folded, because
all items in that range are smaller than MinVis range.

The lower_bound search finds a new "next" item, which will be beyond the
nextTime range. But nextTime has origin in the previous "next" item, which
may be not the last item in the folding range. If the distance between the
new "next" and the item before is smaller than MinVis, then the new "next"
item is also folded and the folding loop must continue to run.
2023-03-23 00:40:09 +01:00
Bartosz Taudul
aa8175ed47
Include DPI scaling in folding calculations. 2023-03-23 00:39:45 +01:00
Bartosz Taudul
fb032b4f9b
Rewrite CPU zones folding. 2023-03-23 00:17:55 +01:00
Bartosz Taudul
527b5f3311
Rewrite ghost zone folding. 2023-03-23 00:04:12 +01:00
Bartosz Taudul
c75b62e3d6
Rewrite samples folding. 2023-03-22 23:44:23 +01:00
Bartosz Taudul
83ae9868e2
Fix pixel and nanosecond domain mixing. 2023-03-22 22:41:19 +01:00
Bartosz Taudul
80c15c0f9b
Draw samples using precalculated data. 2023-03-22 22:26:20 +01:00
Bartosz Taudul
da6ea47541
Preprocess samples. 2023-03-22 22:26:19 +01:00
Bartosz Taudul
2456ae36bf
Store wait stack in 4 bytes. 2023-03-22 21:55:02 +01:00
Bartosz Taudul
1e67c8bce2
Move const out of the loop. 2023-03-22 20:38:43 +01:00
Bartosz Taudul
50ccdc1ef4
Draw thread context switches using precalculated data. 2023-03-22 19:38:58 +01:00
Bartosz Taudul
88f0b9c754
Preprocess thread context switch data. 2023-03-22 19:38:36 +01:00
Bartosz Taudul
1e1833edc2
Parallelize timeline item preprocessing. 2023-03-19 18:54:32 +01:00
Bartosz Taudul
66d3c2a472
Draw CPU zones using a precalculated list. 2023-03-19 18:37:27 +01:00
Bartosz Taudul
1d7afbd07e
Calculate which CPU zones to draw beforehand. 2023-03-19 18:23:04 +01:00
Bartosz Taudul
6ab4180b5b
Use TimelineContext to draw CPU zones. 2023-03-19 01:14:36 +01:00
Bartosz Taudul
0ecdcbc13c
Move TimelineContext struct definition to a separate header. 2023-03-18 17:03:23 +01:00
Bartosz Taudul
0a32929b0b
Move hover flag to TimelineContext. 2023-03-18 16:07:56 +01:00
Bartosz Taudul
9538fa99ca
Pass yMin, yMax through TimelineContext. 2023-03-15 23:56:57 +01:00
Bartosz Taudul
c81ef177ab
Push timline context to Draw and DrawContents functions. 2023-03-14 02:25:15 +01:00
Bartosz Taudul
7dd31ab609
Timeline items may have preprocessing. 2023-03-14 02:02:21 +01:00
Bartosz Taudul
256905b7e3
Include first time in CPU thread lifetime calculation. 2023-03-03 22:46:25 +01:00
Tomaž Vöröš
dbefb70db3 Add key to TimelineItem. 2023-01-27 20:00:05 +01:00
Bartosz Taudul
ca125bd44c
Collapse Tracy threads by default.
Note that this will likely work only when loading existing traces. In live
captures the thread name may not have yet been retrieved at the point when
timeline item insertion occurs, which will prevent the check from succeeding.
2022-09-03 23:35:35 +02:00