Commit Graph

281 Commits

Author SHA1 Message Date
Bartosz Taudul
97360c0c4c Always save dumps with .tracy extension. 2017-10-12 22:38:11 +02:00
Bartosz Taudul
1b4a9379cc Vertical scrolling of zone area. 2017-10-12 22:27:17 +02:00
Bartosz Taudul
737671adbf Remove lock announce message.
This removes problem with static initialization order of mutices vs
tracy.

Lock source location is now transferred in lock wait message.
2017-10-12 20:14:17 +02:00
Bartosz Taudul
8634c48c9f Check for thread existence when adding a lock. 2017-10-12 19:52:18 +02:00
Bartosz Taudul
3df0abd164 Only check thread string when adding a new thread. 2017-10-12 19:52:06 +02:00
Bartosz Taudul
6fc0bc881c Allow hiding threads. 2017-10-12 19:47:56 +02:00
Bartosz Taudul
c1090a3116 Fix zone depth calculation. 2017-10-12 19:14:03 +02:00
Bartosz Taudul
cc8b357f09 Avoid excessive stack operations for cpu query. 2017-10-10 23:21:30 +02:00
Bartosz Taudul
75457c1465 Remove +x flag from files. 2017-10-10 21:56:15 +02:00
Bartosz Taudul
a6c5993401 Fix locks with more than two threads. 2017-10-08 23:03:38 +02:00
Bartosz Taudul
45cb4b144f Add bit counter. 2017-10-08 21:02:09 +02:00
Bartosz Taudul
fbe7e59319 Allow zooming to zones without end. 2017-10-08 11:38:03 +02:00
Bartosz Taudul
42595014a1 Fix issue with missing lock display.
This was caused by a logic error concerning a lock state when thread t1
was waiting for a lock, thread t2 released the lock and thread t1 didn't
yet acquire a lock. High zoom level was needed.

(Threads are performing Wait, Obtain, Release operations on locks.)

t1     W      |O R
t2 WO        R|
--------------+----> t
              ↑
           Problem

