Commit Graph

274 Commits

Author SHA1 Message Date
Bartosz Taudul
57dff0abc9 Add server query queue. 2019-04-01 19:26:50 +02:00
Bartosz Taudul
c07c6d11b7 Define server query packet. 2019-04-01 19:21:53 +02:00
Bartosz Taudul
fef417f286 Store total number of CPU and GPU zones in trace. 2019-03-27 01:46:54 +01:00
Bartosz Taudul
2e6ac050f4 Use custom vector swap. 2019-03-26 23:02:39 +01:00
Bartosz Taudul
a632d9e2a3 Add zone vector cache.
Zone children will be now collected in staging vectors. When the zone is
ended (and no children can be added anymore to it), a size-fitted vector
is allocated using slab allocation. The over-allocated vector is then
put into cache for use in future zones.

This is only active for vectors <= 8192 elements, or 64 KB (chosen
arbitrarily), to reduce time spent on copying memory.

Overall, this change should have the following effects:
- System memory allocation pressure reduction, due to re-usage of
  vectors, which eliminates the need for constant growth.
- Reduction of memory usage, because children vectors are now fitted to
  required size.
- Slight increase of zone processing time, due to memory copying?
2019-03-26 22:06:00 +01:00
Bartosz Taudul
11f4dcbf1e Consistent variable naming. 2019-03-26 21:41:44 +01:00
Bartosz Taudul
99fca9e069 Fix loading old traces when skipping locks. 2019-03-26 20:25:29 +01:00
Bartosz Taudul
e79fa04a8b Don't fail when timer accuracy is low. 2019-03-21 21:24:07 +01:00
Bartosz Taudul
7e6a8135df Remove double indirection in GetNextLockEvent(). 2019-03-16 14:18:43 +01:00
Bartosz Taudul
67f14be6aa Update lock ranges when loading trace. 2019-03-16 02:50:51 +01:00
Bartosz Taudul
8ced8a457c Update thread time range on lock event insert. 2019-03-16 02:50:51 +01:00
Bartosz Taudul
dc981550a1 Load lock event time to a variable. 2019-03-16 02:50:51 +01:00
Bartosz Taudul
71e20e7e7f Store lock map as flat_hash_map with pointer values. 2019-03-16 02:50:51 +01:00
Bartosz Taudul
5fbc14c487 Fix skipping plots in version >= 0.4.5. 2019-03-15 15:27:37 +01:00
Bartosz Taudul
a0299cc63a Optimize calculation of standard deviation. 2019-03-14 01:23:37 +01:00
Bartosz Taudul
d64f07f853 Don't search for thread for empty timelines. 2019-03-14 01:10:57 +01:00
Bartosz Taudul
b7fe29f750 Offload timeline statistics update to a background thread. 2019-03-13 01:46:05 +01:00
Bartosz Taudul
d0d7131e35 Properly restore threadMap.
This fixes thread ids returned by CompressThread in loaded traces. The
bug was manifesting by not displaying memory events in zone info window.
2019-03-07 00:49:25 +01:00
Bartosz Taudul
07bcca9dc0 Don't pre-fill threadExpand, if not needed. 2019-03-07 00:49:06 +01:00
Bartosz Taudul
bc87762012 Merge native callstack with the allocated one. 2019-03-05 19:44:08 +01:00
Bartosz Taudul
ebf09bebae Only one callstack may be in-flight at any time.
Save for the allocated callstack, but this will be solved in another
way. There's no need to keep pending callstacks in a map.
2019-03-05 19:44:08 +01:00
Bartosz Taudul
3e81e44d75 Separate processing for allocated callstacks.
Only native callstack is used for the moment.
2019-03-05 02:42:50 +01:00
Bartosz Taudul
bef31ba073 Separate message for zone begin with alloc src loc and callstack. 2019-03-03 18:05:03 +01:00
Bartosz Taudul
66b8a13e77 Store callstack alloc payloads. 2019-03-03 18:05:03 +01:00
Bartosz Taudul
9fc022346b Replace frame pointers with callstack frame ids. 2019-03-03 18:05:03 +01:00
Bartosz Taudul
664847211c Pack/unpack frame pointer to callstack frame id. 2019-03-03 18:05:03 +01:00
Bartosz Taudul
42c94f7142 Handle discontinuous frame end mismatch failure. 2019-02-28 19:32:42 +01:00
Bartosz Taudul
fb96d60256 Adjust last time in mem alloc/free and sys time messages. 2019-02-24 18:26:23 +01:00
Bartosz Taudul
e190faa7e1 Save/load CPU usage plot. 2019-02-21 22:56:59 +01:00
Bartosz Taudul
e9baa80bf3 Process CPU usage reports. 2019-02-21 22:56:59 +01:00
Bartosz Taudul
4422fce55c Don't decompress GpuZone threads while saving trace.
Saving the threads compressed in GPU zones and memory event has the
following result on trace dump sizes:

