Bartosz Taudul
a9ee4c499e
Build messages draw list only if visible.
2023-04-05 18:55:23 +02:00
Bartosz Taudul
4b8ac41345
Calculate CPU data draw lists only if visible.
2023-04-05 18:45:00 +02:00
Bartosz Taudul
bb9219384f
Do not recalculate sty.
2023-04-05 18:44:36 +02:00
Bartosz Taudul
f2a2669ca8
Decouple CPU graph availability from having the draw data.
2023-04-05 18:21:12 +02:00
Bartosz Taudul
9500add83b
Push yPos to TimelineItem::Preprocess().
2023-04-05 18:07:09 +02:00
Bartosz Taudul
2b7b79352b
Parallelize calculation of per-CPU context switches.
2023-04-02 22:10:22 +02:00
simplyWiri
a8b42488ad
Clamp scrolling to the difference between the deepest zone near the mouse, and the height of the window.
...
This prevents from unncessary scrolling when the trace does not exceed the size of the screen
2023-04-02 19:01:58 +10:00
Bartosz Taudul
33a640f848
Name worker threads.
2023-03-25 22:14:34 +01:00
Bartosz Taudul
5eebc5d7cf
Preprocess CPU usage.
...
Things of note: Worker::GetCpuUsage() functionality was moved to
TimelineItemCpuData::PreprocessCpuUsage().
2023-03-25 17:55:15 +01:00
Bartosz Taudul
dcf27f4989
Provide small font height in TimelineContext.
2023-03-25 17:25:10 +01: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
96d60ce626
Change GetNextFrameHeight() to GetHeight().
...
The GetNextFrameHeight() name correctness was very situational. It was
often used in the meaning of "get current frame height".
2023-03-25 15:12:33 +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
6c21edd509
Drawing is not finished until function return.
2023-03-23 22:09:19 +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
fbc87275e7
Add highlighted message accessor to View.
2023-03-23 21:47:22 +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
8bbd50361a
Remove unused variables.
2023-03-22 22:26:19 +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
d085f2541a
Fix drawing folded ghost zones.
2023-03-22 20:52:44 +01:00
Bartosz Taudul
a3947fbc57
Use vStart retrieved from ctx.
2023-03-22 20:52:31 +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
060bab357d
Add DrawFinished() to early exit paths.
2023-03-21 02:11:50 +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
85d541124e
Inline frames limit was raised to 64 in 7552341ff
.
2023-03-19 18:23:04 +01:00
Bartosz Taudul
1d7afbd07e
Calculate which CPU zones to draw beforehand.
2023-03-19 18:23:04 +01:00
Bartosz Taudul
b4893fafb7
Notify TimelineItem when drawing has finished.
2023-03-19 16:07:47 +01:00
Bartosz Taudul
3a2cc0bed0
Allow setting short_ptr pointer.
2023-03-19 15:21:52 +01:00
Bartosz Taudul
6ab4180b5b
Use TimelineContext to draw CPU zones.
2023-03-19 01:14:36 +01:00
Bartosz Taudul
ee5d6f1adb
Use TimelineContext for drawing GPU zones.
2023-03-19 00:28:14 +01:00
Bartosz Taudul
5743bff0af
Use TimelineContext when drawing CPU data.
2023-03-19 00:23:33 +01:00
Bartosz Taudul
26791f55d1
Use TimelineContext data for drawing plots.
2023-03-18 17:11:24 +01:00
Bartosz Taudul
0ecdcbc13c
Move TimelineContext struct definition to a separate header.
2023-03-18 17:03:23 +01:00
Bartosz Taudul
5b3427395e
Add view start and end to TimelineContext.
2023-03-18 17:02:23 +01:00
Bartosz Taudul
0a32929b0b
Move hover flag to TimelineContext.
2023-03-18 16:07:56 +01:00
Bartosz Taudul
c75bec9122
Cosmetics.
2023-03-18 15:59:52 +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
b6b6e1edcf
Store common constants in context variable.
2023-03-14 02:25:14 +01:00
Bartosz Taudul
66d8dab925
Preprocess timeline items in controller.
2023-03-14 02:02:50 +01:00
Bartosz Taudul
7dd31ab609
Timeline items may have preprocessing.
2023-03-14 02:02:21 +01:00
Bartosz Taudul
988de5b594
Fix typo.
2023-03-14 01:54:21 +01:00
Bartosz Taudul
7d69103444
Add plot type "power" and Watt format.
...
Note that this technically breaks backwards compatibility of trace files
for 0.9.2 builds. But, whatever, as it's not yet released.
2023-03-10 01:25:41 +01:00
Bartosz Taudul
23705fd84c
Add a reminder to keep interfaces in sync.
2023-03-10 01:07:06 +01:00
Bartosz Taudul
69855c671f
Process power usage messages.
2023-03-10 01:02:41 +01:00
Bartosz Taudul
f428a5b52b
Fix popup of collapsed items near timeline start.
...
There are various changes involved into making this work:
1. Zone size (zsz) is no longer clamped to the timeline viewport area.
This clamping has to be removed to prevent otherwise uncollapsed zones
from apparently becoming small near the viewport borders. Such a small
zone would then be collapsed, resulting in unwanted popping.
Interesingly, only the CPU zones were clamped before. GPU zones were
not.
2. Iteration over visible zones has to start before the visible timeline
viewport area. Without this some zones that would be otherwise
included in the collapsed area (started by a previous zone) may be
fully visible. This causes child zones to be drawn and produces
unwanted popping. (At this point threshold for continuing collapsed
area is greater than threshold for starting it.)
3. Since the iteration now starts before timeline visible area, it may so
happen that everything found will be in a small slice of timeline that
is outside the screen. To fix this, the end time of last found item is
checked against the viewport start time.
It is always valid to access *(zitend-1), as it is in each case done
after null set check (it == zitend).
Similar but simpler fix was also applied to per-thread call stack samples.
2023-03-09 00:38:23 +01:00
Bartosz Taudul
107afd78a4
Make collpsed zones gray in source location dynamic color mode.
...
The reasoning is that you want to use the color to see where a zone of
a particular type is placed. When collapsed zones go back to displaying
thread color, you may mistake such region of collapsed zones for something
they aren't.
2023-03-04 22:54:58 +01:00
Bartosz Taudul
2434514a42
Make view mode heuristic work correctly in on demand mode.
2023-03-04 00:37:38 +01:00
Bartosz Taudul
a8cc3cb06b
Use on demand flag in GetFirstTime().
2023-03-04 00:33:52 +01:00
Bartosz Taudul
f9449bc938
Only retrieve frame offset internally in GetFrameNumber().
2023-03-04 00:32:15 +01:00
Bartosz Taudul
8164b776fd
Don't pass GetFrameOffset() results to GetFrameText().
...
Frame offset can be retrieved internally.
2023-03-04 00:29:00 +01:00
Bartosz Taudul
9155b01ddf
Use on demand flag to determine if need to show missed frames.
2023-03-04 00:25:30 +01:00
Bartosz Taudul
5ebc499f49
Add on demand mode flag accessor.
2023-03-04 00:19:58 +01:00
Bartosz Taudul
e92874c0bb
Save "on demand" flag in traces.
...
Previously on demand mode was determined by frame offset parameter being
greater than zero. However, if the application is not pumping frames with
FrameMark macro, the frame index will never increase and the frame offset
parameter stay at zero. It is not possible to distinguish on demand traces
from normal ones in this scenario.
Fix by explicitly saving the on demand flag in trace file and employ the
previous logic to set the flag when importing older traces.
2023-03-04 00:11:32 +01:00
Bartosz Taudul
256905b7e3
Include first time in CPU thread lifetime calculation.
2023-03-03 22:46:25 +01:00
Bartosz Taudul
28199512cd
Create first memory plot data point at first time.
2023-03-03 22:44:25 +01:00
Bartosz Taudul
3ff158c8be
Worker::GetMemoryDefault() is not needed.
2023-03-03 22:40:14 +01:00
Bartosz Taudul
5ff809cc0a
Calculate plot timeline taking active time span into account.
2023-03-03 22:36:04 +01:00
Bartosz Taudul
3ed543a1b7
Dim timeline before first time.
2023-03-03 22:25:07 +01:00
Bartosz Taudul
b7cefe816e
Restrict keyboard navigation to active time span.
2023-03-03 22:23:30 +01:00
Bartosz Taudul
e659c630fd
Calculate statistics percentages relative to active time span.
2023-03-03 22:19:43 +01:00
Bartosz Taudul
fc7bd61576
Calculate CPU data percentages relative to active time span.
2023-03-03 22:18:08 +01:00
Bartosz Taudul
2f49caaa6e
Show only active time span in on-demand mode.
2023-03-03 22:12:33 +01:00
Bartosz Taudul
1f94ab32df
Exclude missing on-demand frames from on-load zoom.
2023-03-03 21:48:34 +01:00
Bartosz Taudul
c91b052c80
Add first time getter.
2023-03-03 21:48:34 +01:00
Bartosz Taudul
b89bfd44f1
Line stats may not exist, even if the line has attributed cost.
...
One scenario for this to happen is when there's children calls data in the
symbol.
2023-03-01 19:28:58 +01:00
Bartosz Taudul
897aec5b06
Release 0.9.1.
2023-02-26 15:30:03 +01:00
Bartosz Taudul
40b648655b
Fix out-of-bounds reference.
2023-02-24 23:06:12 +01:00
Bartosz Taudul
b3186a9b7d
Fix uninitialized variable.
2023-02-24 22:57:14 +01:00
Bartosz Taudul
55823df56a
Remove support for AT&T assembly syntax.
2023-02-10 20:41:03 +01:00
Tomaž Vöröš
645d53f254
More correct shouldUpdateCenterItem
.
2023-01-31 20:35:17 +01:00
Tomaž Vöröš
ea1a0299f3
Add switch for vertical centering on/off at compile-time.
2023-01-31 19:48:19 +01:00
Tomaž Vöröš
bca8f28f43
Centering around the mouse pointer.
2023-01-29 19:20:26 +01:00
Tomaž Vöröš
dbefb70db3
Add key to TimelineItem.
2023-01-27 20:00:05 +01:00
Tomaž Vöröš
2df56e9941
Fix off-by-one-frame in timeline item height.
2023-01-27 20:00:05 +01:00
Tomaž Vöröš
7b9b810421
Refactor the use of offset in TimelineItem::Draw() and TimelineController::End().
2023-01-27 20:00:05 +01:00
Bartosz Taudul
d47122586c
Fix color channel names in source location message.
2023-01-23 01:23:15 +01:00
Bartosz Taudul
6652999a60
Fix color channels names in zone color message.
2023-01-23 01:18:54 +01:00
Bartosz Taudul
eb7c13e7bb
Fix message color component names in the protocol.
...
Red and blue channels were mislabeled. Otherwise, coding and decoding was
performed correctly, as far as the color channel order described in the manual
is followed by the user.
No change to the binary protocol was made.
2023-01-23 01:07:07 +01:00