Commit Graph

2610 Commits

Author SHA1 Message Date
Bartosz Taudul
1915a9e5f6 Display extra zone data count. 2020-01-26 17:28:37 +01:00
Bartosz Taudul
3e45e4abd9 Store zone children counts as uint32, not uint64.
This, along with the previous change has the following effect on trace
file sizes:

old/0.tracy (0.6.2) {6512 KB} -> new/0.tracy (0.6.3) {6518 KB}  100.10% size change
old/android.tracy (0.6.2) {488901 KB} -> new/android.tracy (0.6.3) {489710 KB}  100.17% size change
old/android-vk.tracy (0.6.2) {78049 KB} -> new/android-vk.tracy (0.6.3) {76570 KB}  98.10% size change
old/asset-new.tracy (0.6.2) {74224 KB} -> new/asset-new.tracy (0.6.3) {74181 KB}  99.94% size change
old/asset-new-id.tracy (0.6.2) {79900 KB} -> new/asset-new-id.tracy (0.6.3) {79875 KB}  99.97% size change
old/asset-old.tracy (0.6.2) {76245 KB} -> new/asset-old.tracy (0.6.3) {76420 KB}  100.23% size change
old/big.tracy (0.6.2) {922594 KB} -> new/big.tracy (0.6.3) {860068 KB}  93.22% size change
old/big2.tracy (0.6.2) {2028646 KB} -> new/big2.tracy (0.6.3) {1990121 KB}  98.10% size change
old/callstack.tracy (0.6.2) {14343 KB} -> new/callstack.tracy (0.6.3) {17707 KB}  123.45% size change
old/callstack-bsd.tracy (0.6.2) {14551 KB} -> new/callstack-bsd.tracy (0.6.3) {12652 KB}  86.94% size change
old/callstack-linux.tracy (0.6.2) {6953 KB} -> new/callstack-linux.tracy (0.6.3) {7012 KB}  100.86% size change
old/callstack-lua.tracy (0.6.2) {20439 KB} -> new/callstack-lua.tracy (0.6.3) {25889 KB}  126.66% size change
old/chicken.tracy (0.6.2) {311549 KB} -> new/chicken.tracy (0.6.3) {293828 KB}  94.31% size change
old/color.tracy (0.6.2) {865 KB} -> new/color.tracy (0.6.3) {866 KB}  100.13% size change
old/crash.tracy (0.6.2) {130 KB} -> new/crash.tracy (0.6.3) {130 KB}  99.85% size change
old/crash2.tracy (0.6.2) {1403 KB} -> new/crash2.tracy (0.6.3) {1327 KB}  94.56% size change
old/ctx.tracy (0.6.2) {3207 KB} -> new/ctx.tracy (0.6.3) {3203 KB}  99.89% size change
old/ctx-android.tracy (0.6.2) {88240 KB} -> new/ctx-android.tracy (0.6.3) {86209 KB}  97.70% size change
old/ctx-big.tracy (0.6.2) {88702 KB} -> new/ctx-big.tracy (0.6.3) {87038 KB}  98.12% size change
old/darkrl.tracy (0.6.2) {15458 KB} -> new/darkrl.tracy (0.6.3) {14560 KB}  94.19% size change
old/darkrl2.tracy (0.6.2) {7824 KB} -> new/darkrl2.tracy (0.6.3) {7435 KB}  95.02% size change
old/darkrl-light-big.tracy (0.6.2) {259652 KB} -> new/darkrl-light-big.tracy (0.6.3) {234625 KB}  90.36% size change
old/darkrl-old.tracy (0.6.2) {66299 KB} -> new/darkrl-old.tracy (0.6.3) {61883 KB}  93.34% size change
old/dxtc-bad.tracy (0.6.2) {7078 KB} -> new/dxtc-bad.tracy (0.6.3) {7048 KB}  99.57% size change
old/frameimages.tracy (0.6.2) {206425 KB} -> new/frameimages.tracy (0.6.3) {203537 KB}  98.60% size change
old/frameimages-big.tracy (0.6.2) {1177638 KB} -> new/frameimages-big.tracy (0.6.3) {1150496 KB}  97.70% size change
old/gn-opengl.tracy (0.6.2) {28587 KB} -> new/gn-opengl.tracy (0.6.3) {27355 KB}  95.69% size change
old/gn-vulkan.tracy (0.6.2) {28553 KB} -> new/gn-vulkan.tracy (0.6.3) {27050 KB}  94.74% size change
old/long.tracy (0.6.2) {1152078 KB} -> new/long.tracy (0.6.3) {1124731 KB}  97.63% size change
old/mem.tracy (0.6.2) {1187810 KB} -> new/mem.tracy (0.6.3) {1187668 KB}  99.99% size change
old/messages-callstack.tracy (0.6.2) {8743 KB} -> new/messages-callstack.tracy (0.6.3) {8608 KB}  98.46% size change
old/multi.tracy (0.6.2) {7735 KB} -> new/multi.tracy (0.6.3) {7304 KB}  94.43% size change
old/new.tracy (0.6.2) {1101 KB} -> new/new.tracy (0.6.3) {1076 KB}  97.79% size change
old/q3bsp-mt.tracy (0.6.2) {912230 KB} -> new/q3bsp-mt.tracy (0.6.3) {849329 KB}  93.10% size change
old/q3bsp-st.tracy (0.6.2) {227162 KB} -> new/q3bsp-st.tracy (0.6.3) {221594 KB}  97.55% size change
old/raytracer.tracy (0.6.2) {1105411 KB} -> new/raytracer.tracy (0.6.3) {977307 KB}  88.41% size change
old/selfprofile.tracy (0.6.2) {196894 KB} -> new/selfprofile.tracy (0.6.3) {184351 KB}  93.63% size change
old/tbrowser.tracy (0.6.2) {8776 KB} -> new/tbrowser.tracy (0.6.3) {7997 KB}  91.13% size change
old/test.tracy (0.6.2) {40498 KB} -> new/test.tracy (0.6.3) {39751 KB}  98.15% size change
old/topology.tracy (0.6.2) {3733 KB} -> new/topology.tracy (0.6.3) {3739 KB}  100.16% size change
old/topology-android.tracy (0.6.2) {5292 KB} -> new/topology-android.tracy (0.6.3) {5177 KB}  97.82% size change
old/tracy-dynamic.tracy (0.6.2) {672684 KB} -> new/tracy-dynamic.tracy (0.6.3) {608221 KB}  90.42% size change
old/tracy-static.tracy (0.6.2) {2310589 KB} -> new/tracy-static.tracy (0.6.3) {2136791 KB}  92.48% size change
old/virtualfile_hc.tracy (0.6.2) {72169 KB} -> new/virtualfile_hc.tracy (0.6.3) {72142 KB}  99.96% size change
old/vk-mt.tracy (0.6.2) {10815 KB} -> new/vk-mt.tracy (0.6.3) {10714 KB}  99.07% size change
old/zfile_hc.tracy (0.6.2) {39065 KB} -> new/zfile_hc.tracy (0.6.3) {39063 KB}  100.00% size change
2020-01-26 17:16:46 +01:00
Bartosz Taudul
f2a226407f Store extra zone data separately.
Extra zone data consists of:
- custom zone name,
- zone text,
- zone callstack index.

If neither of these data values is stored in zone, 5 bytes are saved. If
any one of them is required, extra 4 bytes are added, for an index into
extra data array.

Memory savings:

