Commit Graph

206 Commits

Author SHA1 Message Date
Bartosz Taudul
4c381e13e9 Store list of symbol locations. 2020-03-27 17:34:51 +01:00
Bartosz Taudul
c999a74d34 Symbol length transfer. 2020-03-25 18:32:36 +01:00
Bartosz Taudul
b89874850f Pack frame identifiers in ghost zones. 2020-03-16 23:05:07 +01:00
Bartosz Taudul
452341059b Build ghost zones tree. 2020-03-16 23:05:06 +01:00
Bartosz Taudul
693db74380 Add CallstackFrameId comparator. 2020-03-16 23:05:06 +01:00
Bartosz Taudul
aeb3bc410b Pack FrameImage struct. 2020-03-16 23:05:06 +01:00
Bartosz Taudul
e7240cb77d Custom lock name transfer. 2020-03-08 13:47:38 +01:00
Bartosz Taudul
0df309b45c Forward declare LockType. 2020-03-02 01:58:48 +01:00
Bartosz Taudul
4843a1d458 Collect parent call stacks for symbols. 2020-02-29 16:41:22 +01:00
Bartosz Taudul
6cc4de8d28 Construct parent call stacks for sampled stack traces. 2020-02-29 16:24:15 +01:00
Bartosz Taudul
8aa70211c0 Display inline functions. 2020-02-27 15:28:58 +01:00
Bartosz Taudul
7dd929a39e Preserve symbol call location. 2020-02-27 15:07:29 +01:00
Bartosz Taudul
852e37c8dd Calculate callstack sample data on trace load. 2020-02-27 01:22:36 +01:00
Bartosz Taudul
26cee8acf0 Perform symbol information queries. 2020-02-26 22:35:15 +01:00
Bartosz Taudul
eb7e8162ff Handle module names on server side. 2020-02-26 00:55:43 +01:00
Bartosz Taudul
af58649113 Store symbol addresses. 2020-02-25 23:42:59 +01:00
Bartosz Taudul
437771ea85 Process callstack sample data. 2020-02-22 18:52:37 +01:00
Bartosz Taudul
c5dbd749e7 Combine ContextSwitchCpu writes. 2020-02-20 02:09:09 +01:00
Bartosz Taudul
54573fb970 Combine ContextSwitchData writes. 2020-02-20 02:05:23 +01:00
Bartosz Taudul
cc0f1f514c Store memory event time and thread data together. 2020-02-13 00:52:29 +01:00
Bartosz Taudul
5c6bfcbeee Add combined start + srcloc setter for ZoneEvent. 2020-02-12 20:46:56 +01:00
Bartosz Taudul
1655bf284f More Int24/Int48 optimizations. 2020-02-12 02:00:26 +01:00
Bartosz Taudul
caace1ce11 Directly access memory, omitting shift.
As always, clang generated the right code here anyways...
2020-02-11 02:24:40 +01:00
Bartosz Taudul
6f4a10be04 Optimize Int48 reconstruction. 2020-02-10 01:38:45 +01:00
Bartosz Taudul
76afef9117 Direct checks for context switch end validity. 2020-02-10 01:26:31 +01:00
Bartosz Taudul
9fc9f71666 Properly initialize callstack frame tree. 2020-02-05 23:16:18 +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
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
c43bd2bfe2 Add dedicated function to check if zone has children. 2020-01-24 02:17:38 +01:00
Bartosz Taudul
54a767bf81 Use just sign bit to check end value validity. 2020-01-22 22:25:04 +01:00
Bartosz Taudul
4551553eb4 Implement setting client parameters from server. 2019-11-25 23:59:48 +01:00
Bartosz Taudul
49945c7198 Process message callstacks. 2019-11-15 01:22:26 +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
661c4a417b Process and store plot value formatting. 2019-11-05 18:02:08 +01:00
Bartosz Taudul
a62c4135ad Add context switch usage struct. 2019-11-05 01:28:44 +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
308c280e40 Use short ptr for GPU context query data. 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
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
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
13b656fe61 Make srcloc dynamic color depend on function name. 2019-11-01 20:17:25 +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
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