Commit Graph

258 Commits

Author SHA1 Message Date
Bartosz Taudul
af58649113 Store symbol addresses. 2020-02-25 23:42:59 +01:00
Bartosz Taudul
ca894be51d Store sampling period on server. 2020-02-25 23:13:28 +01:00
Bartosz Taudul
4273939cf5 Local threads must have at least one zone captured. 2020-02-22 18:52:38 +01:00
Bartosz Taudul
597911e5a8 Save/load callstack samples. 2020-02-22 18:52:38 +01:00
Bartosz Taudul
ca39c9877e Display number of callstack samples. 2020-02-22 18:52:37 +01:00
Bartosz Taudul
437771ea85 Process callstack sample data. 2020-02-22 18:52:37 +01:00
Bartosz Taudul
ecc9369da2 Return zone extra during allocation. 2020-02-20 23:39:40 +01:00
Bartosz Taudul
4bf0af321f Wrapper for allocation and retrieval of zone extra. 2020-02-20 23:37:55 +01:00
Bartosz Taudul
8e825d91e0 Keep refTime in a register. 2020-02-12 20:59:36 +01:00
Bartosz Taudul
e88df069bd Load zone child number along with zone data. 2020-02-12 02:14:21 +01:00
Bartosz Taudul
53e5eb749d Compress frame images using zstd.
Memory usage and trace load times:

!comp         587 MB,  439 ms  ->    541 MB,  523 ms    (92%, 119%)
android-vk    197 MB,  136 ms  ->    188 MB,  178 ms    (95%, 130%)
big2         4463 MB,  2.93 s  ->   4198 MB,  3.65 s    (94%, 124%)
fi            483 MB,  346 ms  ->    416 MB,  409 ms    (86%, 118%)
fi-big       3307 MB,  3.15 s  ->   2985 MB,  3.53 s    (90%, 112%)
large       19.74 GB, 10.05 s  ->  19.28 GB, 11.16 s    (97%, 110%)
2020-02-09 21:22:12 +01:00
Bartosz Taudul
7425cd7112 Also display non-user plot data count. 2020-02-05 23:41:53 +01:00
Bartosz Taudul
022528bb47 Use Martin Ankerl's robin hood unordered map.
ska::flat_hash_map has bugs and its development is dead.
2020-01-28 21:49:36 +01:00
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
23601904cd Replace one more end validity check. 2020-01-23 18:50:13 +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
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
4551553eb4 Implement setting client parameters from server. 2019-11-25 23:59:48 +01:00
Bartosz Taudul
fb6a92380d Drop support for pre-v0.5 traces. 2019-11-21 21:48:35 +01:00
Bartosz Taudul
49945c7198 Process message callstacks. 2019-11-15 01:22:26 +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
4f962d2fcc Add ZoneEvent re-use pool. 2019-11-11 00:20:33 +01:00
Bartosz Taudul
d4a1168491 Messages are inserted for current thread context. 2019-11-10 17:23:04 +01:00
Bartosz Taudul
b1c88cd1f2 Cache ThreadData pointer for current thread context. 2019-11-10 17:17:07 +01:00
Bartosz Taudul
672093cf0e Adapt WriteTimeline() to magic vectors. 2019-11-10 16:34:38 +01:00
Bartosz Taudul
f8edd3a37b Zone statistics reconstructions has to use magic vectors. 2019-11-10 00:00:40 +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
ea2c329510 Input data *must not* be changed.
Not even for a short moment.
2019-11-07 01:29:11 +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
f53637891a Remove LZ4 include from TracyWorker.hpp. 2019-11-06 01:25:38 +01:00
Bartosz Taudul
661c4a417b Process and store plot value formatting. 2019-11-05 18:02:08 +01:00
Bartosz Taudul
50b96c757e Context switch usage reconstruction skeleton. 2019-11-05 01:28:44 +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
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
16bc862904 Save sizes of children vectors to prevent reallocation. 2019-11-02 12:38:32 +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
789b95f259 Force inline small functions. 2019-10-29 01:32:09 +01:00
Bartosz Taudul
8050622b0f Read and decompress network data on a separate thread. 2019-10-28 23:22:50 +01:00