android         2371 MB -> 2324 MB
big             7593 MB -> 6747 MB
chicken         1687 MB -> 1501 MB
drl-l-b         1119 MB -> 1013 MB
long            4289 MB -> 4190 MB
q3bsp-mt        4399 MB -> 3918 MB
q3bsp-st        1067 MB -> 1027 MB
raytracer       6057 MB -> 5342 MB
selfprofile     1177 MB -> 1079 MB
tracy-dynamic   4489 MB -> 4013 MB
tracy-static    16.2 GB -> 14.3 GB
2020-01-26 16:19:07 +01:00
Bartosz Taudul
3aa427fdd6 Remove queue delay adjustment due to zone text. 2020-01-26 15:09:12 +01:00
Bartosz Taudul
2377911313 Package/core tooltip cosmetics. 2020-01-24 21:32:36 +01:00
Bartosz Taudul
c43bd2bfe2 Add dedicated function to check if zone has children. 2020-01-24 02:17:38 +01:00
Bartosz Taudul
ad3f37aec6 No need for two same check. 2020-01-24 02:16:29 +01:00
Bartosz Taudul
443771ecff Only display zone "statistics" button if data is available. 2020-01-23 19:49:23 +01:00
Bartosz Taudul
1c1e5d5ee7 Don't check for invalid zones in source location data. 2020-01-23 19:10:56 +01:00
Bartosz Taudul
e31b529b4a Count zones at zone end, not zone begin.
This makes sure only finished, non-zero-timespan zones are counted in
the statistics.
2020-01-23 19:10:56 +01:00
Bartosz Taudul
23601904cd Replace one more end validity check. 2020-01-23 18:50:13 +01:00
Bartosz Taudul
54a767bf81 Use just sign bit to check end value validity. 2020-01-22 22:25:04 +01:00
Bartosz Taudul
9420234a98 Force inline flat_hash_map wrappers. 2020-01-22 22:06:35 +01:00
Bartosz Taudul
3010c7ce63 Don't use proxy for a pointer. 2020-01-22 01:54:25 +01:00
Bartosz Taudul
ea424a4c8d Use custom vector. 2020-01-20 23:58:36 +01:00
Bartosz Taudul
e5ae1ea2cc Only perform search, if necessary. 2020-01-20 23:53:04 +01:00
Bartosz Taudul
6de489a34f Use flat_hash_map for groups. 2020-01-20 23:43:10 +01:00
Bartosz Taudul
6358b4588d Preserve groups order. 2020-01-20 23:40:07 +01:00
Bartosz Taudul
6b3165d3cc Perform map lookup in one place. 2020-01-20 23:34:48 +01:00
Bartosz Taudul
38e7d12b0b Use parallel sort in find zone menu. 2020-01-20 23:21:43 +01:00
Bartosz Taudul
7d78923967 Move parallel sort header mumbo jumbo to a separate file. 2020-01-20 23:21:43 +01:00
Bartosz Taudul
46dc85c10c Fix parent identifier extension to 64 bits.
Source location identifiers are signed 16 bits. Extending this value to
64 bits without first casting it to unsigned 16 bit caused bit extension
of the sign bit, making the value clash with "unselected" group
identifier.
2020-01-19 15:25:45 +01:00
Bartosz Taudul
91f86ce5b5 Tid to pid mapping may be already known. 2020-01-14 02:06:36 +01:00
Bartosz Taudul
3a460d3183 Use _mm_pause() instead of std::this_thread::yield() if possible. 2019-12-31 14:59:54 +01:00
Bartosz Taudul
8b56386ccd Keep atomics on separate cache lines. 2019-12-31 14:46:01 +01:00
Bartosz Taudul
ed5f534bbb Use proper data type size. 2019-12-28 18:28:37 +01:00
Bartosz Taudul
24727175d7 Implement copying user data location to clipboard. 2019-12-28 18:17:06 +01:00
Bartosz Taudul
9e76ddb9fd User data directory location getter. 2019-12-28 18:16:45 +01:00
Bartosz Taudul
36942a5ddb Resetting groups should also unselect group. 2019-12-28 18:03:30 +01:00
Bartosz Taudul
0ff6d6364b Don't operate on empty vector. 2019-12-28 18:03:13 +01:00
Bartosz Taudul
17afcbce4f Highlight zone from zone list on histogram. 2019-12-28 17:50:54 +01:00
Bartosz Taudul
46ed2fb802 Enhance time distribution zone search.
When the find zone menu is opened from the zone time distribution list,
time range limit will be enabled, preventing display of zones outside of
the selected zone range. This allows much easier finding of child zones
within the selected zone scope.

Limiting zone search to a specified thread(s) might also be helpful
here, but it can be worked around by looking only at zones in a single
thread group.
2019-12-28 17:28:39 +01:00
Bartosz Taudul
e083b2773a Add icon to zone time range display. 2019-12-28 17:24:11 +01:00
Bartosz Taudul
870c9c734f Draw range limit highlight. 2019-12-28 17:23:09 +01:00
Bartosz Taudul
46f3390365 Allow limiting zone time range in find zone menu. 2019-12-28 17:18:07 +01:00
Bartosz Taudul
33e7d175d4 Add zone time range limit controls. 2019-12-28 15:57:07 +01:00
Bartosz Taudul
6c6b78bcbd Fix find zone selection time. 2019-12-28 15:48:45 +01:00
Bartosz Taudul
115c66324d Add inclusive time display to time distribution. 2019-12-25 15:07:52 +01:00
Bartosz Taudul
1032eb95d2 Set sane default window size for CPU data. 2019-12-19 17:45:55 +01:00
Bartosz Taudul
f7f0ec0cec Fix memcpy from nullptr. 2019-12-19 17:30:37 +01:00
Bartosz Taudul
ef9bcb6696 Don't send query if no connection to client.
Fixes chrome import.
2019-12-19 17:23:46 +01:00
Bartosz Taudul
e8db86d092 Implement ZoneText() string merging. 2019-12-18 13:33:01 +01:00
Bartosz Taudul
14e096d052 Set (some of) the required variables. 2019-12-16 20:42:24 +01:00
Bartosz Taudul
0137404449 Invalid source location should be 0, not UINT16_MAX (?). 2019-12-16 19:11:23 +01:00
Bartosz Taudul
ced47f227c Add "import data" constructor to Worker. 2019-12-16 18:55:02 +01:00
Bartosz Taudul
95af214abe Prevent 0 ns timeline view range. 2019-12-16 18:40:38 +01:00
Bartosz Taudul
0507460a16 Add markers for package and core thread migrations. 2019-11-29 23:09:30 +01:00
Bartosz Taudul
9cf7629e9b Display CPU package, core tooltip for zone CPU list. 2019-11-29 23:09:11 +01:00
Bartosz Taudul
7ac47ab6bb Display package, core info on CPU data timeline. 2019-11-29 22:57:18 +01:00
Bartosz Taudul
db3e802643 Build reverse CPU topology map. 2019-11-29 22:46:57 +01:00
Bartosz Taudul
712403e9fd Transfer, display, save CPU topology data. 2019-11-29 22:41:41 +01:00
Bartosz Taudul
5b83ae4381 Release 0.6.1. 2019-11-28 23:24:15 +01:00
Bartosz Taudul
ade01e98ad Add time-relative switch to message list in zone info window. 2019-11-27 01:42:44 +01:00
Bartosz Taudul
3e47fd6bcd Display thread color boxes in messages list. 2019-11-27 01:38:47 +01:00
Bartosz Taudul
cc87cebee3 Display trace parameters only when the connection is active. 2019-11-26 00:57:06 +01:00
Bartosz Taudul
4551553eb4 Implement setting client parameters from server. 2019-11-25 23:59:48 +01:00
Bartosz Taudul
c5c9dfb0c9 Native callstacks are now optional in allocated callstack messages. 2019-11-25 22:54:10 +01:00
Bartosz Taudul
ace780ea74 Add CPU data thread highlight. 2019-11-24 01:40:32 +01:00
Bartosz Taudul
07e69a88c2 Fix CPU thread highlight for Vulkan zones. 2019-11-24 01:28:23 +01:00
Bartosz Taudul
2379d422cf GPU zones highlight whole CPU thread timeline. 2019-11-24 01:21:49 +01:00
Bartosz Taudul
7f689dadbe Use backspace icon for buttons erasing text entry. 2019-11-24 01:06:04 +01:00
Bartosz Taudul
1cc5dea616 Ignore BSD tracy-specific callstack frames. 2019-11-21 21:51:58 +01:00
Bartosz Taudul
fb6a92380d Drop support for pre-v0.5 traces. 2019-11-21 21:48:35 +01:00
Bartosz Taudul
31b6ff4bae Release 0.6.0. 2019-11-17 19:56:42 +01:00
Bartosz Taudul
c62732804a Round CPU data font height. 2019-11-17 14:30:10 +01:00
Bartosz Taudul
1e29d12819 More saturation in dynamic colors. 2019-11-16 23:03:46 +01:00
Bartosz Taudul
8ca67e49e4 Scale frame images in tooltips according to DPI scaling. 2019-11-16 22:58:51 +01:00
Bartosz Taudul
2d22372de3 Scale playback contents according to DPI scale. 2019-11-16 22:54:52 +01:00
Bartosz Taudul
37a658d933 Add srcloc color box to zone tooltips. 2019-11-16 22:38:43 +01:00
Bartosz Taudul
f670d82796 Show migrations when thread is hovered in CPU data window. 2019-11-16 16:51:56 +01:00
Bartosz Taudul
41f9dc0aa1 Cosmetics. 2019-11-16 16:37:08 +01:00
Bartosz Taudul
d9f71643ac Lock event time is known, don't reconstruct it. 2019-11-15 22:50:08 +01:00
Bartosz Taudul
a46731996d Thread list size is known from iteration. 2019-11-15 22:44:44 +01:00
Bartosz Taudul
db930f7f93 Reserve space for thread map, list. 2019-11-15 22:44:36 +01:00
Bartosz Taudul
18fd928a9d Don't display callstack message column if there are no callstacks. 2019-11-15 20:34:19 +01:00
Bartosz Taudul
d7d6a0fa9d More consistent srcloc/thread colors in zone info windows. 2019-11-15 20:13:13 +01:00
Bartosz Taudul
49e3bc8b21 Don't draw unneeded separator. 2019-11-15 20:04:59 +01:00
Bartosz Taudul
5f0cab6b63 Display call stack calls in memory allocation window. 2019-11-15 20:02:21 +01:00
Bartosz Taudul
973fd941d5 Extract call stack calls drawing functionality. 2019-11-15 19:59:13 +01:00
Bartosz Taudul
a518564006 No extended font in no-extended-font path. 2019-11-15 19:58:50 +01:00
Bartosz Taudul
12037b88ff Display messages callstack in messages list. 2019-11-15 01:22:26 +01:00
Bartosz Taudul
49945c7198 Process message callstacks. 2019-11-15 01:22:26 +01:00
Bartosz Taudul
9cf46e6ae6 Fix lock time announce/terminate in older traces. 2019-11-13 02:04:35 +01:00
Bartosz Taudul
f7ff0781b6 Properly set background done state in no-statistics builds. 2019-11-11 00:20:33 +01:00
Bartosz Taudul
b946c1d39e Only enable magic fitted vectors in no-statistics builds.
Source location zones pointer fixup is just too slow to be feasible.

