1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00
Commit Graph

245 Commits

Author SHA1 Message Date
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
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 45332fd837 Don't read memory when setting values. 2019-10-24 23:03:13 +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 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 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