Commit Graph

19 Commits

Author SHA1 Message Date
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
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
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
37442a7671
Mark activity when animating message marker. 2022-09-28 01:13:40 +02:00
Bartosz Taudul
0e930a2c13
Prevent thick zone highlight from going outside the zone box. 2022-09-09 00:18:40 +02:00
Bartosz Taudul
60579d6334
Migrate drawing GPU data to the new timeline item system. 2022-09-04 13:39:20 +02:00
Bartosz Taudul
ec3dcaeef3
Migrate drawing CPU threads to the new timeline item system. 2022-09-03 23:28:54 +02:00
Bartosz Taudul
63d074c5d8
Fix zone size calculation wrt text fitting.
Previously the zone size calculation hasn't took into account the possibility
of the zone going out of the screen. This is now fixed.
2022-08-15 19:38:40 +02:00
Bartosz Taudul
112406472a
Do not normalize non-ghost zone names.
These do not have unwanted decorations, but may include useful user
annotations (e.g. "Open file (/etc/passwd)"), which we would not want to
remove.
2022-08-15 17:03:45 +02:00
Bartosz Taudul
d27cb4a094
Normalize names in ghost zone tooltips. 2022-08-15 16:54:12 +02:00
Bartosz Taudul
8531ef6591
Extract ShortenZoneName() function to a separate file. 2022-08-15 16:34:37 +02:00
Bartosz Taudul
07a1383304
Expose zone name normalization as a separate setting. 2022-08-15 16:24:44 +02:00
Bartosz Taudul
47a2512957
Change namespace shortening to zone name shortening.
Namespace shortening was kinda ok for function names produced by MSVC, which
are generally clean looking. However, gcc/clang like to produce function names
which include template arguments, function parameters, return values, etc. In
such cases the old algorithm simply didn't work, because removal of everything
before the last :: could as well happen in midst of function parameters list.
The result was certainly not an usable function name.

With this new approach namespaces are no longer explicitly mentioned and this
functionality is simply called zone name shortening.

The user-selectable options were changed to make the shortening always
enabled, disabled, or to apply as needed. Note that the "as needed" approach
will be dynamic, trying to gradually remove more and more from the name, until
it fits in the requested area.

Current implementation is only the first step into making this work. In this
first step the function parameters are reduced to () and the template
arguments are reduced to <>. This alone greatly improves readability of the
zone names.

The option to reduce namespaces to one letter (i.e. std::tr1::hash would
become s:t:hash) will no longer be present, now or in the future.
2022-08-15 14:19:57 +02:00
Bartosz Taudul
d12fa11762
Change magic value enums to constexprs. 2022-08-14 18:16:30 +02:00
Bartosz Taudul
2331ee04d2
Cleanup TracyView includes. 2022-07-02 17:00:08 +02:00
Bartosz Taudul
e3b11821c3
Extract zone timeline rendering from View. 2022-07-02 15:36:36 +02:00