Note: no-statistics builds of the graphical profiler don't perform fixup
of view-related pointers (e.g. zone info window zone pointer). This
won't cause crashes, because the pointers are still valid, but the
displayed data will be incorrect and potentially changing in time, as
the pointer can be reused for completely other zone.

Memory usage of ToyPathTracer data, in various scenarios:

Capture + statistics:   7121 MB
Load + statistics:      6057 MB
Capture - statistics:   4876 MB
Load - statistics:      4521 MB
2019-11-11 00:20:33 +01:00
Bartosz Taudul
e1e3bbbe3e Fixup source location zones pointers. 2019-11-11 00:20:33 +01:00
Bartosz Taudul
ae33aa4869 Fitted zone vectors are now magic vectors.
The pointed-to zones in the original children vector can't be freed, so
they are put into a zone pool for re-use by future zones.
2019-11-11 00:20:33 +01:00
Bartosz Taudul
4f962d2fcc Add ZoneEvent re-use pool. 2019-11-11 00:20:33 +01:00
Bartosz Taudul
fd7ad586af Make display of zone time in frames toggleable.
And disable it by default, as it can be heavy on resources.
2019-11-10 23:27:37 +01:00
Bartosz Taudul
fa53c2e683 Don't care about memory usage tracking data races. 2019-11-10 19:21:24 +01:00
Bartosz Taudul
9504d6c68f Don't try to delete empty Vectors. 2019-11-10 17:54:50 +01:00
Bartosz Taudul
f2801491bf Don't copy back pointer. 2019-11-10 17:48:54 +01:00
Bartosz Taudul
44f1d3dc1c Use proper memory ordering. 2019-11-10 17:30:38 +01:00
Bartosz Taudul
d4a1168491 Messages are inserted for current thread context. 2019-11-10 17:23:04 +01:00
Bartosz Taudul
003bed573c Use ThreadData cache in zone validation. 2019-11-10 17:20:55 +01:00
Bartosz Taudul
b1c88cd1f2 Cache ThreadData pointer for current thread context. 2019-11-10 17:17:07 +01:00
Bartosz Taudul
ded49edf4c Fix magic vectors in single-threaded Vulkan tooltip. 2019-11-10 16:50:19 +01:00
Bartosz Taudul
672093cf0e Adapt WriteTimeline() to magic vectors. 2019-11-10 16:34:38 +01:00
Bartosz Taudul
4eb8acc973 Magic vectors in automatic GPU drift detection. 2019-11-10 02:27:46 +01:00
Bartosz Taudul
1b6c79fa7b More magic vector fixes. 2019-11-10 02:10:21 +01:00
Bartosz Taudul
226a7b7cfb Magic vectors in GPU children list. 2019-11-10 02:03:31 +01:00
Bartosz Taudul
c65d524725 Magic vectors in GPU zone info window. 2019-11-10 01:59:20 +01:00
Bartosz Taudul
d32e3cb867 Adapt GPU zone utility functions to magic vectors. 2019-11-10 01:56:28 +01:00
Bartosz Taudul
9b52152e77 Adapt GetZoneEnd() for magic vectors. 2019-11-10 01:43:28 +01:00
Bartosz Taudul
7c277234e7 Load GPU zones into magic vectors. 2019-11-10 01:36:13 +01:00
Bartosz Taudul
4ed4e1005c Magic vectors in GPU drawing setup. 2019-11-10 01:35:57 +01:00
Bartosz Taudul
675e6a8d1a Support magic vectors for GPU zones. 2019-11-10 01:30:10 +01:00
Bartosz Taudul
06ad948abc Adapt zone children to magic vectors. 2019-11-10 01:23:44 +01:00
Bartosz Taudul
50efa8f672 Adapt time distribution calculation to magic vectors. 2019-11-10 01:08:15 +01:00
Bartosz Taudul
0c1f3ac16d Adapt zone getters to magic vectors. 2019-11-10 00:57:44 +01:00
Bartosz Taudul
f8edd3a37b Zone statistics reconstructions has to use magic vectors. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
065ba4ce5a Load zones into magic vectors. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
8ab2cf09b7 Handle magic vectors during dispatch. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
60c2b53d47 Add magic field to Vector. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
7be19193d9 Use adapters during zone level iteration. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
85e7125fee Add Vector iterator adapters. 2019-11-10 00:00:40 +01:00
Bartosz Taudul
40e9c8807d Remove unused lambda capture. 2019-11-10 00:00:15 +01:00
Bartosz Taudul
3a317c81c6 Fix logic error. 2019-11-09 23:57:08 +01:00
Bartosz Taudul
b3698ebb0f Merge read calls. 2019-11-09 00:48:20 +01:00
Bartosz Taudul
3e65532eaa Add Read3(), Read4() helpers. 2019-11-09 00:27:49 +01:00
Bartosz Taudul
2131eed4e7 Support multiple types in Read2(). 2019-11-09 00:25:12 +01:00
Bartosz Taudul
e80a19234e Don't store and read compressed thread. 2019-11-09 00:23:09 +01:00
Bartosz Taudul
467d675262 Zone reads can be merged. 2019-11-09 00:08:26 +01:00
Bartosz Taudul
23c59a6fc9 Use query cache. 2019-11-08 23:59:20 +01:00
Bartosz Taudul
ec895372b7 Thread is not needed in ReadTimeline(). 2019-11-08 23:56:11 +01:00
Bartosz Taudul
6ec734c264 Split ReadTimelineUpdateStatistics(). 2019-11-08 23:53:43 +01:00
Bartosz Taudul
c20da5ea70 Move unimportant fields to back of FileRead class. 2019-11-08 23:31:17 +01:00
Bartosz Taudul
31e2bc1141 Free Vector's memory during move assignment. 2019-11-08 22:52:23 +01:00
Bartosz Taudul
a1488a74a1 Perform Vector's swap() as a bitwise move. 2019-11-08 22:50:22 +01:00
Bartosz Taudul
b6213cfbc5 Define Vector's max capacity in one place. 2019-11-08 22:48:44 +01:00
Bartosz Taudul
5df7444cbb Replace djb hash with xxh3. 2019-11-07 23:52:52 +01:00
Bartosz Taudul
17ee1aed5f Add xxhash.
https://github.com/Cyan4973/xxHash/tree/master
e2f4695899e831171ecd2e780078474712ea61d3
2019-11-07 23:52:12 +01:00
Bartosz Taudul
4a9138fc51 Reduce FrameEvent size by 4 bytes.
While it would be nice to store frame times on 48 bytes, it is not
currently possible, as older traces have full 64 bit frame time stamps,
which are only then offset to first frame start time.
2019-11-07 23:05:13 +01:00
Bartosz Taudul
675cbc51cc Store memory free indices as 32 bit.
More than 4 billion memory events seems unlikely.