In the region marked by the problem line the lock count was 0, which
didn't trigger the appropriate code branch.
2017-10-06 18:58:54 +02:00
Bartosz Taudul
34030bf3d4 Prevent crash when no locks to display. 2017-10-06 18:52:52 +02:00
Bartosz Taudul
02edbf54ff Return signed value from GetLastTime(). 2017-10-06 18:32:25 +02:00
Bartosz Taudul
9bc80941c7 Draw timer uncertainties on locks. 2017-10-06 18:25:30 +02:00
Bartosz Taudul
6488ba6e0f Display lock event location (if available). 2017-10-06 18:12:13 +02:00
Bartosz Taudul
71e16d069e Store lock mark locations. 2017-10-06 18:04:17 +02:00
Bartosz Taudul
cbf5ddece1 Don't wait for lock to be announced before processing events. 2017-10-06 17:09:15 +02:00
Bartosz Taudul
695b0426bf Lock mark processing skeleton. 2017-10-06 17:05:31 +02:00
Bartosz Taudul
21c1533d8b Highlight threads contending for a lock. 2017-10-06 02:19:25 +02:00
Bartosz Taudul
21bebc1695 Display lock subzone time. 2017-10-05 23:57:27 +02:00
Bartosz Taudul
b965a1c936 Show which threads are blocking/blocked. 2017-10-05 23:47:51 +02:00
Bartosz Taudul
182f6533f3 Fix detection of blocking lock before viewport start. 2017-10-05 23:40:08 +02:00
Bartosz Taudul
e572c655c1 Add tooltips for locks. 2017-10-05 23:35:21 +02:00
Bartosz Taudul
efb7f0a31c Show blocking locks.
A blocking lock is when a thread has lock, but other thread is waiting
for that lock.
2017-10-05 23:25:25 +02:00
Bartosz Taudul
9689d8014f Proper lock visualization. 2017-10-05 23:18:24 +02:00
Bartosz Taudul
78067eb35e Calculate lock wait counts. 2017-10-05 14:02:08 +02:00
Bartosz Taudul
2582f04977 Remove code leftovers. 2017-10-05 12:52:57 +02:00
Bartosz Taudul
4accd9ae8f There can be many locks with the same name, print id. 2017-10-05 02:46:35 +02:00
Bartosz Taudul
956bcb9b17 Save lock source location. 2017-10-04 21:38:25 +02:00
Bartosz Taudul
d93c4bc271 Very crude drawing of lock events. 2017-10-04 21:27:06 +02:00
Bartosz Taudul
486f0999a7 Save/load lock events. 2017-10-04 20:10:54 +02:00
Bartosz Taudul
87ae5eccde No need for id in LockMap. 2017-10-04 20:10:54 +02:00
Bartosz Taudul
a99fc01707 Store which threads access any given lock. 2017-10-04 19:57:06 +02:00
Bartosz Taudul
4c8e9f7d5d Track number of held locks. 2017-10-04 19:42:44 +02:00
Bartosz Taudul
39bb9a3ad1 Insert lock events into timeline. 2017-10-04 19:24:24 +02:00
Bartosz Taudul
9904ebb4b6 Lock time correction. 2017-10-04 19:24:06 +02:00
Bartosz Taudul
54735bacea Lock events dispatch. 2017-10-04 18:51:50 +02:00
Bartosz Taudul
110e5971d1 Store pending lock events, if lock was not yet announced. 2017-10-04 18:32:53 +02:00
Bartosz Taudul
c2bccf7126 Move towards proper data structures. 2017-10-04 18:32:53 +02:00
Bartosz Taudul
8c90eab044 Let's not worry about lock memory reuse. 2017-10-04 16:51:51 +02:00
Bartosz Taudul
0011573fa9 Send lock events. 2017-10-04 16:45:46 +02:00
Bartosz Taudul
78f8425dc7 Announce lock creation. 2017-10-04 16:16:40 +02:00
Bartosz Taudul
ff21b74e7a Add missing locks. 2017-10-04 16:07:20 +02:00
Bartosz Taudul
2f14704143 Save and load capture name. 2017-10-03 23:29:48 +02:00
Bartosz Taudul
b2252de9c8 Send and display program execution date. 2017-10-03 23:26:41 +02:00
Bartosz Taudul
7526ac83b5 Display program name in profiler window title. 2017-10-03 23:18:07 +02:00
Bartosz Taudul
d1edd30ca6 Zone ids are unnecessary. 2017-10-03 16:41:32 +02:00
Bartosz Taudul
3fcf39ec58 More dead code removal. 2017-10-03 16:26:58 +02:00
Bartosz Taudul
e61e2718cb Remove dead timeline reconstruction code.
Queue items from a single producer are always FIFO. There's no need to
account for an impossible use case.
2017-10-03 15:53:49 +02:00
Bartosz Taudul
f74a313d12 Fix thread spacing. 2017-10-01 20:37:35 +02:00
Bartosz Taudul
621b6a8c49 Don't clip text vertically. 2017-10-01 20:16:02 +02:00
Bartosz Taudul
65e89e6e80 Fix collapsed zones height. 2017-10-01 20:00:53 +02:00
Bartosz Taudul
4227d34599 Indicate zones with thread migration across CPU cores. 2017-10-01 19:58:53 +02:00
Bartosz Taudul
dc72010bd5 Increase separation of zones. 2017-10-01 19:47:22 +02:00
Bartosz Taudul
35562ed6e2 Make zone highlight color a derivative of zone color. 2017-10-01 19:38:45 +02:00
Bartosz Taudul
79073383b4 No transparency in zone colors. 2017-10-01 19:32:20 +02:00
Bartosz Taudul
7365461ef4 Add function to get zone color. 2017-10-01 19:31:22 +02:00
Bartosz Taudul
3dc4fc4796 Display CPU id in zone tooltips. 2017-10-01 19:21:25 +02:00
Bartosz Taudul
91fd171b60 Store CPU id in zones. 2017-10-01 19:17:29 +02:00
Bartosz Taudul
8f862b3271 Reserve memory for loaded data. 2017-10-01 01:54:40 +02:00
Bartosz Taudul
616f501a97 Set nullptrs where necessary. 2017-09-30 19:21:51 +02:00
Bartosz Taudul
fc8cd12088 Do not copy string map (DOH!). 2017-09-30 17:09:00 +02:00
Bartosz Taudul
f387a16e61 Count read zones. 2017-09-30 16:59:03 +02:00
Bartosz Taudul
06949e2f99 Reading saved trace. 2017-09-30 16:58:02 +02:00
Bartosz Taudul
f9ee2b853c Writing traces. 2017-09-30 16:20:08 +02:00
Bartosz Taudul
e4c5e5c097 Save trace file selector. 2017-09-30 14:56:23 +02:00
Bartosz Taudul
0de755124d Small cleanup. 2017-09-30 14:56:23 +02:00
Bartosz Taudul
d7bd8885fe Make zone highlight more visible. 2017-09-30 13:45:02 +02:00
Bartosz Taudul
077585ba4d Allow switching to zone parent. 2017-09-30 13:41:03 +02:00
Bartosz Taudul
e6a32c1af5 Add zoom-to-frame. 2017-09-29 23:08:10 +02:00
Bartosz Taudul
dd0c283a3b More condensed child zone time graph. 2017-09-29 22:59:11 +02:00
Bartosz Taudul
9864ef70c9 Show child zone info popups. 2017-09-29 22:57:22 +02:00
Bartosz Taudul
852e163b72 Use correct variable. 2017-09-29 22:56:12 +02:00
Bartosz Taudul
3ac65a7524 Separate tooltip showing function. 2017-09-29 22:55:24 +02:00
Bartosz Taudul
5dc5500065 Display child zone times graphically. 2017-09-29 22:50:25 +02:00
Bartosz Taudul
366da56d99 Add interaction with displayed child nodes. 2017-09-29 22:40:49 +02:00
Bartosz Taudul
2c0d4d2817 Display child zone times. 2017-09-29 22:40:45 +02:00
Bartosz Taudul
1cd86cb30f Display exclusive zone time. 2017-09-29 22:13:22 +02:00
Bartosz Taudul
d4d28e841a Display basic timing info. 2017-09-29 22:06:31 +02:00
Bartosz Taudul
fb80ac9488 Allow zooming to zone from zone info window. 2017-09-29 22:01:30 +02:00
Bartosz Taudul
b386e51edc Highlight selected zone. 2017-09-29 21:57:00 +02:00
Bartosz Taudul
c5f6ca9656 Add basic zone info window. 2017-09-29 21:49:14 +02:00
Bartosz Taudul
a8c219dd88 Display number of collapsed zones. 2017-09-29 19:13:53 +02:00
Bartosz Taudul
23c71116e3 Draw timer resolution uncertainty. 2017-09-29 18:55:21 +02:00
Bartosz Taudul
7a992517e1 Print queue delay and timer resolution. 2017-09-29 18:46:08 +02:00
Bartosz Taudul
3f9143d491 Double the TimeToString buffer pool. 2017-09-29 18:44:42 +02:00
Bartosz Taudul
28912ca2e6 Display delay caused by zone name and zone text events. 2017-09-29 18:40:55 +02:00
Bartosz Taudul
efda50acb1 Send timer resolution to server. 2017-09-29 18:32:07 +02:00
Bartosz Taudul
b9aa10913a Rename internal enum to avoid #define conflicts. 2017-09-28 21:20:33 +02:00
Bartosz Taudul
8ecb5de062 Store pointers to ThreadData.
This prevents moves of Vector<>.
2017-09-28 21:05:51 +02:00
Bartosz Taudul
2161c23eee Display custom zone names. 2017-09-28 19:31:27 +02:00
Bartosz Taudul
8c1c395cec Allow sending custom zone names. 2017-09-28 19:28:24 +02:00
Bartosz Taudul
91e6210e34 Store zone text data in a separate structure. 2017-09-28 19:06:39 +02:00
Bartosz Taudul
7f865f3517 Use common function to send server query. 2017-09-27 02:44:16 +02:00
Bartosz Taudul
e683a59360 Use color to display custom zone text. 2017-09-27 02:40:24 +02:00
Bartosz Taudul
c2926f2a0d Store custom strings as const char*, not std::string.
It would seem that std::string is not moved, but copied, thus
invalidating the pointer.
2017-09-27 02:36:14 +02:00
Bartosz Taudul
d65d957272 Display zone text. 2017-09-27 02:21:51 +02:00
Bartosz Taudul
d1bbb731fc Zone text (custom string) transfer. 2017-09-27 02:18:17 +02:00