043/aa.tracy (0.4.3) {10055 KB} -> 044/aa.tracy (0.4.4) {9975 KB}  99.20% size change
043/android.tracy (0.4.3) {542739 KB} -> 044/android.tracy (0.4.4) {519248 KB}  95.67% size change
043/asset-new.tracy (0.4.3) {78403 KB} -> 044/asset-new.tracy (0.4.4) {75899 KB}  96.81% size change
043/asset-new-id.tracy (0.4.3) {84341 KB} -> 044/asset-new-id.tracy (0.4.4) {81771 KB}  96.95% size change
043/asset-old.tracy (0.4.3) {80688 KB} -> 044/asset-old.tracy (0.4.4) {78410 KB}  97.18% size change
043/big.tracy (0.4.3) {939577 KB} -> 044/big.tracy (0.4.4) {938427 KB}  99.88% size change
043/callstack.tracy (0.4.3) {14557 KB} -> 044/callstack.tracy (0.4.4) {14465 KB}  99.37% size change
043/callstack-linux.tracy (0.4.3) {6949 KB} -> 044/callstack-linux.tracy (0.4.4) {6942 KB}  99.90% size change
043/crash.tracy (0.4.3) {131 KB} -> 044/crash.tracy (0.4.4) {127 KB}  97.10% size change
043/crash2.tracy (0.4.3) {1422 KB} -> 044/crash2.tracy (0.4.4) {1412 KB}  99.29% size change
043/darkrl.tracy (0.4.3) {15767 KB} -> 044/darkrl.tracy (0.4.4) {15663 KB}  99.34% size change
043/darkrl2.tracy (0.4.3) {7947 KB} -> 044/darkrl2.tracy (0.4.4) {7886 KB}  99.23% size change
043/darkrl-old.tracy (0.4.3) {67448 KB} -> 044/darkrl-old.tracy (0.4.4) {67004 KB}  99.34% size change
043/deadlock.tracy (0.4.3) {5984 KB} -> 044/deadlock.tracy (0.4.4) {5986 KB}  100.03% size change
043/gn-opengl.tracy (0.4.3) {29005 KB} -> 044/gn-opengl.tracy (0.4.4) {28885 KB}  99.59% size change
043/gn-vulkan.tracy (0.4.3) {29352 KB} -> 044/gn-vulkan.tracy (0.4.4) {29257 KB}  99.68% size change
043/long.tracy (0.4.3) {1182800 KB} -> 044/long.tracy (0.4.4) {1176584 KB}  99.47% size change
043/mem.tracy (0.4.3) {1369067 KB} -> 044/mem.tracy (0.4.4) {1262406 KB}  92.21% size change
043/multi.tracy (0.4.3) {8004 KB} -> 044/multi.tracy (0.4.4) {7944 KB}  99.24% size change
043/new.tracy (0.4.3) {1108 KB} -> 044/new.tracy (0.4.4) {1099 KB}  99.18% size change
043/q3bsp-mt.tracy (0.4.3) {949855 KB} -> 044/q3bsp-mt.tracy (0.4.4) {937574 KB}  98.71% size change
043/q3bsp-st.tracy (0.4.3) {240347 KB} -> 044/q3bsp-st.tracy (0.4.4) {230092 KB}  95.73% size change
043/selfprofile.tracy (0.4.3) {197708 KB} -> 044/selfprofile.tracy (0.4.4) {197659 KB}  99.98% size change
043/tbrowser.tracy (0.4.3) {9503 KB} -> 044/tbrowser.tracy (0.4.4) {9503 KB}  100.00% size change
043/test.tracy (0.4.3) {40700 KB} -> 044/test.tracy (0.4.4) {40699 KB}  100.00% size change
043/virtualfile_hc.tracy (0.4.3) {72424 KB} -> 044/virtualfile_hc.tracy (0.4.4) {72304 KB}  99.83% size change
043/zfile_hc.tracy (0.4.3) {39419 KB} -> 044/zfile_hc.tracy (0.4.4) {39328 KB}  99.77% size change
2019-02-17 00:29:01 +01:00
Bartosz Taudul
760e9105d0 Don't decompress memory thread data while saving trace. 2019-02-17 00:27:41 +01:00
Bartosz Taudul
9ee494c0f4 Store thread compression layout in trace dump. 2019-02-16 22:48:29 +01:00
Bartosz Taudul
d030674b83 Simplify loading memory events. 2019-02-16 22:32:14 +01:00
Bartosz Taudul
569a9fb9be Change order of file version checks during loading memory events. 2019-02-16 22:26:50 +01:00
Bartosz Taudul
88b7961421 Allocate memory for all zones at the current level at once. 2019-02-16 20:53:07 +01:00
Bartosz Taudul
c127f51767 Load time offsets to scratch buffers. 2019-02-15 02:46:25 +01:00
Bartosz Taudul
7b023e533d Use big allocation mode for Vector's reserve_exact. 2019-02-15 01:59:33 +01:00
Bartosz Taudul
127be8e995 GpuEvent doesn't need init. 2019-02-15 01:31:58 +01:00
Bartosz Taudul
92c1420c30 Improve handling of post-load background jobs.
Background tasks (source location zones sorting, reconstruction of
memory plot) are now started only after trace loading is finished.
Multithreaded sorting was previously impacting trace load times.

Only one thread is used to perform both jobs, one after another.
2019-02-14 01:17:37 +01:00
Bartosz Taudul
080873003b Simplify support for 0.2 traces. 2019-02-14 01:13:11 +01:00
Bartosz Taudul
bd1c1d044b Force inline read/write time offset functions. 2019-02-14 00:17:50 +01:00
Bartosz Taudul
08642d034b Preserve string length in string map. 2019-02-12 22:11:15 +01:00
Bartosz Taudul
d32c070a9e Two more places where connection can silently drop. 2019-02-12 11:07:12 +01:00
Bartosz Taudul
7f11260bf0 Handle dropped connection during handshake. 2019-02-12 01:41:09 +01:00
Bartosz Taudul
76186f3221 Allow zone name retrieval from source location. 2019-02-10 16:45:19 +01:00
Bartosz Taudul
c7e64bb8a8 Replace select() with poll(). 2019-02-10 15:45:23 +01:00
Bartosz Taudul
e801943b90 Array index is changing here. 2019-01-31 18:37:59 +01:00
Bartosz Taudul
852fe03cbc More references. 2019-01-29 22:10:14 +01:00
Bartosz Taudul
d6c616848c Use reference instead of repeated deep dereferences. 2019-01-29 21:59:52 +01:00