Memory savings in "mem" trace: 5747 MB -> 5427 MB.
2019-11-07 22:36:51 +01:00
Bartosz Taudul
bb2d44ae08 All time deltas must be processed. 2019-11-07 16:14:23 +01:00
Bartosz Taudul
ea2c329510 Input data *must not* be changed.
Not even for a short moment.
2019-11-07 01:29:11 +01:00
Bartosz Taudul
4a4fe82a1b No need to inject string terminator.
Comparison in m_data.stringMap already takes string size into account,
as an charutil::StringKey optimization.
2019-11-07 01:28:29 +01:00
Bartosz Taudul
dfad9695d2 Compress frame image data right as it arrives.
This removes the need to store temporary uncompressed image buffers,
which involves constant memory allocation and freeing. Instead, just one
permanent buffer is used, and only because the input data cannot change
during processing.
2019-11-06 23:29:59 +01:00
Bartosz Taudul
46d33f45bf Frame image packer doesn't care about width and height. 2019-11-06 22:53:01 +01:00
Bartosz Taudul
10a3516099 Delete uncompressed frame image data. 2019-11-06 22:38:19 +01:00
Bartosz Taudul
d741fb0af9 Plot can be empty if it was only configured. 2019-11-06 12:08:20 +01:00
Bartosz Taudul
df0e28a61f Remove more unneeded includes. 2019-11-06 01:37:58 +01:00
Bartosz Taudul
f53637891a Remove LZ4 include from TracyWorker.hpp. 2019-11-06 01:25:38 +01:00
Bartosz Taudul
5d3392428e Remove unneeded includes. 2019-11-06 01:21:22 +01:00
Bartosz Taudul
cfce429fca Format plot values according to requested formatting. 2019-11-05 18:08:42 +01:00
Bartosz Taudul
661c4a417b Process and store plot value formatting. 2019-11-05 18:02:08 +01:00
Bartosz Taudul
a7a739eea9 Use precalculated context switch usage data. 2019-11-05 01:41:27 +01:00
Bartosz Taudul
51090e5fb9 Implement ctx switch usage reconstruction. 2019-11-05 01:28:44 +01:00
Bartosz Taudul
8128b3894a Add vector debug macro.
Natvis is lacking in functionality, so this has to do.
2019-11-05 01:28:44 +01:00
Bartosz Taudul
946e328198 Fix 32-bit short_ptr. 2019-11-05 01:28:44 +01:00
Bartosz Taudul
6a500ccdb3 Don't display CPU usage until data is ready. 2019-11-05 01:28:44 +01:00
Bartosz Taudul
50b96c757e Context switch usage reconstruction skeleton. 2019-11-05 01:28:44 +01:00
Bartosz Taudul
a62c4135ad Add context switch usage struct. 2019-11-05 01:28:44 +01:00
Bartosz Taudul
09d6f3f917 Check if CPU graph is not obscured. 2019-11-04 01:15:49 +01:00
Bartosz Taudul
9bc6a3e0ee Add zone color boxes to parent groups in find zone menu. 2019-11-03 22:52:24 +01:00
Bartosz Taudul
209c1fdc72 Small radio buttons in find zone menu. 2019-11-03 22:32:34 +01:00
Bartosz Taudul
9b5ec8451f Remove dead assignment. 2019-11-03 16:57:31 +01:00
Bartosz Taudul
dfc35c1bf1 Fix crashes when callstack frames are not yet available. 2019-11-03 16:44:26 +01:00
Bartosz Taudul
5620597fb4 Use short ptr in VarArray. 2019-11-03 16:29:45 +01:00
Bartosz Taudul
d9c3238462 Save 2 bytes per PlotItem.
Memory savings:

android     2614 MB -> 2487 MB (95%)
chicken     1932 MB -> 1852 MB (95%)
mem         6067 MB -> 5747 MB (94%)
q3bsp-mt    5059 MB -> 5017 MB (99%)
q3bsp-st    1211 MB -> 1171 MB (96%)
2019-11-03 16:29:45 +01:00
Bartosz Taudul
29dcc5c8bc Don't zero-initialize Int48. 2019-11-03 14:33:13 +01:00
Bartosz Taudul
acce6867f1 Selecting a zone in time distribution list opens zone statistics. 2019-11-03 03:08:23 +01:00
Bartosz Taudul
13a7444f03 Add zone color boxes to time distribution table. 2019-11-02 23:14:49 +01:00
Bartosz Taudul
c294e62f5e Add zone color boxes to child zone list. 2019-11-02 23:11:37 +01:00
Bartosz Taudul
1a6f04f6ce Add zone color boxes to zone trace. 2019-11-02 23:05:11 +01:00
Bartosz Taudul
3a304ad054 Add zone color boxes to statistics menu. 2019-11-02 23:00:42 +01:00
Bartosz Taudul
04cb7732b8 Add zone color boxes to compare menu. 2019-11-02 22:58:50 +01:00
Bartosz Taudul
4dde1ca070 Add zone color boxes to find zone menu. 2019-11-02 22:48:00 +01:00
Bartosz Taudul
b7cd28ef72 Add source location color retriever. 2019-11-02 22:45:11 +01:00
Bartosz Taudul
4bc1588a5e Clear proper vector. 2019-11-02 16:57:18 +01:00
Bartosz Taudul
ce82bb816b Use short ptr for find zone grouping data.
Overall, the short ptr changes have the following effect on memory
usage:

big         9007 MB -> 8670 MB (96%)
chicken     2007 MB -> 1932 MB (96%)
drl-l-b     1383 MB -> 1304 MB (94%)
q3bsp-mt    5252 MB -> 5059 MB (96%)
long        5152 MB -> 4799 MB (93%)
fi-big      4141 MB -> 4000 MB (96%)
2019-11-02 16:54:12 +01:00
Bartosz Taudul
0df29d1e0b Use short ptr for source location payload data. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
04c92f8d19 Use short ptr for callstack payload storage. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
b0e52f20f8 Use short ptr for FrameImage storage. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
72efbe28ed Use short ptr for message data. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
52062f96d0 Use short ptr for GPU context map. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
308c280e40 Use short ptr for GPU context query data. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
1e4022e05b Use proper comparison. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
03656b2320 Remove unused variable. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
a40bbacb17 Use short ptr for CPU zone data. 2019-11-02 16:54:12 +01:00
Bartosz Taudul
cb20bf01f9 Use short ptr for GPU zone data. 2019-11-02 16:54:11 +01:00
Bartosz Taudul
c7664b0a98 Use short ptr in LockEventPtr. 2019-11-02 16:17:45 +01:00
Bartosz Taudul
181d16459c Use short ptr for Vector data. 2019-11-02 16:17:45 +01:00
Bartosz Taudul
ea23d2b91a Use short ptr for frame images. 2019-11-02 15:43:32 +01:00
Bartosz Taudul
2a28c6cc72 Use short ptr for callstack frame data. 2019-11-02 15:43:32 +01:00
Bartosz Taudul
654f54d877 Add short pointer class, storing 6 bytes. 2019-11-02 15:43:32 +01:00
Bartosz Taudul
45ff14d678 Fix saving source location payload data. 2019-11-02 14:28:59 +01:00
Bartosz Taudul
16bc862904 Save sizes of children vectors to prevent reallocation. 2019-11-02 12:38:32 +01:00
Bartosz Taudul
c99dc5c431 Disable SetGpuStart() assert for compat with old traces.
Currently the unknown GPU start is indicated by a -1 value, but it was
maximum int value previously. While the assert check is valid for newly
created traces, it will fire off if an older trace is loaded.

Temporarily disabling the check (effectively until only 0.6 traces are
supported) fixes the problem, as the max int value (0x7f...) has its
high bits removed and the low bytes will be sign extended during number
reconstruction, making it -1, as intended.
2019-11-02 02:41:51 +01:00
Bartosz Taudul
0552d75400 Allow filtering entries in statistics menu. 2019-11-01 20:49:02 +01:00
Bartosz Taudul
f88ec0c141 Convert namespaces combo box to radio buttons. 2019-11-01 20:23:22 +01:00
Bartosz Taudul
13b656fe61 Make srcloc dynamic color depend on function name. 2019-11-01 20:17:25 +01:00
Bartosz Taudul
d38257ea90 Add zone coloring mode based on source location. 2019-11-01 02:07:55 +01:00
Bartosz Taudul
39988ad636 Check for shutdown in background processing thread. 2019-10-31 21:41:21 +01:00
Bartosz Taudul
978071f2ba Allow grouping zones by parent. 2019-10-31 15:00:22 +01:00
Bartosz Taudul
c0df3dd965 Implement getting zone parent when thread id is known. 2019-10-31 14:59:52 +01:00
Bartosz Taudul
456deefdbc Keep child idx on stack. 2019-10-30 23:55:21 +01:00
Bartosz Taudul
25b610a36f Pack child into GPU start/end in GpuEvent (saves 4 bytes).
long    5152 MB -> 5061 MB
2019-10-30 23:50:37 +01:00
Bartosz Taudul
7319293081 Use proper scale for next time of collapsed items. 2019-10-30 23:17:46 +01:00
Bartosz Taudul
e8286600d1 Use -1 as invalid GPU start time. 2019-10-30 23:12:43 +01:00
Bartosz Taudul
7ce8c772ad Disallow negative GPU times.
Shouldn't happen, but GPU timestamps are a shitshow, so better be safe
than sorry.
2019-10-30 22:37:07 +01:00
Bartosz Taudul
0ac432dd25 Better GPU time check. 2019-10-30 22:35:58 +01:00
Bartosz Taudul
ae4794ab4c Save 2 bytes in ContextSwitchData and ContextSwitchCpu. 2019-10-30 22:25:46 +01:00
Bartosz Taudul
99d198d0bf Pack csAlloc in MemEvent (saves 3 bytes).
Memory usage change on selected traces:

android     2699 MB -> 2613 MB
chicken     2019 MB -> 2007 MB
mem         6308 MB -> 6068 MB
q3bsp-mt    5283 MB -> 5252 MB
q3bsp-st    1241 MB -> 1211 MB
2019-10-30 22:01:13 +01:00
Bartosz Taudul
789b95f259 Force inline small functions. 2019-10-29 01:32:09 +01:00
Bartosz Taudul
8c8f15c420 Force inline Slab::AllocInit(). 2019-10-29 01:19:40 +01:00
Bartosz Taudul
6f0dc2885f Fix connection abort. 2019-10-28 23:32:51 +01:00
Bartosz Taudul
8050622b0f Read and decompress network data on a separate thread. 2019-10-28 23:22:50 +01:00
Bartosz Taudul
e0356ae01e Cosmetics. 2019-10-28 22:53:06 +01:00
Bartosz Taudul
99b7e8ad92 Close socket when shutting down. 2019-10-28 22:52:52 +01:00
Bartosz Taudul
788ca2e5df Spawn no-op network thread. 2019-10-28 22:45:10 +01:00
Bartosz Taudul
7f07f5beb4 Free child time stack. 2019-10-26 23:32:16 +02:00
Bartosz Taudul
01985f50ef Cache source location zones counter search. 2019-10-26 16:33:40 +02:00
Bartosz Taudul
1d0084aa28 Add cache for last accessed source location zones. 2019-10-25 21:29:55 +02:00
Bartosz Taudul
b5419944aa Only write to memory if value has changed. 2019-10-25 21:28:55 +02:00
Bartosz Taudul
779063a18b Cache last shrinked source location. 2019-10-25 21:07:28 +02:00
Bartosz Taudul
294793367f Cache last CheckSourceLocation query.
Just knowing that the query was performed is enough here -- this
function adds a new source location entry, if there already isn't one.
2019-10-25 21:01:33 +02:00
Bartosz Taudul
0f2503d334 Send time deltas in GPU time events. 2019-10-25 19:52:01 +02:00
Bartosz Taudul
1ce25d3aef Init cache in-place. 2019-10-25 19:19:35 +02:00
Bartosz Taudul
8fa5188176 Send delta times for context switches. 2019-10-25 19:13:11 +02:00
Bartosz Taudul
c8e5489e99 Group caches together. 2019-10-25 18:16:27 +02:00
Bartosz Taudul
29c42cc8d7 Fix assert. 2019-10-25 01:00:32 +02:00
Bartosz Taudul
17a51c898e No need to check if vector is empty. 2019-10-25 00:54:46 +02:00
Bartosz Taudul
b5e759bc5a Don't calculate child index twice. 2019-10-25 00:54:46 +02:00
Bartosz Taudul
70f1074490 Don't iterate over children to calculate zone self time. 2019-10-25 00:33:44 +02:00
Bartosz Taudul
d6a8a8532f Prevent storing variable on stack. 2019-10-24 23:40:21 +02:00
Bartosz Taudul
1fe76be955 Don't reconstruct lock event time on insert. 2019-10-24 23:25:04 +02:00
Bartosz Taudul
b83d0f46d9 Improve updating last time.
Avoid LHS, don't write if don't need to.
2019-10-24 23:23:52 +02:00
Bartosz Taudul
721f3c8925 Callstack is already zero-initialized. 2019-10-24 23:05:39 +02:00
Bartosz Taudul
45332fd837 Don't read memory when setting values. 2019-10-24 23:03:13 +02:00
Bartosz Taudul
c9da5f1474 Use cached thread retriever. 2019-10-24 22:34:18 +02:00
Bartosz Taudul
5873561b54 Add cached thread retriever. 2019-10-24 22:33:48 +02:00
Bartosz Taudul
06bc802107 Avoid load-hit-store. 2019-10-24 22:24:00 +02:00
Bartosz Taudul
01ceedb57a Focus out labels in connection window. 2019-10-24 00:54:19 +02:00
Bartosz Taudul
c5a6c7bf63 Display transferred data size. 2019-10-24 00:47:25 +02:00
Bartosz Taudul
1cfb5adc44 Count transferred data size. 2019-10-24 00:47:16 +02:00
Bartosz Taudul
ba61a9ed84 Transfer time deltas, not absolute times.
This change significantly reduces network bandwidth requirements.

Implemented for:
- CPU zones,
- GPU zones,
- locks,
- plots,
- memory events.
2019-10-24 00:06:41 +02:00
Bartosz Taudul
5c92eae3ed Add early exit for invalid times. 2019-10-20 18:47:50 +02:00
Bartosz Taudul
d592af9c2f Fix TRACY_NO_STATISTICS build. 2019-10-20 17:32:20 +02:00
Bartosz Taudul
5816dc2b11 Don't cache timedist data if ctx switch data is incomplete. 2019-10-20 17:03:30 +02:00
Bartosz Taudul
ccdc102d5a Cache zone time distribution data. 2019-10-20 03:24:58 +02:00
Bartosz Taudul
4d761def61 Microoptimize comparison. 2019-10-16 20:26:39 +02:00
Bartosz Taudul
bfbd09b619 Add CPU usage graph tooltip. 2019-10-15 21:47:37 +02:00
Bartosz Taudul
7a9d4aecd3 Fix graph height calculation. 2019-10-15 21:41:06 +02:00
Bartosz Taudul
4372ad1bc3 Allow disabling CPU usage graph. 2019-10-15 21:37:16 +02:00
Bartosz Taudul
c28bab59b5 Improve look of CPU usage graph. 2019-10-15 21:20:00 +02:00
Bartosz Taudul
5aeeefefbd Draw CPU usage graph. 2019-10-15 16:55:15 +02:00
Bartosz Taudul
3ae5c125f6 Implement counting CPU usage (ctx switch) at a given time. 2019-10-15 16:54:43 +02:00
Bartosz Taudul
3ce6b1205f Don't iterate over 256 CPUs. 2019-10-15 16:13:53 +02:00
Bartosz Taudul
eccb0b1e4a Track max CPU present in context switch data. 2019-10-15 16:13:53 +02:00
Bartosz Taudul
bdb8516d04 Make sure context switch end time wasn't set already. 2019-10-15 14:54:28 +02:00
Bartosz Taudul
fefa3b4693 Improve options UI. 2019-10-15 01:49:36 +02:00
Bartosz Taudul
f0c77b4ef4 Add annotation list window. 2019-10-14 20:52:18 +02:00
Bartosz Taudul
c6207ed0e9 Move extra tools to main window button bar popup. 2019-10-14 20:07:55 +02:00
Bartosz Taudul
fc7f77eb7a Add implementation of disablable button. 2019-10-14 20:06:57 +02:00
Bartosz Taudul
6de8e6987f Sort annotations. 2019-10-14 19:04:37 +02:00
Bartosz Taudul
5c47467c88 Fix includes. 2019-10-13 17:13:15 +02:00
Bartosz Taudul
671a8f673e Don't interact with unfocused annotations. 2019-10-13 17:01:55 +02:00
Bartosz Taudul
e462335f83 Save/load annotations. 2019-10-13 16:29:24 +02:00
Bartosz Taudul
c2f38d0db7 Implement removal of user data files. 2019-10-13 16:29:02 +02:00
Bartosz Taudul
9d0316342d Move Annotation struct to a proper place. 2019-10-13 16:28:40 +02:00
Bartosz Taudul
20cf1d9f83 Implement color selection for annotation region. 2019-10-13 16:14:22 +02:00
Bartosz Taudul
f9e860f559 Display annotation text on timeline. 2019-10-13 15:59:48 +02:00
Bartosz Taudul
1527e7bc10 Add annotation modification window. 2019-10-13 15:50:37 +02:00
Bartosz Taudul
5fed86dae7 Allow adding annotations to timeline. 2019-10-13 15:28:52 +02:00
Bartosz Taudul
215dc8a804 More compact GpuEvent struct (save 4 bytes).
Memory usage reduction of various traces:

big         9011 -> 9007
frameimages 561  -> 552
fi-big      4144 -> 4139
long        5253 -> 5125
2019-10-13 14:42:52 +02:00
Bartosz Taudul
c044df6324 Display number of GPU zones. 2019-10-13 14:21:28 +02:00
Bartosz Taudul
1ae49c14a2 GPU zone count accessor. 2019-10-13 14:13:28 +02:00
Bartosz Taudul
5e1894dd79 Count GPU zones. 2019-10-13 14:13:04 +02:00
Bartosz Taudul
d4620b4157 Fix UI. 2019-10-09 22:33:02 +02:00
Bartosz Taudul
0a358ac1f0 Time distribution may now only include running time. 2019-10-09 22:13:52 +02:00
Bartosz Taudul
6ced346e08 Different sorting modes for zone time distribution. 2019-10-09 21:42:46 +02:00
Bartosz Taudul
ed1f722c51 Display trace file name in trace info window. 2019-10-07 21:36:19 +02:00
Bartosz Taudul
4c4099877d Track trace file name in TracyView. 2019-10-07 21:36:19 +02:00
Bartosz Taudul
c6f320d2d8 Store file name in FileRead. 2019-10-07 21:32:27 +02:00
Bartosz Taudul
1cd5ccb3c1 Display zone time distribution. 2019-10-04 21:34:00 +02:00
Bartosz Taudul
5111275770 Highlight hovered zone on the find zone zones list. 2019-10-04 13:02:26 +02:00
Bartosz Taudul
b913c17f5b Add "no grouping" mode to find zone zones list. 2019-10-04 12:42:05 +02:00
Bartosz Taudul
f2bb933f49 Use proper background color. 2019-10-02 00:49:30 +02:00
Bartosz Taudul
3b223c64d4 Darken to background color to hide overhang.
This only handles the root window case. When the profiler is embedded in
other application, the window background color is not matched.
2019-10-01 23:17:36 +02:00
Bartosz Taudul
db29d309a2 Lambda capture is not needed here. 2019-10-01 22:42:43 +02:00
Bartosz Taudul
68f476834f Make sure TracyCountBits() always returns uint64_t. 2019-10-01 22:42:29 +02:00
Bartosz Taudul
65ea33a60f Store memory callstack data as 24-bit ints.
This reduces MemEvent size from 40 to 38 bytes.

Memory usage reduction:

chicken     2027 -> 2019
mem         6468 -> 6308
q3bsp-mt    5304 -> 5283
2019-10-01 22:38:17 +02:00
Bartosz Taudul
f0b957ec56 Store callstacks on 24 bits.
ZoneEvent is now 27 bytes.

Memory usage reduction on selected traces (sizes in MB):

big             9224 -> 9011  (97%)
chicken         2044 -> 2027  (99%)
drl-l-b         1443 -> 1383  (95%)
long            5327 -> 5253  (98%)
q3bsp-mt        5400 -> 5304  (98%)
selfprofile     1403 -> 1382  (98%)
2019-10-01 22:38:17 +02:00
Bartosz Taudul
c631e33f81 Add 24-bit int implementation. 2019-10-01 21:48:34 +02:00
Bartosz Taudul
472959b29f Remove irrelevant comment. 2019-10-01 01:15:43 +02:00
Bartosz Taudul
717a212563 Save another 2 bytes per ZoneEvent.
ZoneEvent is not 28 bytes.

Memory usage reduction on selected traces (sizes in MB):

big             9527 -> 9224  (96%)
chicken         2107 -> 2044  (97%)
drl-l-b         1479 -> 1443  (97%)
long            5412 -> 5327  (98%)
q3bsp-mt        5592 -> 5400  (96%)
selfprofile     1443 -> 1403  (97%)
2019-10-01 01:05:37 +02:00
Bartosz Taudul
4964aa9547 Assert on getting index only for active strings. 2019-10-01 00:40:58 +02:00
Bartosz Taudul
acfcfb09ce Hide context switch options, if no data is available. 2019-09-30 23:46:10 +02:00
Bartosz Taudul
0e56682964 Darkening of inactive thread regions. 2019-09-30 23:37:36 +02:00
Bartosz Taudul
6e7e8eff87 Set extreme compression level to really be extreme. 2019-09-29 21:02:01 +02:00
Bartosz Taudul
2470936050 Don't perform background tasks during trace upgrade. 2019-09-29 20:52:25 +02:00
Bartosz Taudul
d228bcb622 Pack StringIdx in 24 bits.
This reduces ZoneEvent size from 32 to 30 bytes.

Memory usage reduction on selected traces (sizes in MB):

big             9902 -> 9527  (96%)
chicken         2172 -> 2107  (97%)
ctx-big          311 ->  309  (99%)
drl-l-b         1570 -> 1479  (94%)
long            5496 -> 5412  (98%)
mem             6468 -> 6468  (100%)
q3bsp-mt        5784 -> 5592  (96%)
selfprofile     1486 -> 1443  (97%)
2019-09-29 20:32:42 +02:00
Bartosz Taudul
781ebeb835 Add table initializing alloc to slab allocator. 2019-09-29 20:18:16 +02:00
Bartosz Taudul
59632f0d37 One more place to check if srcloc zones are ready. 2019-09-29 20:17:47 +02:00
Bartosz Taudul
873d536845 Display number of strings. 2019-09-29 19:22:50 +02:00
Bartosz Taudul
c91ae667d1 Add string count getter. 2019-09-29 19:22:15 +02:00
Bartosz Taudul
cb6a3f3334 Highlight CPU data timeline from thread tooltip. 2019-09-29 18:55:31 +02:00
Bartosz Taudul
3b8ab5715f Highlight CPU data timeline from CPU data window. 2019-09-29 18:53:58 +02:00
Bartosz Taudul
cafb5d6a99 Highlight threads on CPU data timeline. 2019-09-29 18:49:48 +02:00
Aleksei Skriabin
c0c2f4536a strstr_nocase() typo fix. 2019-09-28 14:20:29 +05:00
Bartosz Taudul
c09f3c0676 Add thread color boxes to CPU data window. 2019-09-25 02:12:35 +02:00
Bartosz Taudul
6c5627d8e4 Add thread color boxes to memory allocations listings. 2019-09-24 23:58:11 +02:00
Bartosz Taudul
581fd920a1 Add thread color boxes to lock info. 2019-09-24 23:52:52 +02:00
Bartosz Taudul
12e2bcb691 Add thread color boxes to zone info windows. 2019-09-24 23:51:47 +02:00
Bartosz Taudul
ad2dd09c25 Add thread color boxes to zone tooltips. 2019-09-24 23:50:00 +02:00
Bartosz Taudul
47f81d0ba4 Add thread color box to memory plot tooltip. 2019-09-24 23:47:51 +02:00
Bartosz Taudul
9c86102bad Add thread color box to CPU data on timeline. 2019-09-24 23:46:54 +02:00
Bartosz Taudul
a7e3324eba Add thread color boxes to GPU context tooltips. 2019-09-24 23:45:36 +02:00
Bartosz Taudul
6ffbd00b0c Add thread color box to crash info. 2019-09-24 23:42:25 +02:00
Bartosz Taudul
c73a74b8d5 Add thread color boxes to memory allocation info. 2019-09-24 23:41:28 +02:00
Bartosz Taudul
e9b815a3b8 Show thread color boxes in find zone menu. 2019-09-24 23:38:29 +02:00
Bartosz Taudul
06fe469598 Add thread color boxes to messages thread list. 2019-09-24 23:33:33 +02:00
Bartosz Taudul
63184f8762 Better Vulkan thread heuristics. 2019-09-24 00:55:24 +02:00
Bartosz Taudul
a5ba74ed13 Handle multiple Vulkan threads. 2019-09-23 17:27:49 +02:00
Bartosz Taudul
82cd667b30 Allow specifying network port in server. 2019-09-21 15:43:01 +02:00
Bartosz Taudul
4c736aecfa Use fibonacci hashing to determine thread colors. 2019-09-21 14:03:42 +02:00
Bartosz Taudul
7a1fb4e0bd Proper message when call stack trees are not available. 2019-09-21 00:57:12 +02:00
Bartosz Taudul
46f7235e32 Display proper message when there are no active allocations. 2019-09-21 00:54:30 +02:00
Bartosz Taudul
d8e0853cd8 Multithreaded frame image compression. 2019-09-20 23:03:12 +02:00
Bartosz Taudul
6f5a23a198 Add task dispatcher to server. 2019-09-20 22:58:12 +02:00
Bartosz Taudul
e1e5d6bd47 Add const version of PackFrameImage().
Temporary buffer needs to be handled outside of the function.
2019-09-20 22:55:55 +02:00
Bartosz Taudul
b362baed5f Minor UI improvements. 2019-09-19 01:10:33 +02:00
Bartosz Taudul
6a0512fe16 Allow comparing frame times. 2019-09-16 22:02:47 +02:00
Bartosz Taudul
8fe9b56b6f Calculate frame statistics. 2019-09-16 22:02:47 +02:00
Bartosz Taudul
b99675ae60 Use thread color for collapsed zones. 2019-09-16 20:34:55 +02:00
Bartosz Taudul
36b2b8f71f Always return static thread color if dynamic colors are disabled. 2019-09-16 20:31:32 +02:00
Bartosz Taudul
5796f19a3b Focus out exact memory plot value. 2019-09-16 20:27:16 +02:00
Bartosz Taudul
7673028dba Fix skipping memory data. 2019-09-16 15:42:25 +02:00
Bartosz Taudul
5429f04614 Don't use source location data before it's ready. 2019-09-16 15:37:57 +02:00
Bartosz Taudul
6d00a56c61 Draw thread migrations across CPU cores. 2019-09-12 20:08:57 +02:00
Bartosz Taudul
23b6e5156b Display thread color in thread tooltip. 2019-09-11 19:01:27 +02:00
Bartosz Taudul
2872edce5d Use thread colors in context switch graph. 2019-09-11 18:56:54 +02:00
Bartosz Taudul
8ddafe4153 Extract color highlight functionality. 2019-09-11 18:52:25 +02:00
Bartosz Taudul
0850145811 Disable color box drag and drop. 2019-09-11 18:48:28 +02:00
Bartosz Taudul
2cec6f5482 Add thread colors to options menu. 2019-09-11 18:44:06 +02:00
Bartosz Taudul
4ea62ecb06 Extract small color box drawing. 2019-09-11 18:38:10 +02:00
Bartosz Taudul
00409b0b94 Extract thread color getter. 2019-09-11 18:34:48 +02:00
Bartosz Taudul
a5a6b11b63 Zones can now have dynamic colors. 2019-09-08 14:33:30 +02:00
Bartosz Taudul
2714152f84 Allow calculating zone depth. 2019-09-08 14:16:12 +02:00
Bartosz Taudul
cdc4575dba Setup tid -> thread data mapping when loading trace. 2019-09-08 14:15:40 +02:00
Bartosz Taudul
ea6a0a58a7 Thread data accessor. 2019-09-08 14:07:16 +02:00
Bartosz Taudul
c9a1d3d7e5 Display zone color in zone info window. 2019-09-08 13:19:43 +02:00
Bartosz Taudul
b7522ec4c1 Allow getting zone color sans higlights, etc. 2019-09-08 13:16:00 +02:00
Bartosz Taudul
17e6a97552 Let's leave this here. 2019-09-07 17:49:54 +02:00
Bartosz Taudul
a0814a2e5c Correctly calculate discontinuous frames time. 2019-09-07 17:39:39 +02:00
Bartosz Taudul
aac0a36a2d Don't use source location zones before they are ready. 2019-09-07 17:23:11 +02:00
Bartosz Taudul
3449f0777e Display zone time on frames plot. 2019-09-07 16:55:49 +02:00
Bartosz Taudul
0b1a6047f6 Add different highlight for zones selected on histogram. 2019-09-07 15:33:11 +02:00
Bartosz Taudul
57a2b62edc Display number of threads for pids in CPU data list. 2019-09-04 01:43:56 +02:00
Bartosz Taudul
aa2530d442 Display external thread name (if applicable) on CPU data timeline. 2019-08-31 19:37:05 +02:00
Bartosz Taudul
86cb477811 Pack ZoneThreadData.
This reduces struct size from 10 to 8 bytes. Assumes 48-bit pointers
(4-level paging)!

Memory savings (MB):

android     2766    ->  2757    (99%)
big         10.29 G ->  9902    (96%)
chicken     2244    ->  2172    (96%)
ctx-android 228     ->  224     (98%)
drl-l-b     1635    ->  1570    (96%)
gn-vulkan   244     ->  240     (98%)
long        5656    ->  5496    (97%)
q3bsp-mt    6043    ->  5784    (95%)
selfprofile 1554    ->  1486    (95%)
2019-08-31 00:55:51 +02:00
Bartosz Taudul
3ec534cdf3 Prevent "ntdll.dll" from appearing as a thread name. 2019-08-30 23:09:07 +02:00
Bartosz Taudul
1c0c6311ec Fix skipping data when loading traces. 2019-08-30 01:16:42 +02:00
Bartosz Taudul
217a3781e6 Fix possible wrong process name for pid 0. 2019-08-30 00:59:54 +02:00
Bartosz Taudul
19f8f9f101 Use proper type. 2019-08-30 00:56:11 +02:00
Bartosz Taudul
a8d204821e Signed left shift is undefined. 2019-08-29 18:42:29 +02:00
Bartosz Taudul
5e8b2a0723 Display wakeup times in zone wait regions list. 2019-08-28 23:03:16 +02:00
Bartosz Taudul
6f25ad5fcb Save per-trace options. 2019-08-28 21:35:08 +02:00
Bartosz Taudul
fc5293b1ae Only scroll message list to bottom if capture is live. 2019-08-28 21:04:28 +02:00
Bartosz Taudul
a2f968d843 Compress thread id in MessageData. 2019-08-28 21:03:01 +02:00
Bartosz Taudul
ede26b0caf Fix skipping zone levels. 2019-08-28 20:47:19 +02:00
Bartosz Taudul
85027c185d Extract notification area drawing to a separate function. 2019-08-28 20:27:39 +02:00
Bartosz Taudul
a8eb99efcc Add notification icons when a drawing a category is disabled. 2019-08-28 20:24:14 +02:00
Bartosz Taudul
5b0ccef373 Change some icons. 2019-08-28 20:17:38 +02:00
Bartosz Taudul
fd5014be6f GetThreadString() is no longer used. 2019-08-28 20:08:16 +02:00
Bartosz Taudul
28a20e631e Preserve frame graph position and scale. 2019-08-28 19:52:36 +02:00
Bartosz Taudul
17d4a82ca5 Preserve timeline vertical scroll position. 2019-08-28 19:49:27 +02:00
Bartosz Taudul
f37797db44 Save/load view state. 2019-08-28 19:45:22 +02:00
Bartosz Taudul
dc5444ff0f Notify UserData that view state should be preserved.
This is only active when a trace is loaded from a file (and state should
be persistent for future sessions using this trace), or when state is
saved to a file (so that future sessions will use current state).

No state is preserved by default, i.e. when the trace was not saved to a
file.
2019-08-28 19:37:01 +02:00
Bartosz Taudul
949c9cb121 Move some view data to a separate structure. 2019-08-28 19:35:54 +02:00
Bartosz Taudul
38bfae13dd Add helper function for opening files. 2019-08-28 19:28:31 +02:00
Bartosz Taudul
2a0d6ce4ad Add notification area indicator for hidden timeline items. 2019-08-28 18:36:05 +02:00
Bartosz Taudul
ed83762a1a Keep things simple. 2019-08-28 01:29:58 +02:00
Bartosz Taudul
ef287c8aab Display external thread names of profiled program on CPU data timeline. 2019-08-27 23:17:53 +02:00
Bartosz Taudul
8eb7220dd7 Use the new thread name getter. 2019-08-27 23:08:14 +02:00
Bartosz Taudul
3c092b4bec Add thread name getter combining local and external thread names. 2019-08-27 23:00:13 +02:00
Bartosz Taudul
f8e3d1ad0a Try to fix current program's thread names.
External thread names can be cut-off to include only the first 15-or-so
characters. If a local thread name is known and its beginning matches
the external name, use the local name instead.
2019-08-27 22:41:03 +02:00
Bartosz Taudul
8bb13ca09e Use captured program name in CPU data.
This fixes android application names, which are cut to show only last
15-or-so letters.
2019-08-27 22:35:53 +02:00
Bartosz Taudul
f76f38777e Signed minus unsigned is unsigned... 2019-08-26 19:09:12 +02:00
Bartosz Taudul
eb78ecd0fd Display frame number in playback window. 2019-08-26 19:01:59 +02:00
Bartosz Taudul
3e4d3efbdb Extract frame number getter. 2019-08-26 19:01:51 +02:00
Bartosz Taudul
e5a11ad593 Allow sorting CPU data table by different columns. 2019-08-25 00:17:06 +02:00
Bartosz Taudul
4376757912 Display thread ids in options menu. 2019-08-24 23:43:36 +02:00
Bartosz Taudul
2b9ec14c92 Display threads ids as base-10 numbers. 2019-08-24 23:41:33 +02:00
Bartosz Taudul
1712431dfd Compress external threads. Saves 4 bytes per ctx switch.
Dropped support for loading context switch data in previous versions of
traces.
2019-08-19 23:09:58 +02:00
Bartosz Taudul
21e7a4bb16 Extract thread compression into a separate class. 2019-08-19 22:56:58 +02:00
Bartosz Taudul
94382f54ca Move FileVersion() to TracyFileHeader.hpp. 2019-08-19 22:56:58 +02:00
Bartosz Taudul
e60b2884f4 Mark local threads with different color. 2019-08-18 14:57:44 +02:00
Bartosz Taudul
19857473e3 Also collect information on local threads. 2019-08-18 14:56:17 +02:00
Bartosz Taudul
9a3974b8f1 Display process times in graphical form. 2019-08-18 14:51:25 +02:00
Bartosz Taudul
2eed28b19f Highlight current process. 2019-08-18 14:46:59 +02:00
Bartosz Taudul
ae9cae781a Display CPU migrations percentage. 2019-08-18 14:44:00 +02:00
Bartosz Taudul
691fe06bfe Compare pids to determine if thread is local untracked. 2019-08-18 14:40:04 +02:00
Bartosz Taudul
95f4162870 Display number of tracked processes. 2019-08-18 14:30:52 +02:00
Bartosz Taudul
7a036b56b1 Add icon to CPU data button. 2019-08-18 14:30:01 +02:00
Bartosz Taudul
c5060da185 Display unknown pid as unknown. 2019-08-18 14:28:56 +02:00
Bartosz Taudul
faac08865a Display basic information about CPU usage. 2019-08-18 12:28:38 +02:00
Bartosz Taudul
3b8518f7b6 Save/load CPU thread data. 2019-08-18 01:53:38 +02:00
Bartosz Taudul
62dbe522c5 Add accessors. 2019-08-18 01:51:02 +02:00
Bartosz Taudul
103645c2fa Calculate cpu thread data statistics. 2019-08-18 01:50:49 +02:00
Bartosz Taudul
1498417a8d Save/load tid to pid mapping. 2019-08-17 22:36:21 +02:00
Bartosz Taudul
20e8a5ecc8 Create tid to pid mapping. 2019-08-17 22:32:41 +02:00
Bartosz Taudul
fa573ef4cf Display PID. 2019-08-17 22:21:02 +02:00
Bartosz Taudul
678e942e9f Transfer PID of profiled program. 2019-08-17 22:19:04 +02:00
Bartosz Taudul
1024992493 React to enter key in "go to frame" dialog. 2019-08-17 22:01:06 +02:00
Bartosz Taudul
258cf38d64 Fix flicker. 2019-08-17 21:59:08 +02:00
Bartosz Taudul
0ea8789f39 Display CPU core in waking up thread popup. 2019-08-17 21:24:40 +02:00
Bartosz Taudul
414f903cc5 Collect thread wakeup data. 2019-08-17 17:05:29 +02:00
Bartosz Taudul
f957f64ce1 No magic numbers. 2019-08-17 16:26:59 +02:00
Bartosz Taudul
26be78530f Use signed number to calculate frame offset. 2019-08-17 15:22:54 +02:00
Bartosz Taudul
65e62dea06 Display thread ids next to thread names in CPU data. 2019-08-17 03:06:54 +02:00
Bartosz Taudul
6c53cac15e Fix uninitialized variable. 2019-08-16 21:20:04 +02:00
Bartosz Taudul
e975c4d7bf Also retrieve external thread names. 2019-08-16 19:49:16 +02:00
Bartosz Taudul
134a8c5d2a Fix positioning. 2019-08-16 19:32:25 +02:00
Bartosz Taudul
edd5338faa Display untracked threads. 2019-08-16 19:30:46 +02:00
Bartosz Taudul
ccaf92afc4 Save/load external process names. 2019-08-16 19:24:38 +02:00
Bartosz Taudul
fe7f56b022 Implement retrieval of external process names. 2019-08-16 19:22:23 +02:00
Bartosz Taudul
56e6795c76 Add per-cpu context switch tooltips. 2019-08-16 18:39:03 +02:00
Bartosz Taudul
7e81f3250e Add CPU tooltip. 2019-08-16 18:39:03 +02:00
Bartosz Taudul
8e71e2dba5 Draw per-CPU global context switch data. 2019-08-16 18:22:57 +02:00
Bartosz Taudul
c212661714 Allow determining whether thread is local to profiled program. 2019-08-16 17:59:25 +02:00
Bartosz Taudul
cef7e4b8d0 Save/load per-cpu context switches. 2019-08-16 16:51:18 +02:00
Bartosz Taudul
8bc4258e29 Display count of per-cpu context switch data. 2019-08-16 16:51:18 +02:00
Bartosz Taudul
a92034d59d CPU data accessor. 2019-08-16 16:51:18 +02:00
Bartosz Taudul
69527d2f71 Collect per-cpu context switch data. 2019-08-16 16:51:18 +02:00
Bartosz Taudul
9e0fe226df Add small font. 2019-08-16 16:02:57 +02:00
Bartosz Taudul
42c71d7e46 Fix loading old traces. 2019-08-16 00:24:29 +02:00
Bartosz Taudul
95879d2bd9 Use proper UI element to indicate selectable items. 2019-08-16 00:12:03 +02:00
Bartosz Taudul
889eddd646 Pack ContextSwitchData. Saves 3 bytes per context switch region. 2019-08-15 23:53:47 +02:00
Bartosz Taudul
e90ddf7ee5 Don't search whole data set twice. 2019-08-15 23:03:37 +02:00
Bartosz Taudul
c22c259a13 Pack time and thread in MemEvent.
This saves 4 bytes per logged memory allocation. Memory savings for
selected traces:

android     2945 MB -> 2766 MB
chicken     2261 MB -> 2245 MB
q3bsp-mt    6085 MB -> 6043 MB
mem         6788 MB -> 6468 MB
2019-08-15 23:02:43 +02:00
Bartosz Taudul
9618ee3581 Fix skipping locks. 2019-08-15 22:24:27 +02:00
Bartosz Taudul
e43a57f6b3 Remove irrelevant comments. 2019-08-15 21:51:47 +02:00
Bartosz Taudul
a635e54a79 Pack MessageData. 2019-08-15 21:42:24 +02:00
Bartosz Taudul
04c8830f86 Cosmetics. 2019-08-15 21:38:00 +02:00
Bartosz Taudul
45401fc54c Use proper variable name. 2019-08-15 21:34:19 +02:00
Bartosz Taudul
8b73dece98 Preserve magic time values when loading old traces. 2019-08-15 21:30:37 +02:00
Bartosz Taudul
41beff29a9 Remove redundant GetTimeBegin().
Traces now start at zero time.
2019-08-15 21:04:20 +02:00
Bartosz Taudul
c9d7b96c81 Prevent int16_t -> int64_t promotion on negative numbers. 2019-08-15 20:58:16 +02:00
Bartosz Taudul
3db3952135 Hackfix for broken lock terminate times. 2019-08-15 20:45:00 +02:00
Bartosz Taudul
5e20b3f28a Pack time and source location in LockEvent. 2019-08-15 20:39:16 +02:00
Bartosz Taudul
bf3ad57456 Pack start time and srcloc together in ZoneEvent.
This reduces ZoneEvent struct size by 2 bytes. Memory savings on various
captures:

10.62 GB -> 10.29 GB
 2342 MB ->  2276 MB
 1706 MB ->  1635 MB
 6277 MB ->  6085 MB
2019-08-15 20:17:36 +02:00
Bartosz Taudul
f5775a2d6e Display list of CPUs on which zone was running. 2019-08-15 20:17:36 +02:00
Bartosz Taudul
042e6c9e11 Set initial time of old traces to 0. 2019-08-15 20:17:36 +02:00
Bartosz Taudul
350e526ec0 Fix crash when zone exists before thread context switches appear. 2019-08-15 20:17:36 +02:00
Bartosz Taudul
b322d20c19 Store received timestamps offset to 0. 2019-08-15 20:17:36 +02:00
Bartosz Taudul
659907c972 Store srcloc identifiers using 16 bit.
This reduces various structure sizes by 2 bytes. Memory usage reduction
on various traces:

big               11 GB -> 10.62 GB
chicken         2436 MB ->  2342 MB
drl-light-big   1761 MB ->  1706 MB
q3bsp-mt        6469 MB ->  6277 MB
2019-08-15 20:15:48 +02:00
Bartosz Taudul
416113fdcb Drop support for ETC1 frame images. 2019-08-15 16:29:50 +02:00
Bartosz Taudul
32c7d13159 Count size of some more structures. 2019-08-15 14:15:40 +02:00