Commit Graph

1656 Commits

Author SHA1 Message Date
Bartosz Taudul
a78981e040 Store on-demand frame offset. 2018-07-10 22:42:00 +02:00
Bartosz Taudul
6a9caabc63 Send on-demand initial payload message. 2018-07-10 22:37:39 +02:00
Bartosz Taudul
c056f3be41 Send keep alive messages to determine if client disconnected. 2018-07-10 21:39:17 +02:00
Bartosz Taudul
a5381337f6 Don't use obsolete function. 2018-07-10 20:49:29 +02:00
Bartosz Taudul
045f792e84 Keep one profiler window size for all captures. 2018-07-10 20:47:09 +02:00
Bartosz Taudul
c7952e4d4f Move "without profiling" to tooltip in zone info window. 2018-06-29 19:02:44 +02:00
Bartosz Taudul
4ae317109d Improve compare menu histogram tooltip. 2018-06-29 18:57:49 +02:00
Bartosz Taudul
b190a15ef6 Display numerical thread id in memory plot tooltip. 2018-06-29 18:54:19 +02:00
Bartosz Taudul
9329c761f6 Improve plot tooltips. 2018-06-29 18:52:28 +02:00
Bartosz Taudul
bcd2fc027d Improve lock tooltips. 2018-06-29 18:49:47 +02:00
Bartosz Taudul
a918d9a401 Improve compressed zones tooltips. 2018-06-29 18:47:33 +02:00
Bartosz Taudul
c8361205da Improve timeline tooltips. 2018-06-29 18:46:05 +02:00
Bartosz Taudul
8228f4131b Improve frame header tooltip. 2018-06-29 18:44:07 +02:00
Bartosz Taudul
c92d8cf7a3 Improve frame list tooltips. 2018-06-29 18:43:23 +02:00
Bartosz Taudul
201a40fb04 Improve readability of callstack tooltips. 2018-06-29 18:41:06 +02:00
Bartosz Taudul
400ee1c752 Improve readability of zone tooltips. 2018-06-29 18:39:20 +02:00
Bartosz Taudul
fbe0ad437e Remove "without profiling" entry from zone tooltip. 2018-06-29 18:36:58 +02:00
Bartosz Taudul
d01c14c2f3 Improve readability of compare menu. 2018-06-29 18:35:40 +02:00
Bartosz Taudul
91dd8f5d52 Improve readability of find zone menu. 2018-06-29 18:33:01 +02:00
Bartosz Taudul
8f4b09edc3 Improve zone info windows readability. 2018-06-29 18:27:34 +02:00
Bartosz Taudul
275a79e1c9 Display custom zone name in find zone results list. 2018-06-29 16:20:24 +02:00
Bartosz Taudul
ab18869ce6 Display custom zone name in zone tooltip. 2018-06-29 16:15:59 +02:00
Bartosz Taudul
09c38f17e6 Display custom zone name in zone info window. 2018-06-29 16:14:31 +02:00
Bartosz Taudul
cb100e261c Return custom zone names. 2018-06-29 16:12:40 +02:00
Bartosz Taudul
053284b1c7 Process custom free-form zone names. 2018-06-29 16:12:17 +02:00
Bartosz Taudul
865e8d8506 Extract zone name getting functionality. 2018-06-29 15:14:20 +02:00
Bartosz Taudul
2866cafda5 Adapt histogram height to font size. 2018-06-29 00:44:05 +02:00
Bartosz Taudul
f82e8aa98f Adapt plot height to font size. 2018-06-29 00:38:56 +02:00
Bartosz Taudul
cc196ff0a8 Adapt frames view to font size. 2018-06-29 00:35:44 +02:00
Bartosz Taudul
41e8648701 Adjust GPU zones to set time drift. 2018-06-28 01:12:25 +02:00
Bartosz Taudul
bab798c13c GPU context time drift storage. 2018-06-28 01:08:08 +02:00
Bartosz Taudul
0b9559c05b Retrieval of GPU context from GPU zone. 2018-06-28 01:07:21 +02:00
Bartosz Taudul
4a467b6d03 Remove GPU resync leftovers. 2018-06-28 00:48:23 +02:00
Bartosz Taudul
c3238a496d No need to check for frame function name match.
Firstly, the match is not necessarily possible (e.g. on Linux the source
location function names and callstack frame names are two completely
different things).

Secondly, the first current zone callstack frame (which is matched to
some callstack frame of previous zone) is the frame in which a zone was
captured, and it will already be present in the zone trace. The
callstack frame omission should be therefore unconditional.
2018-06-24 17:38:32 +02:00
Bartosz Taudul
d7a85983a5 Make callstack hash less shitty. 2018-06-24 17:30:54 +02:00
Bartosz Taudul
ab2945b988 Slab allocator is not thread safe. 2018-06-24 17:10:46 +02:00
Bartosz Taudul
77e139e900 Insert true call stack frames into zone trace. 2018-06-24 16:57:57 +02:00
Bartosz Taudul
b0aa13f4af Callstack getters are const. 2018-06-24 16:15:49 +02:00
Bartosz Taudul
fa62603c77 Move zone trace loop handler to a separate function. 2018-06-24 15:54:36 +02:00
Bartosz Taudul
858628918b Force inline AddCallstackPayload. 2018-06-24 15:28:09 +02:00
Bartosz Taudul
d78126e60f Improve callstack payload hashing speed. 2018-06-24 15:25:53 +02:00
Bartosz Taudul
17194cb591 Allow copying callstack frames name/file to clipboard. 2018-06-22 20:44:57 +02:00
Bartosz Taudul
b8f7a4daac Mention purple line indicating middle of timeline. 2018-06-22 20:34:08 +02:00
Bartosz Taudul
9c2aab733d Allow centering timeline on memory alloc/free time. 2018-06-22 20:32:38 +02:00
Bartosz Taudul
5f5fe7c6aa Add tip about centering timeline on message. 2018-06-22 20:23:56 +02:00
Bartosz Taudul
39eccd5b08 Extract "center view at time" function. 2018-06-22 20:21:02 +02:00
Bartosz Taudul
11cf650be6 Fix GPU queries ordering.
With multithreaded Vulkan rendering it is possible that GPU time queries
will be sent in a different order than the originating CPU queries were
made. This commit changes the in-order queue to a map of queries,
waiting to be resolved.
2018-06-22 16:37:54 +02:00
Bartosz Taudul
af0c64c888 Remove GPU resync support.
The whole concept is not really reliable. And it forces CPU to GPU sync,
which is bad.
2018-06-22 16:34:51 +02:00
Bartosz Taudul
cd5ca3e754 Don't use hash table to store 256 pointers. 2018-06-22 15:14:44 +02:00
Bartosz Taudul
55ddb64352 GPU context counter is now 8 bit. 2018-06-22 15:10:23 +02:00
Bartosz Taudul
d13fc2413f Highlight callstack button in zone info windows. 2018-06-22 02:24:36 +02:00
Bartosz Taudul
3a885bb8fd Support callstack collection for OpenGL GPU zones. 2018-06-22 02:13:35 +02:00
Bartosz Taudul
e5f673eaa0 Allow viewing callstack from gpu zone info window. 2018-06-22 01:58:25 +02:00
Bartosz Taudul
35dc2f796e Process GpuZoneBeginCallstack queue event. 2018-06-22 01:56:32 +02:00
Bartosz Taudul
4992ae6b39 Take callstack field in ZoneEvent into account in save/load. 2018-06-22 01:30:08 +02:00
Bartosz Taudul
e40c5068c9 Allow viewing callstack from zone info window. 2018-06-22 01:21:51 +02:00
Bartosz Taudul
5e01a8ead9 Process callstack queue event. 2018-06-22 01:15:49 +02:00
Bartosz Taudul
205a4e4ca2 Add callstack index to ZoneEvent. 2018-06-22 01:11:03 +02:00
Bartosz Taudul
978e168cbd Handle ZoneBeginCallstack queue event.
This is identical to ZoneBegin handling, but requires some additional
bookkeeping to account for the incoming callstack information.
2018-06-22 01:07:25 +02:00
Bartosz Taudul
3404d191f0 Fix non-unique child ids in memory window. 2018-06-22 00:10:00 +02:00
Bartosz Taudul
3f7ab10323 Don't show line number if it's 0. 2018-06-21 13:26:04 +02:00
Bartosz Taudul
973eab2b4a Fix typo. 2018-06-20 23:42:00 +02:00
Bartosz Taudul
2a618c90d5 Properly save compressed thread in GPU events. 2018-06-20 23:12:49 +02:00
Bartosz Taudul
cef972fe25 Remove parenthesis from callstack location. 2018-06-20 17:07:48 +02:00
Bartosz Taudul
7912807133 Wait for transfer of pending callback frames. 2018-06-20 14:57:48 +02:00
Bartosz Taudul
60395c85e0 Wait for pending callstacks. 2018-06-20 14:54:08 +02:00
Bartosz Taudul
e95ca3930d Make all allocation list alloc/free buttons clickable. 2018-06-20 14:50:07 +02:00
Bartosz Taudul
a9fa8f966b Fix "zone free" indentation in allocation list. 2018-06-20 14:44:24 +02:00
Bartosz Taudul
bc565e65d1 Better callstack info window layout. 2018-06-20 14:41:00 +02:00
Bartosz Taudul
0d509ea3a6 Add missing EndColumns() call. 2018-06-20 14:37:55 +02:00
Bartosz Taudul
be0a70a5c1 Highlight actively inspected callstack. 2018-06-20 13:49:23 +02:00
Bartosz Taudul
15ff98b64a Push detailed callstack to a separate window.
Only show function names (no source files or line numbers) in callstack
tooltip.
2018-06-20 13:23:08 +02:00
Bartosz Taudul
9a5329b97d Save and load callstack frames. 2018-06-20 01:59:25 +02:00
Bartosz Taudul
e56ee377f4 Fix off-by-one. 2018-06-20 01:54:27 +02:00
Bartosz Taudul
88b1955a5a Filename in callstack frame is not a persistent pointer. 2018-06-20 01:26:05 +02:00
Bartosz Taudul
56479b86fa Display frame details in callstack tooltip. 2018-06-20 01:19:10 +02:00
Bartosz Taudul
4000f27e15 Stack frame accessor. 2018-06-20 01:18:59 +02:00
Bartosz Taudul
0c0afa5ac7 Process callstack frames. 2018-06-20 01:07:09 +02:00
Bartosz Taudul
203744cdd9 Callstack frame queries. 2018-06-20 00:25:26 +02:00
Bartosz Taudul
4ba95145da Display raw callstack payload. 2018-06-19 22:19:33 +02:00
Bartosz Taudul
4eea85fdad Callstack payload accessor. 2018-06-19 22:19:20 +02:00
Bartosz Taudul
06f34052a5 Have to track callstacks of both alloc and free. 2018-06-19 22:08:47 +02:00
Bartosz Taudul
0de279005b Load saved callstack payload. 2018-06-19 22:05:15 +02:00
Bartosz Taudul
14b71e988b Properly skip memory event data. 2018-06-19 22:05:15 +02:00
Bartosz Taudul
4033d74479 Callstack payload index 0 is invalid. 2018-06-19 22:05:15 +02:00
Bartosz Taudul
b6e71dd909 Load memory event callstack index. 2018-06-19 21:51:06 +02:00
Bartosz Taudul
7c1333ce2f Save callstack payload. 2018-06-19 21:39:52 +02:00
Bartosz Taudul
2940230fcf Save callstack index in memory events. 2018-06-19 21:39:42 +02:00
Bartosz Taudul
e03493f082 Store callstack index as uint32_t. 2018-06-19 21:39:22 +02:00
Bartosz Taudul
77db91253b Assign callstack idx to memory event. 2018-06-19 21:34:36 +02:00
Bartosz Taudul
c28465aa7c Store unique callstack payloads. 2018-06-19 21:16:02 +02:00
Bartosz Taudul
87467a472c Add variable sized const array. 2018-06-19 21:16:02 +02:00
Bartosz Taudul
cbc9ede3ca No-op callstack payload handling. 2018-06-19 19:31:16 +02:00
Bartosz Taudul
6a63d09a49 Don't check for each type, if range check is possible. 2018-06-19 19:31:16 +02:00
Bartosz Taudul
e51eef3dcd Process memory events with callstack. 2018-06-19 18:52:45 +02:00
Bartosz Taudul
59dc55002b Callstack ptr in server data structures.
Will be probably reduced to 32-bit index later on.
2018-06-19 18:52:10 +02:00
Bartosz Taudul
021dd853b9 Differentiate Vulkan/OpenGL in options menu. 2018-06-18 01:08:56 +02:00
Bartosz Taudul
6e1ab9ae7a Display per-GPU-event threads. 2018-06-17 19:09:56 +02:00
Bartosz Taudul
bb0631585c Store thread id of GPU events. 2018-06-17 19:07:07 +02:00
Bartosz Taudul
cfd7ac3957 Map compressed thread id 0 to real thread id 0. 2018-06-17 19:03:06 +02:00
Bartosz Taudul
d5a4c693d8 Take GPU timestamp period into account. 2018-06-17 18:49:56 +02:00
Bartosz Taudul
f33584516b Fix yet another regression. 2018-06-17 18:37:38 +02:00
Bartosz Taudul
cc973a5091 Differentiate Vulkan and OpenGL contexts. 2018-06-17 18:33:05 +02:00
Bartosz Taudul
dcd6cac078 Save GPU timestamp period.
Bump file version to 0.3.2.
2018-06-17 18:27:42 +02:00
Bartosz Taudul
2be1d1d2b2 Use proper type. 2018-06-07 13:30:46 +02:00
Bartosz Taudul
6956aed769 Fix selecting last bin with log time in find zone. 2018-06-06 23:36:21 +02:00
Bartosz Taudul
b4ce0c281b Total time is also already known in compare view. 2018-06-06 23:17:13 +02:00
Bartosz Taudul
d49be792ba Cache bin containers in compare view. 2018-06-06 23:09:46 +02:00
Bartosz Taudul
da5d35c364 Cache bin containers in find zone. 2018-06-06 23:06:00 +02:00
Bartosz Taudul
2950f3c70c Total time is already known. 2018-06-06 23:00:18 +02:00
Bartosz Taudul
8a4d88f2b3 tmin and tmax don't change. 2018-06-06 23:00:03 +02:00
Bartosz Taudul
be8d3f47cd Use fast log10. 2018-06-06 01:59:31 +02:00
Bartosz Taudul
8696c81e7d Implement fast frexpf. 2018-06-06 01:59:31 +02:00
Bartosz Taudul
60b24249d3 Use explicit value for 1/log2(10). 2018-06-06 01:52:46 +02:00
Bartosz Taudul
39c1b20184 Don't care about previous values. 2018-06-06 01:23:49 +02:00
Bartosz Taudul
1c47e22eca Add log10f approximation.
Based on https://community.arm.com/tools/f/discussions/4292/cmsis-dsp-new-functionality-proposal/22621#22621
2018-06-06 01:23:29 +02:00
Bartosz Taudul
859bf01992 Support displaying self times in statistics view. 2018-06-06 00:47:16 +02:00
Bartosz Taudul
e5d35d443d Missing initializer. 2018-06-06 00:47:11 +02:00
Bartosz Taudul
b7930f67da Calculate total self time of zones. 2018-06-06 00:39:22 +02:00
Bartosz Taudul
785a30a68b Implement going to next/previous frame. 2018-06-02 22:27:35 +02:00
Bartosz Taudul
1cddf8436c ZoomToRange() already enables pause. 2018-06-02 22:09:07 +02:00
Bartosz Taudul
5a7304171d Fix allocation times displayed in plot tooltip. 2018-05-27 20:22:58 +02:00
Bartosz Taudul
8ed59c261b Open memory address info after clicking on mem plot item. 2018-05-27 20:17:20 +02:00
Bartosz Taudul
9898066a7a Display additional memory event info in mem plot tooltips. 2018-05-27 20:11:33 +02:00
Bartosz Taudul
3ea5fd93ed Simple and not so simple draw plot point functions. 2018-05-27 19:51:45 +02:00
Bartosz Taudul
0a79243332 Display thread from which message originated on msg list. 2018-05-25 21:14:15 +02:00
Bartosz Taudul
53aea660c8 Store thread id in MessageData. 2018-05-25 21:10:38 +02:00
Bartosz Taudul
bb0246730f Don't save MessageData padding.
This requires file version bump to 0.3.1.
2018-05-25 21:10:38 +02:00
Bartosz Taudul
8118e41559 Use columns to display message list. 2018-05-25 21:10:38 +02:00
Bartosz Taudul
312c20b0bc Fallback to pdqsort if parallel STL is not available. 2018-05-12 22:41:18 +02:00
Bartosz Taudul
920bfc8c82 Parallelize (big) sorts in worker. 2018-05-08 01:40:22 +02:00
Bartosz Taudul
dbc963d55c Drop template argument from std::lock_guard. 2018-05-08 01:25:16 +02:00
Bartosz Taudul
3768ed5dd7 Don't reconstruct mem plot if there's no mem event data. 2018-05-04 16:08:16 +02:00
Bartosz Taudul
e7ffe288e6 One less FileWrite::Write() call. 2018-05-04 15:11:19 +02:00
Bartosz Taudul
e058bb34c1 CompressThread body must be available. 2018-05-03 18:43:51 +02:00
Bartosz Taudul
a46d27f312 Parallelize file reading.
Use spin-locks for synchronization.

IsEOF() is now buggy, but the bug chance is fairly low (1/65536) - it
can happen when the last compressed block has exactly max decompressed
block size. Don't care about it much, as it's only used to open old
archives.
2018-05-03 17:56:43 +02:00
Bartosz Taudul
3d13ea09e8 Move block decompression to a separate function. 2018-05-03 17:29:58 +02:00
Bartosz Taudul
7d32ef8c8b Restrict mem events list size. 2018-05-02 19:40:35 +02:00
Bartosz Taudul
f2cb04ea8d Allow going back to the previous zone info. 2018-05-02 19:25:52 +02:00
Bartosz Taudul
1cc798cea3 Construct zone info stack. 2018-05-02 19:23:46 +02:00
Bartosz Taudul
e28022f735 Don't display alloc, free threads on two lines. 2018-05-02 19:07:34 +02:00
Bartosz Taudul
f2f712b8db Optional display of each mem event in zone info window. 2018-05-02 19:03:34 +02:00
Bartosz Taudul
dac6a65156 Infer total mem usage change from alloc and free changes. 2018-05-02 18:41:11 +02:00
Bartosz Taudul
14ca2198dd Force inline simple Vector ops. 2018-05-02 18:27:37 +02:00
Bartosz Taudul
bbf1e9f111 Only include memory events from zone thread. 2018-05-02 18:13:13 +02:00
Bartosz Taudul
4584ef9e88 Use memory events to calculate zone memory changes. 2018-05-02 18:06:27 +02:00
Bartosz Taudul
b18841aa75 Store ordered list of memory frees. 2018-05-02 17:59:50 +02:00
Bartosz Taudul
ce1f56ea0f Display zone memory statistics.
Note that this information is incorrect, as it accounts for memory
events in all threads.
2018-05-02 17:46:09 +02:00
Bartosz Taudul
fd59ac0125 Only calculate zone child data if child list is displayed. 2018-05-02 17:23:32 +02:00
Bartosz Taudul
754e79b443 Setup memory plot pointer on dump load. 2018-05-02 17:18:52 +02:00
Bartosz Taudul
1512f3584c Show appropriate message when there's no memory data collected. 2018-05-01 17:28:02 +02:00
Bartosz Taudul
e5934b409a Don't use Vector for memory pages storage.
Vector has POT data size and we know exactly how much is needed.
2018-05-01 17:26:34 +02:00
Bartosz Taudul
7266a979c3 Omit stack. 2018-05-01 02:13:49 +02:00
Bartosz Taudul
5deeb8426f Specialized Read function writing directly to registers. 2018-05-01 02:13:49 +02:00
Bartosz Taudul
8beb1c1a39 Add thread compression cache.
Observation: calls to CompressThread() are likely to be repeated with
the same value. Exploit that by storing last query and its result.
2018-05-01 01:29:25 +02:00
Bartosz Taudul
ec58aa4ce1 Don't increase vector size in each iteration. 2018-04-30 13:57:12 +02:00
Bartosz Taudul
e41ce5523c Allow explicit setting of vector size. 2018-04-30 13:56:58 +02:00
Bartosz Taudul
553e3ca38b Optimize mem plot reconstruction loop. 2018-04-30 13:45:36 +02:00
Bartosz Taudul
76f0c8fafe Sort source location zones on a separate thread. 2018-04-30 03:54:09 +02:00
Bartosz Taudul
63e4f6fa04 Directly store values. 2018-04-30 03:30:19 +02:00
Bartosz Taudul
8d854b1c8f Force inline flat_hash_map find. 2018-04-30 03:09:50 +02:00
Bartosz Taudul
a2d3ad35f0 Force inline common slab allocation paths. 2018-04-30 02:47:16 +02:00
Bartosz Taudul
b598300186 Split FileRead::Skip into small and big part. 2018-04-30 02:31:03 +02:00
Bartosz Taudul
b1a440647d Remove one level of indirection in FileWrite. 2018-04-30 02:29:05 +02:00
Bartosz Taudul
fd46651c32 Remove one level of indirection in FileRead. 2018-04-30 02:26:15 +02:00
Bartosz Taudul
4c521ce92a Loaded traces may be unloaded. 2018-04-30 01:16:08 +02:00
Bartosz Taudul
e5cb241c19 Optimize creation of vector of frees. 2018-04-29 13:40:47 +02:00
Bartosz Taudul
3eb73b8d43 Move memory plot reconstruction to a background thread. 2018-04-29 13:40:04 +02:00
Bartosz Taudul
a8ce01eeb1 Push next no space check variant. 2018-04-29 13:39:06 +02:00
Bartosz Taudul
bc84ebc338 Read/write LockEvent data in one go. 2018-04-29 03:41:58 +02:00
Bartosz Taudul
c5133e0b4e Walk lockmap timeline pointer. 2018-04-29 03:41:58 +02:00
Bartosz Taudul
9769cc4d7d Read/write most of MemEvent in one go. 2018-04-29 03:41:58 +02:00
Bartosz Taudul
d5f0f0939d No need to track min memory usage.
At least if client instrumentation was not broken and the data makes
sense.
2018-04-29 02:57:20 +02:00
Bartosz Taudul
7fdc6f5453 Zero as initial max value is fine too. 2018-04-29 02:56:23 +02:00
Bartosz Taudul
723f98d24b Overflow checks are not needed. 2018-04-29 02:47:25 +02:00
Bartosz Taudul
b06f445de9 Don't use stack to write two values... 2018-04-29 02:32:20 +02:00
Bartosz Taudul
333d3a92c8 Perform memory usage calculation on doubles. 2018-04-29 02:29:06 +02:00
Bartosz Taudul
aceaed25b9 Walk plot data pointer. 2018-04-29 02:11:47 +02:00
Bartosz Taudul
868fbace5a Don't compress thread twice, if it's the same. 2018-04-29 02:04:51 +02:00
Bartosz Taudul
fdaebc2bd8 No need to perform space check here. 2018-04-29 01:38:54 +02:00
Bartosz Taudul
dc1396012e Add assert checking that there's space. 2018-04-29 01:38:35 +02:00
Bartosz Taudul
d64f0390da Don't use std::sort. 2018-04-29 01:23:30 +02:00
Bartosz Taudul
925b6c2617 Display y-range of plots. 2018-04-28 16:44:36 +02:00
Bartosz Taudul
7df7bf1745 Begin memory plot with no memory usage. 2018-04-28 16:26:45 +02:00
Bartosz Taudul
a0b8ed2e50 Restore memory plot when loading data dump. 2018-04-28 16:26:45 +02:00
Bartosz Taudul
afa432a087 Non-user plots must have predefined names. 2018-04-28 16:26:45 +02:00
Bartosz Taudul
d8bfe7de2e Create memory plot based on memory alloc/free events. 2018-04-28 15:49:12 +02:00
Bartosz Taudul
cd34ed6968 Two plot types: user and memory.
Only user plots are saved in a dump file.
2018-04-28 15:48:05 +02:00
Bartosz Taudul
2a427ba87a Fix typo. 2018-04-22 02:24:34 +02:00
Bartosz Taudul
ecabf24c4e Optional normalization of compared data. 2018-04-22 02:19:22 +02:00
Bartosz Taudul
d06890b55d Add missing tree pop. 2018-04-22 01:28:55 +02:00
Bartosz Taudul
1fb47899b2 Fix skipping lock data with new dump version. 2018-04-22 01:26:51 +02:00
Bartosz Taudul
470bfb5c02 Don't load unneeded data. 2018-04-22 01:00:17 +02:00
Bartosz Taudul
41738469f1 Add trace compare window. 2018-04-22 00:52:33 +02:00
Bartosz Taudul
436cd2b6cf Drop '###Profiler' from capture name. 2018-04-21 23:29:28 +02:00
Bartosz Taudul
28380f2d25 Move bad version dialogs to a separate file. 2018-04-21 23:19:48 +02:00
Bartosz Taudul
ea2be1bce9 Fix custom ImVec2 operators. 2018-04-21 23:19:13 +02:00
Bartosz Taudul
1d044b494b Don't enforce main window buttons width. 2018-04-21 22:42:32 +02:00
Bartosz Taudul
880eb7cbdd Don't display zone names in find zone menu zones list. 2018-04-21 22:34:19 +02:00
Bartosz Taudul
2ef9fe0743 Enable log time in find zone menu by default. 2018-04-21 22:21:15 +02:00
Bartosz Taudul
d1e185e176 Cleanup message data. 2018-04-21 20:36:33 +02:00
Bartosz Taudul
4cd9cf5dd9 Cleanup zone data. 2018-04-21 20:34:29 +02:00
Bartosz Taudul
0de5bcacaf Free plot data. 2018-04-21 20:12:16 +02:00
Bartosz Taudul
dda25cf66a Cosmetics. 2018-04-21 20:11:59 +02:00
Bartosz Taudul
adf8a126c6 More space for text on main window buttons. 2018-04-21 19:30:49 +02:00
Bartosz Taudul
a4e1bb05f3 Use proper format strings. 2018-04-21 19:26:55 +02:00
Bartosz Taudul
ade97b7ab6 Add hours to time-to-string conversion. 2018-04-21 17:01:10 +02:00
Bartosz Taudul
ad91b9b002 Expand maximum view span from 1 minute to 1 hour. 2018-04-21 16:53:17 +02:00
Bartosz Taudul
cb298893e7 Fix skipping lock data. 2018-04-21 16:02:36 +02:00
Bartosz Taudul
121cced681 Don't save unneeded lock data.
Store only the minimal lock information required and calculate lock
counts, wait lists, etc. at load time.
2018-04-21 15:42:08 +02:00
Bartosz Taudul
764792d8db Try to not crash when opening invalid files.
Tracy will now perform a number of checks when trying to read a dump
file:
1. The file must have at least 4 bytes of data.
2. There should be a 4 byte header to indicate the file was saved by
   tracy. This is a breaking change in file format.
3. Old header-less files are still supported, but there's a new check
   for data validity. The first 4 bytes of file (as an uint32) must be
   less or equal to max LZ4 data packet size. This requires the first
   two bytes to be 00 00 or 00 01, which should catch most invalid
   files.
2018-04-21 14:53:40 +02:00
Bartosz Taudul
a63f214964 Use static assert where static assert is due. 2018-04-21 14:47:15 +02:00
Bartosz Taudul
36efe96e9d Throw exception when trying to open unsupported dump version. 2018-04-21 14:18:42 +02:00
Bartosz Taudul
3793a37b2b Use small buttons in statistics window. 2018-04-21 14:17:42 +02:00
Bartosz Taudul
d9fd1ce74a Add dump file header. 2018-04-21 13:45:48 +02:00
Bartosz Taudul
6c2d7628ee Don't draw off-screen gpu zones. 2018-04-20 23:28:19 +02:00
Bartosz Taudul
a2779eccaf Don't draw off-screen zones. 2018-04-20 23:19:04 +02:00
Bartosz Taudul
9fc14d2faf Don't draw off-screen plots. 2018-04-20 23:00:26 +02:00
Bartosz Taudul
cd7a1cffe8 Don't draw off-screen locks. 2018-04-20 22:53:31 +02:00
Bartosz Taudul
723fad84a7 Don't draw off-screen zone timeline labels. 2018-04-20 22:45:29 +02:00
Bartosz Taudul
84fd351fba Allow partial load of data from dump. 2018-04-20 16:03:09 +02:00
Bartosz Taudul
cc65e52663 Allow skipping data when reading file. 2018-04-20 14:27:20 +02:00
Bartosz Taudul
6120b3e922 Change -1 comparisons to "0" comparisons. 2018-04-14 16:50:04 +02:00
Bartosz Taudul
d0d5528e99 Disable histogram highlight using right mouse button. 2018-04-14 15:21:22 +02:00
Bartosz Taudul
3df7c70f99 Optimize mem alloc processing. 2018-04-10 16:06:01 +02:00
Bartosz Taudul
be50fb26b5 Remove useless assert. 2018-04-10 14:37:17 +02:00
Bartosz Taudul
fd41b4927a Allow selecting/unselecting all locks for display. 2018-04-09 16:15:40 +02:00
Bartosz Taudul
4e1dbb3973 Fix lock announce processing. 2018-04-09 14:28:40 +02:00
Bartosz Taudul
d4bfbc2797 Allow displaying global statistics of a zone. 2018-04-05 19:31:04 +02:00
Bartosz Taudul
093787b3e8 Move find zone setup to a dedicated function. 2018-04-05 19:30:32 +02:00
Bartosz Taudul
0f95d7fd21 Use lookup table to get memory decay color. 2018-04-05 12:14:26 +02:00
Bartosz Taudul
bb299a5074 Desaturate older allocations on memory map. 2018-04-03 20:38:50 +02:00
Bartosz Taudul
189a4a2e32 Page chunk mask is not needed anymore. 2018-04-03 19:41:11 +02:00
Bartosz Taudul
1182a3fcb8 Stop processing allocations if already at time end. 2018-04-03 19:40:06 +02:00
Bartosz Taudul
b78dc70b70 No need to split address into page and chunk. 2018-04-03 19:39:19 +02:00
Bartosz Taudul
22bd2923eb Keep mem.low in a register. 2018-04-03 19:35:43 +02:00
Bartosz Taudul
a3dd90529c Rearrange memory reads. 2018-04-03 19:35:28 +02:00
Bartosz Taudul
197e513727 Add a separate time restriction code path. 2018-04-03 19:34:48 +02:00
Bartosz Taudul
f0573d68bd Store memory pages in a contiguous memory area. 2018-04-03 19:17:32 +02:00
Bartosz Taudul
5ce3e44c77 Calculate chunks in one place in code. 2018-04-03 18:27:50 +02:00
Bartosz Taudul
bf99bff87d Store MemEvents directly in the vector. 2018-04-03 14:17:51 +02:00
Bartosz Taudul
bc27c99a1e Move page init to a non-inlined function. 2018-04-03 13:30:56 +02:00
Bartosz Taudul
6d40502068 Execute direct write to memory, if only one byte. 2018-04-03 13:23:53 +02:00
Bartosz Taudul
81c84025a2 Fix calculation of lines. 2018-04-02 20:11:55 +02:00
Bartosz Taudul
1bb1cf9e6c Display memory map information. 2018-04-02 20:00:05 +02:00
Bartosz Taudul
78ebf37039 Use proper values for page map calculation. 2018-04-02 19:57:46 +02:00
Bartosz Taudul
a2a6386491 Allow time restricting memory map. 2018-04-02 18:57:24 +02:00
Bartosz Taudul
1c441824fd Display memory map. 2018-04-02 18:51:32 +02:00
Bartosz Taudul
78cd86dd69 Memory pages bitmap calculation. 2018-04-02 18:51:32 +02:00
Bartosz Taudul
bf249de266 Display memory usage by active allocations. 2018-04-02 16:30:03 +02:00
Bartosz Taudul
670744f852 Move alloc cutoff to middle of timeline. 2018-04-02 16:21:24 +02:00
Bartosz Taudul
7b194d2349 Don't use std::sort. 2018-04-02 16:09:44 +02:00
Bartosz Taudul
e80891e36d Allow restricting displayed allocs by time. 2018-04-02 16:07:33 +02:00
Bartosz Taudul
c1aaec32d6 Sort active allocations by appearance time. 2018-04-02 15:45:11 +02:00
Bartosz Taudul
38edf308fa Display memory span. 2018-04-02 14:58:40 +02:00
Bartosz Taudul
821b08fbe4 Thread compression state is not preserved. 2018-04-02 14:52:36 +02:00
Bartosz Taudul
aa8980aacc Put memory allocations list into a child area. 2018-04-02 14:44:45 +02:00
Bartosz Taudul
8cc446b578 Highlight zones with opened zone info window. 2018-04-02 14:38:08 +02:00
Bartosz Taudul
50eb5c4b84 Highlight same zone alloc+free. 2018-04-02 14:36:07 +02:00
Bartosz Taudul
f7ce3e795f Display zone if which allocation was freed. 2018-04-02 14:29:56 +02:00
Bartosz Taudul
e1682c7675 Draw active allocations list. 2018-04-02 02:39:12 +02:00
Bartosz Taudul
c4a36398f6 Move memory allocations table drawing to a separate function. 2018-04-02 02:39:12 +02:00
Bartosz Taudul
1fa943d109 Save/load memory data. 2018-04-02 02:05:39 +02:00
Bartosz Taudul
68acc30bdd Add support for determining FileRead EOF. 2018-04-02 02:05:39 +02:00
Bartosz Taudul
5824b47a66 Display memory usage. 2018-04-02 00:02:45 +02:00
Bartosz Taudul
52f59c90bf Track memory usage. 2018-04-02 00:00:49 +02:00
Bartosz Taudul
e3509b6eee Display total number of allocations. 2018-04-01 23:57:18 +02:00
Bartosz Taudul
8efc0a0a71 Display proper hex value. 2018-04-01 22:00:57 +02:00
Bartosz Taudul
3f7abd478e Display zone in which memory allocation took place. 2018-04-01 21:50:35 +02:00
Bartosz Taudul
912cfdbc5e Search for zone present in given thread at given time. 2018-04-01 21:47:08 +02:00
Bartosz Taudul
20824a200c Implement search for memory address. 2018-04-01 21:24:30 +02:00
Bartosz Taudul
c686b86464 Add rudimentary memory information window. 2018-04-01 20:34:58 +02:00
Bartosz Taudul
2d00d95743 Missing initializer. 2018-04-01 20:34:58 +02:00
Bartosz Taudul
cd3bba8063 Memory data accessor. 2018-04-01 20:34:58 +02:00
Bartosz Taudul
a574f98f0c Memory events are now serialized. 2018-04-01 20:13:01 +02:00
Bartosz Taudul
16a98c8c17 Move benaphore to common directory. 2018-04-01 18:59:55 +02:00
Bartosz Taudul
b12375815c Broken memory events processing. 2018-04-01 02:03:34 +02:00
Bartosz Taudul
991fc6bd95 Memory allocations tracker. 2018-03-31 21:56:05 +02:00
Bartosz Taudul
c7a5e25c87 Display parent times. 2018-03-28 19:35:33 +02:00
Bartosz Taudul
9d798789a9 Fix broken behavior on duplicate names in zone info window. 2018-03-28 01:57:53 +02:00
Bartosz Taudul
d6bf19a762 Standard zone list behavior in zone trace. 2018-03-28 01:53:59 +02:00
Bartosz Taudul
bf52b3bc98 Add zone trace. 2018-03-28 01:47:28 +02:00
Bartosz Taudul
4d0396fa06 No auto-expand of child zones. 2018-03-28 01:47:20 +02:00
Bartosz Taudul
aebbefde2a Rename exclusive time to self time. 2018-03-28 01:47:08 +02:00
Bartosz Taudul
f6d4728494 Move child zones into an expandable tree. 2018-03-28 01:34:12 +02:00
Bartosz Taudul
871633cbaf Adapt button size to font size. 2018-03-25 00:10:31 +01:00
Bartosz Taudul
3567089278 Provide default size for main profiler window.
This prevents a crash when loading saved trace with plot.
2018-03-24 22:07:41 +01:00
Bartosz Taudul
1219b72577 Check if match table has content. 2018-03-24 17:32:27 +01:00
Bartosz Taudul
d559da932f Highlight source location displayed in find zone window. 2018-03-24 17:29:25 +01:00
Bartosz Taudul
ae274d8e37 Different ways of sorting of statistics data. 2018-03-24 17:28:10 +01:00
Bartosz Taudul
b65824d116 Show source location details when one is selected. 2018-03-24 15:20:39 +01:00
Bartosz Taudul
3012817da4 Source location statistics. 2018-03-24 15:16:43 +01:00
Bartosz Taudul
27c66c3765 Remove unused variable. 2018-03-24 15:04:44 +01:00
Bartosz Taudul
aa9d9575e0 Allow raw access to source location zones data. 2018-03-24 14:48:52 +01:00
Bartosz Taudul
cb4c1dac24 Don't show pause/resume button if data is static. 2018-03-24 14:45:01 +01:00
Bartosz Taudul
d8ac7dee83 Expose worker data state (static/dynamic). 2018-03-24 14:43:57 +01:00
Bartosz Taudul
225423bd21 Cosmetics. 2018-03-24 14:42:48 +01:00
Bartosz Taudul
3a49e9a4be Statistics window shell. 2018-03-24 14:40:48 +01:00
Bartosz Taudul
a9e1a9bddb Calculate total time spent in source location.
This simple solution doesn't handle recursion at all.
2018-03-24 14:24:30 +01:00
Bartosz Taudul
40a14292b3 Matched source locations and histogram default to open. 2018-03-24 02:45:24 +01:00
Bartosz Taudul
fea0234a60 Change zone end "-1" comparisons to "0" comparisons. 2018-03-24 02:00:20 +01:00
Bartosz Taudul
6a4e58b545 Force inline compress/decompress thread id. 2018-03-24 01:31:58 +01:00
Bartosz Taudul
c0577fd5b2 Unordered map is no longer used. 2018-03-23 21:18:52 +01:00
Bartosz Taudul
f4b88b9c05 Use flat hash map for reverse plot lookup. 2018-03-23 21:18:00 +01:00
Bartosz Taudul
6cb2fec48e Use flat hash map for string map. 2018-03-23 21:12:29 +01:00
Bartosz Taudul
69b49f527d Inline GetZoneEndDirect(). 2018-03-23 02:06:44 +01:00
Bartosz Taudul
910ce8b8ef Display number of matched source locations. 2018-03-20 20:18:23 +01:00
Bartosz Taudul
6e6addfa81 Use pdqsort. 2018-03-20 19:19:07 +01:00
Bartosz Taudul
ae55360a6d Don't sort zones if statistics are disabled. 2018-03-20 19:12:42 +01:00
Bartosz Taudul
4837ce31ff Allow sorting zone groups by count. 2018-03-20 17:19:48 +01:00
Bartosz Taudul
64f3c55ba5 Display zone group time. 2018-03-20 16:56:11 +01:00
Bartosz Taudul
e6d5f3f5fc Store common variables in registers to prevent aliasing. 2018-03-20 16:49:29 +01:00
Bartosz Taudul
d8f7903a97 Use flat hash map for ptr mapping during data load. 2018-03-20 15:44:13 +01:00
Bartosz Taudul
720e5a0468 First check if valid, then search in map. 2018-03-20 15:41:06 +01:00
Bartosz Taudul
fe6c753f12 Store lock thread map in flat hash map. 2018-03-20 15:40:25 +01:00
Bartosz Taudul
765a1ececf Move nohash<> from TracyWorker to flat hash map. 2018-03-20 15:40:11 +01:00
Bartosz Taudul
37808ec4c7 Fix the horribly inefficient Visible() and ShowFull() methods. 2018-03-20 15:33:38 +01:00
Bartosz Taudul
ceeae3c2cf Restore ordering of source location zones after load. 2018-03-20 14:56:42 +01:00
Bartosz Taudul
ad37f0857b Highlight selected zone group on histogram. 2018-03-20 14:37:58 +01:00
Bartosz Taudul
64e05e4726 Put found zones list into a subchild. 2018-03-20 12:56:26 +01:00
Bartosz Taudul
ce3f0bd596 Add separator to zone tooltips. 2018-03-19 16:14:01 +01:00
Bartosz Taudul
d5e0858982 Display thread in GPU zone tooltip. 2018-03-19 16:13:12 +01:00
Bartosz Taudul
4d34ccc30c Unify zone info window thread retrieval. 2018-03-19 16:11:44 +01:00
Bartosz Taudul
0f6ec65b65 GPU zone thread getter. 2018-03-19 16:11:37 +01:00
Bartosz Taudul
5a32cd7984 Show zone thread in zone info popup. 2018-03-19 16:08:50 +01:00
Bartosz Taudul
0d831e452b Add ability to group zones by user text. 2018-03-19 16:01:36 +01:00
Bartosz Taudul
05eb4b7ebc Don't use memcpy to terminate string. 2018-03-19 15:41:28 +01:00
Bartosz Taudul
1fbe1621e7 Display zone exclusive time as progress bar. 2018-03-19 02:30:40 +01:00
Bartosz Taudul
3b34ebf544 Unify GPU info window child selection with the rest of lists. 2018-03-19 02:25:24 +01:00
Bartosz Taudul
efe3eda845 Display thread in zone info windows. 2018-03-19 02:22:08 +01:00
Bartosz Taudul
2eece7c1f3 Reorder instructions. 2018-03-18 23:46:34 +01:00
Bartosz Taudul
ce2bf7c207 Use Vector instead of std::vector for thread zone list. 2018-03-18 21:15:31 +01:00
Bartosz Taudul
8dabe47602 Stop processing new zones on invalid time span.
When processing will resume in the next frame, the zone will hopefully
have a proper end time.
2018-03-18 21:06:26 +01:00
Bartosz Taudul
8b3e53bfad Don't ignore first thread. 2018-03-18 20:53:31 +01:00
Bartosz Taudul
d0519499f4 Store thread id next to zone ptr in source location zone list. 2018-03-18 20:45:49 +01:00
Bartosz Taudul
777d672e05 Thread id compression/decompression. 2018-03-18 20:45:22 +01:00
Bartosz Taudul
40c6f01a41 Perform search after condition was verified, not before. 2018-03-18 20:25:00 +01:00
Bartosz Taudul
3ac98beb5a Use precalculated min/max time spans. 2018-03-18 20:20:24 +01:00
Bartosz Taudul
0f1f7c6813 Calculate min/max time spans for source locations. 2018-03-18 20:15:45 +01:00
Bartosz Taudul
43c3fe25ba Put source location zone data into a struct. 2018-03-18 20:08:57 +01:00
Bartosz Taudul
f5b0f34827 Using std::vector instead of Vector is no longer possible. 2018-03-18 19:56:53 +01:00
Bartosz Taudul
77fa8f54a6 Restore per-thread zone list functionality. 2018-03-18 16:41:58 +01:00
Bartosz Taudul
d08c10c5b6 Add functionality for getting zone thread. 2018-03-18 16:38:42 +01:00
Bartosz Taudul
616269e849 Display zone counts in matched source locations. 2018-03-18 16:11:08 +01:00
Bartosz Taudul
af3559afed Only display results for a single source location match. 2018-03-18 16:07:07 +01:00
Bartosz Taudul
7a4e7cbf86 Reduce data collection if TRACY_NO_STATISTICS is defined.
Statistical data collection is only useful if it's meant to be used.
Otherwise it only incurs CPU and memory cost.
2018-03-18 12:55:54 +01:00
Bartosz Taudul
4baea4a74f Don't hash source location zones keys. 2018-03-18 03:25:14 +01:00
Bartosz Taudul
67774698af Only use direct zone end time for find zone data.
This prevents temporary timing artifacts from affecting histogram graph.
Previously the graph would flicker, because some shorter than usual
timing data was reported and the graph tried to compensate for a single
frame when such data was present.
2018-03-18 02:53:41 +01:00
Bartosz Taudul
e6b3f373c5 Add direct zone end getter. 2018-03-18 02:53:00 +01:00
Bartosz Taudul
746df21ad9 Live updates of find zone data.
TODO: found zones list. Currently only histogram view is available.
2018-03-18 02:43:17 +01:00
Bartosz Taudul
c807b3f7ef Getter for source location zones. 2018-03-18 02:35:39 +01:00
Bartosz Taudul
9830fa297e Store per-source-location zone lists. 2018-03-18 02:05:33 +01:00
Bartosz Taudul
c5c81a73bc Skip initialization of StringIdx.
That memory will be loaded from file.
2018-03-17 14:43:02 +01:00
Bartosz Taudul
a4d46219df File read buffer doesn't need to be preserved. 2018-03-17 14:22:36 +01:00
Bartosz Taudul
41d8ca0814 Split read/write functions into small and big variants. 2018-03-17 13:57:32 +01:00
Bartosz Taudul
79418d0c57 Move locks, zones, etc in options menu out of view. 2018-03-15 23:33:05 +01:00
Bartosz Taudul
81ff554c7d Don't call ReadTimeline() when there's nothing to read. 2018-03-15 22:54:10 +01:00
Bartosz Taudul
9dfa9c95cb Read and write whole ZoneEvent/GpuEvent data at once. 2018-03-15 21:59:16 +01:00
Bartosz Taudul
e5796af196 More efficient vector filling. 2018-03-15 21:42:00 +01:00
Bartosz Taudul
c510c9705b No need to check for reserved space. 2018-03-15 21:32:06 +01:00
Bartosz Taudul
b7ba64a223 Microoptimize ReadTimeline(). 2018-03-15 21:27:36 +01:00
Bartosz Szreder
124170b804 Fix compile warnings. 2018-03-14 00:30:57 +01:00
Bartosz Taudul
a14ff62e64 Decrease minimum spacing between tick labels on linear histogram. 2018-03-05 20:33:04 +01:00
Bartosz Taudul
f361d7484d Put selection information next to each other. 2018-03-05 20:30:21 +01:00
Bartosz Taudul
f39d4c415d Count time spent in histogram selection. 2018-03-05 20:23:58 +01:00
Bartosz Taudul
e9e3e46ea2 Display time instead of counts in cumulate time mode. 2018-03-05 20:19:05 +01:00
Bartosz Taudul
f733758652 Time accumulation histogram mode. 2018-03-05 20:15:18 +01:00
Bartosz Taudul
4005f22ecf Clear selection only on right mouse click. Add tooltip. 2018-03-05 20:05:20 +01:00
Bartosz Taudul
3e931432cf Don't calculate logarithms more than once. 2018-03-05 13:20:24 +01:00
Bartosz Taudul
68f652c40f Put total time and max counts on the same line. 2018-03-04 23:25:33 +01:00
Bartosz Taudul
3a8c976285 Clear histogram range selection by right mouse click. 2018-03-04 23:20:35 +01:00
Bartosz Taudul
f510d8d2e7 Update item counts in thread list. 2018-03-04 23:17:36 +01:00
Bartosz Taudul
3dd14c9e01 Filter found zones according to selection. 2018-03-04 23:07:38 +01:00
Bartosz Taudul
f42d8cee38 Selection of time range on histogram. 2018-03-04 22:52:36 +01:00
Bartosz Taudul
dee7fd27be Move mouse highlight data to a separate struct. 2018-03-04 22:21:35 +01:00
Bartosz Taudul
f7829a7eae Store matches in a map. 2018-03-04 22:11:50 +01:00
Bartosz Taudul
754279d6f1 Allow narrowing down search results by source location. 2018-03-04 21:17:38 +01:00
Bartosz Taudul
2c508c1f79 Display list of matched source locations in search window. 2018-03-04 21:10:10 +01:00
Bartosz Taudul
5c1aec723d Fix thread name clashes in ImGui. 2018-03-04 18:52:32 +01:00
Bartosz Taudul
fa46445537 Add label to separate found zones from rest of find dialog. 2018-03-04 18:44:33 +01:00
Bartosz Taudul
a34bb97d78 Unify zone children and find zone list behavior. 2018-03-04 18:42:18 +01:00
Bartosz Taudul
f44e9bbd7b Make zone info child list "selectable". 2018-03-04 18:40:32 +01:00
Bartosz Taudul
a7e7f59f96 Zoom-to-zone on middle click on found item. 2018-03-04 18:35:40 +01:00
Bartosz Taudul
5cb917e868 No nonsense union. 2018-03-04 17:52:51 +01:00
Bartosz Taudul
5afdccfc46 Properly initialize data.
Unused bitbield bits and inactive string index/reference had thrash
values in release builds, which prevented de-duplication of source
location payloads.
2018-03-04 17:47:26 +01:00
Bartosz Taudul
e9395cd988 Reconstruct source location payload map on data load. 2018-03-04 17:22:34 +01:00
Bartosz Taudul
a374114358 Use proper encoding of source location. 2018-03-04 17:17:37 +01:00
Bartosz Taudul
9170cfd943 First entry in sourceLocationExpand is special. 2018-03-04 16:57:57 +01:00
Bartosz Taudul
80da271a2c Don't match source location on a per-zone basis. 2018-03-04 16:53:13 +01:00
Bartosz Taudul
b48602f5d1 Implement search for matching source locations. 2018-03-04 16:52:45 +01:00
Bartosz Taudul
f8c5f28372 Use Vector for source location expand storage. 2018-03-04 16:32:51 +01:00
Bartosz Taudul
f99c6eec78 Simplify code. 2018-03-04 16:23:28 +01:00
Bartosz Taudul
b09bae07c4 Change default find parameters to unlimited. 2018-03-04 16:07:10 +01:00
Bartosz Taudul
87cfd98b69 No need for fractional time part on graph ticks. 2018-02-28 15:38:32 +01:00
Bartosz Taudul
2891ecc526 Logarithmic scale histogram ticks. 2018-02-28 15:20:52 +01:00
Bartosz Szreder
0fb35b42f8 Merged in bartosz_szreder/tracy (pull request #3)
Split data handling code from the view.
2018-02-23 14:12:01 +00:00
Bartosz Szreder
3b9639a9de Tweak included header files in View and Worker. 2018-02-23 15:08:20 +01:00
Bartosz Taudul
6406df6f45 Display total time. 2018-02-22 12:44:55 +01:00
Bartosz Taudul
ffb28a3d0d More concise time range display. 2018-02-22 12:38:43 +01:00
Bartosz Szreder
bae1c02ad0 Worker thread will take care of itself. 2018-02-21 16:41:37 +01:00
Bartosz Szreder
9e3f18a62a Split data handling code from the view. 2018-02-21 16:41:37 +01:00
Bartosz Taudul
fbaf59c9a6 Ignore zero-time zones in search. 2018-02-21 15:25:28 +01:00
Bartosz Taudul
785ab2927b Calculate proper label offsets. 2018-02-21 15:18:30 +01:00
Bartosz Taudul
d9988c8a06 Histogram time labels prototype. 2018-02-20 16:01:33 +01:00
Bartosz Taudul
118d4b497f Time Stamp Counter to time conversion function. 2018-02-20 12:40:12 +01:00
Bartosz Taudul
6a65ceb71a Display maximum number of counts in bins. 2018-02-16 16:19:31 +01:00
Bartosz Taudul
4611bc355f Optional log time scale in histogram. 2018-02-16 15:34:22 +01:00
Bartosz Taudul
6e8bb9e490 Display bin times. 2018-02-16 14:42:16 +01:00
Bartosz Taudul
f6cc360c69 Basic histogram introspection. 2018-02-16 14:31:57 +01:00
Bartosz Taudul
fbe1af80b5 Cosmetics. 2018-02-16 14:31:53 +01:00
Bartosz Taudul
9678cc8afc Support logarithmic scaling of values on search histogram. 2018-02-16 13:28:40 +01:00
Bartosz Taudul
508b699252 Fix crash. 2018-02-16 13:09:24 +01:00
Bartosz Taudul
5bc145f719 Search results histogram. 2018-02-15 17:25:16 +01:00
Bartosz Taudul
ea4863d4bd Fix help strings. 2018-02-15 16:32:36 +01:00
Bartosz Taudul
e20bb2fe66 Add separators to zone count. 2018-02-15 16:31:47 +01:00
Bartosz Taudul
cc38988045 Cleanup. 2018-02-15 16:24:01 +01:00
Bartosz Taudul
d1d54db7b6 Display number of found zones. 2018-02-15 16:17:16 +01:00
Bartosz Szreder
d5fe006e2d Add missing include charutil::hash() 2018-02-12 19:07:55 +01:00
Kamil Klimek
cb08990eff "Find Zone" feature
- Simple text search with some limiting options
 - Grouping by threads
 - Easy access to "Zone Info" from search results
2018-01-18 12:35:30 +01:00
Bartosz Taudul
961a907e09 Remove obsolete window flag. 2018-01-13 13:56:02 +01:00
Bartosz Taudul
5915683587 Shared lockable tooltips. 2017-12-17 19:40:45 +01:00
Bartosz Taudul
d0d3bb1141 Store shared lock bits only for shared locks. 2017-12-17 18:44:31 +01:00
Bartosz Taudul
b3b8088881 Separate processing of Lockable and SharedLockable. 2017-12-17 18:00:15 +01:00
Bartosz Taudul
6f1a99e270 Combine wait lists. 2017-12-10 23:33:39 +01:00
Bartosz Taudul
340506406e Shared lock state machine. 2017-12-10 23:30:13 +01:00
Bartosz Taudul
b07718ab9e Track list of shared locks. 2017-12-10 22:42:39 +01:00
Bartosz Taudul
4d9ae83abd Fix assert. 2017-12-10 22:42:25 +01:00
Bartosz Taudul
398eecbb94 Store LockEvent type as an enum class. 2017-12-10 22:37:56 +01:00
Bartosz Taudul
bcf2bf1c5c Shared lock events (still using old functionality). 2017-12-10 22:04:49 +01:00
Bartosz Taudul
782231b048 Shared lockable skeleton. 2017-12-10 21:49:45 +01:00
Bartosz Taudul
bc27bbde37 Display mutex type. 2017-12-10 21:49:23 +01:00
Bartosz Taudul
3567d7edd8 Reintroduce lock announce events. 2017-12-10 21:40:48 +01:00
Bartosz Taudul
ea604d484d Don't show mutex as blocked, if there are no locks held. 2017-12-10 21:40:48 +01:00
Bartosz Taudul
0f2d41413f Include plots, msgs, gpu zones, locks in last time calculation. 2017-12-09 20:10:32 +01:00
Bartosz Taudul
6942f84a99 Last time is now cached, not calculated. 2017-12-09 20:05:34 +01:00
Bartosz Taudul
86006e8416 Simplify GetNextLockEvent(). 2017-12-09 19:28:12 +01:00
Bartosz Taudul
b67989ab54 No need for nextState variable. 2017-12-09 19:24:35 +01:00
Bartosz Taudul
981bbfe42d Reorder LockEvent fields. 2017-12-09 19:13:59 +01:00
Bartosz Taudul
cf5ee65604 Vectorize loop. 2017-12-09 00:15:10 +01:00
Bartosz Taudul
d0dfa62f43 Force inline internal pdqsort functions. 2017-12-08 23:25:48 +01:00
Bartosz Taudul
86c5dcced9 __cplusplus check won't work on MSVC. 2017-12-08 23:14:55 +01:00
Bartosz Taudul
0da09bc62b Use pdqsort. 2017-12-08 23:14:55 +01:00
Bartosz Taudul
2c4eaf162d Add pdqsort.
https://github.com/orlp/pdqsort.git
979c0a05f3e78977dc1f5218d13234d7ee89d1e7
2017-12-08 23:02:48 +01:00
Bartosz Taudul
48678b3bd7 Drop bitfield usage. 2017-12-05 22:34:48 +01:00
Bartosz Taudul
5407676f1f Microoptimize thread bit operations. 2017-12-05 22:22:07 +01:00
Bartosz Taudul
52df06d478 Calculate and use thread bit. 2017-12-05 22:09:53 +01:00
Bartosz Taudul
b578554223 Reserve lockmap timeline. 2017-12-05 21:55:00 +01:00
Bartosz Taudul
081087b9ce Drop an indirection level in plots. 2017-12-05 21:24:09 +01:00
Bartosz Taudul
702f235c1b Reserve-and-use functionality in Vector. 2017-12-05 21:23:51 +01:00
Bartosz Taudul
c58f1b09d1 Allow RW access to Vector's data. 2017-12-05 21:23:39 +01:00
Bartosz Taudul
a33e70567b Add GUI for GPU context hiding. 2017-11-30 15:34:52 +01:00
Bartosz Taudul
5246098c79 GPU context hiding plumbing. 2017-11-30 15:31:31 +01:00
Bartosz Taudul
dd8694350e Add zoom-to-range animation. 2017-11-27 22:41:30 +01:00
Bartosz Taudul
ba80b0c16a Use one common function for zooming to range. 2017-11-27 22:12:26 +01:00
Bartosz Taudul
eeca0676df Even simpler lock state combining. 2017-11-26 21:37:57 +01:00
Bartosz Taudul
50795cdf43 Declare buffer at function start. 2017-11-26 17:27:51 +01:00
Bartosz Taudul
b82434d7c3 No need for lambda in sort. 2017-11-26 17:13:24 +01:00
Bartosz Taudul
91758423cd Optimize lock state combining.
There are four possible lock states:
1. Nothing
2. HasLock
3. HasBlockingLock
4. WaitLock

The previous switch was implementing the following state transition:

s\n| 1 | 2 | 3 | 4
---+---+---+---+---
 1 | 1 | 2 | 3 | 4
---+---+---+---+---
 2 | 2 | 2 | 3 | 4
---+---+---+---+---
 3 | 3 | 3 | 3 | 4
---+---+---+---+---
 4 | 4 | 4 | 4 | 4

As can be seen, the switch effectively searches for the highest state
possible. This change implements it as such.
2017-11-26 16:42:50 +01:00
Bartosz Taudul
c044884dd9 Fix signed/unsigned mismatch. 2017-11-26 02:36:38 +01:00
Bartosz Taudul
6bbed5db82 Increase plot min/max value legibility. 2017-11-26 02:32:00 +01:00
Bartosz Taudul
4b548156b1 Proper display of negative time. 2017-11-26 02:24:13 +01:00
Bartosz Taudul
b2b3e7d739 Draw timescale. 2017-11-26 02:18:17 +01:00
Bartosz Taudul
e495cb959e Fix StringRef initialization. 2017-11-26 01:43:08 +01:00
Bartosz Taudul
d40488ccf1 Add more numeric separators. 2017-11-25 15:48:41 +01:00
Bartosz Taudul
cd26a6f8ff Improve text legibility by drawing text shadow. 2017-11-25 15:45:16 +01:00
Bartosz Taudul
2f9a3f7046 Colors are always in RGB order. 2017-11-25 15:33:10 +01:00
Bartosz Taudul
4d99560f7c Add some more numeric separators. 2017-11-25 13:50:41 +01:00
Bartosz Taudul
2e88f30e15 Display number of lock events in tooltip. 2017-11-25 13:48:03 +01:00
Bartosz Taudul
a515bf8878 Perform GPU to CPU resynchronization on each collect event. 2017-11-25 13:33:57 +01:00
Bartosz Taudul
0100266234 Use consistent names. 2017-11-25 13:14:16 +01:00
Bartosz Taudul
f2a19c4593 Use flat_hash_map for source location payload map. 2017-11-24 01:10:12 +01:00
Bartosz Taudul
7a13892754 Split srcloc check and creation. 2017-11-24 01:05:42 +01:00
Bartosz Taudul
184039d500 One check in CheckSourceLocation. 2017-11-24 00:53:04 +01:00
Bartosz Taudul
ccb39ad4bd Just one early exit check in CheckString/CheckThreadString. 2017-11-24 00:45:55 +01:00
Bartosz Taudul
79dec4eafe Display compression ratio and uncompressed data throughput. 2017-11-23 01:23:40 +01:00
Bartosz Taudul
7f74d35955 Workaround MSVC inlining bugs.
The previous code was not inlineable.
2017-11-22 01:54:50 +01:00
Bartosz Taudul
5d7fd5805a Don't hash pointers and such. 2017-11-22 00:23:43 +01:00
Bartosz Taudul
48624f29f7 Optimize searches. 2017-11-21 02:28:46 +01:00
Bartosz Taudul
a7e85c5b76 No need to populate string map when loading dump. 2017-11-21 02:16:58 +01:00
Bartosz Taudul
d5ea8a86a4 Remove GPU context indirection. 2017-11-21 02:10:41 +01:00
Bartosz Taudul
63c070228c Remove indirection in plot storage. 2017-11-21 02:06:17 +01:00
Bartosz Taudul
dca6cf0aa5 Use push_back_non_empty where appropriate. 2017-11-20 02:14:18 +01:00
Bartosz Taudul
7bf6bbbb94 Use back_and_pop in GPU zone processing. 2017-11-20 02:04:45 +01:00
Bartosz Taudul
43ed934204 Force inline file read and write functions. 2017-11-19 22:02:04 +01:00
Bartosz Taudul
59c7cf2bcd Force inline functions that have single path of execution. 2017-11-19 20:01:39 +01:00
Bartosz Taudul
47c23c9066 Force inline NewZone. 2017-11-19 19:39:25 +01:00
Bartosz Taudul
19db1a3f1f Optimize UpdateLockCount. 2017-11-19 19:35:16 +01:00
Bartosz Taudul
c1a79c0622 Force inline checker functions. 2017-11-19 19:23:07 +01:00
Bartosz Taudul
94bd563753 Back-and-pop operation on Vector. 2017-11-19 19:17:54 +01:00
Bartosz Taudul
a4e909a740 Fix braino. 2017-11-19 19:13:43 +01:00
Bartosz Taudul
7a4c6b3d68 Split heavy used functions into check and add parts. 2017-11-19 17:58:56 +01:00
Bartosz Taudul
89448b473e Don't check for nullptr, if already know there isn't one. 2017-11-19 17:28:12 +01:00
Bartosz Taudul
1e6707c609 Add no-nullptr-check push_back to Vector. 2017-11-19 17:27:51 +01:00
Bartosz Taudul
8c30f75b4d Prevent inlining of vector reallocation function. 2017-11-19 17:15:24 +01:00
Bartosz Taudul
ff35f2960a Remove a level of indirection. 2017-11-19 16:27:23 +01:00
Bartosz Taudul
08b8c6ec1b Optimize slab initializing allocation. 2017-11-19 13:53:39 +01:00
Bartosz Taudul
ca5d35e6cd Slab offset can be 32 bit.
This reduces memory system pressure.
2017-11-19 13:38:55 +01:00
Bartosz Taudul
0fe4232015 Optimize string wrappers initialization. 2017-11-19 13:36:03 +01:00
Bartosz Taudul
0770ed8ee6 Optimize ptr walking. 2017-11-19 13:22:08 +01:00
Bartosz Taudul
b3e0d2660d Properly use zone stack when inserting new zones.
CPU zones stack was also moved to thread data struct.
2017-11-19 01:16:21 +01:00
Bartosz Taudul
17fdd2bcbf Zone tooltip cosmetics. 2017-11-18 13:47:05 +01:00
Bartosz Taudul
ac68cde9f3 Render zero nanosecond zones. 2017-11-18 13:40:49 +01:00
Bartosz Taudul
68f8bb906e New context events are not serialized. 2017-11-18 01:49:44 +01:00
Bartosz Taudul
f73e8aaa59 Display thread zone counts. 2017-11-18 01:14:55 +01:00
Bartosz Taudul
429b44ca54 Add separators to GPU zone counts. 2017-11-18 01:14:50 +01:00
Bartosz Taudul
123de74fca Thread thread zone count. 2017-11-18 01:14:16 +01:00
Bartosz Taudul
cc3d18d51d Count GPU zones. 2017-11-18 01:07:28 +01:00
Bartosz Taudul
cd275fee9d Thread information window. 2017-11-18 01:03:40 +01:00
Bartosz Taudul
b6079f8c9a Display number of top-level zones. 2017-11-18 01:03:32 +01:00
Bartosz Taudul
4ba40016ce Display GPU context appearance info. 2017-11-18 00:56:05 +01:00
Bartosz Taudul
82edca301f Tooltip cosmetics. 2017-11-18 00:51:04 +01:00
Bartosz Taudul
18252feeeb Display GPU context information tooltip. 2017-11-18 00:34:16 +01:00
Bartosz Taudul
1a4889116e Store GPU accuracy bits info. 2017-11-18 00:34:16 +01:00
Bartosz Taudul
515443605d memset on non-POD data is UB. 2017-11-16 02:19:52 +01:00
Bartosz Taudul
e579374504 Remove unused variable. 2017-11-16 00:35:04 +01:00
Bartosz Taudul
c4ca6f8205 Proper initialization order. 2017-11-16 00:33:10 +01:00
Bartosz Taudul
abd0676cea Use flat_hash_map. 2017-11-15 23:15:59 +01:00
Bartosz Taudul
0d7ba57fa4 Move flat_hash_map to tracy namespace. 2017-11-15 23:04:07 +01:00
Bartosz Taudul
3bc483bd9e Add flat_hash_map.
https://github.com/skarupke/flat_hash_map.git
2ceada9f7fb5c6d808e33546882fc63662e10e79
2017-11-15 23:02:35 +01:00
Bartosz Taudul
3f5603ad96 Use global lock for processing of incoming events. 2017-11-15 22:33:11 +01:00
Bartosz Taudul
a3ba188af5 Manual initialization of GpuEvents. 2017-11-15 22:21:02 +01:00
Bartosz Taudul
54c5cfce66 No funny links to licenses. 2017-11-15 22:18:45 +01:00
Bartosz Taudul
afa9eec5dd Manual ZoneEvent vector initialization. 2017-11-15 22:13:23 +01:00
Bartosz Taudul
13d8d9255e Use benaphore instead of mutex. 2017-11-15 21:49:41 +01:00
Bartosz Taudul
6cc2ea8d0e Don't need recursive version. 2017-11-15 21:44:55 +01:00
Bartosz Taudul
100b814069 Wrap benaphore in tracy namespace, etc. 2017-11-15 21:42:55 +01:00
Bartosz Taudul
f85facf2af Add Preshing's benaphore implementation.
https://github.com/preshing/cpp11-on-multicore.git
41ac9c73dfa32e2fbc0af6668358092fafdfcae4
2017-11-15 21:40:46 +01:00
Bartosz Taudul
3a60a28a71 Don't allocate unneeded memory. 2017-11-15 21:26:58 +01:00
Bartosz Taudul
1445341068 Don't try to draw GPU zones with no timing data. 2017-11-15 10:56:28 +01:00
Bartosz Taudul
334224dd36 Support transfer of zone name in source location payload. 2017-11-15 10:56:28 +01:00
Bartosz Taudul
7187e1e5f5 Some strings are always indices.
This saves 4 bytes.
2017-11-15 10:56:27 +01:00
Bartosz Taudul
7da59a55cc Don't search for string in map, if it's known there's nothing there. 2017-11-15 10:56:27 +01:00
Bartosz Taudul
8b2af369ad Store zone text in StringRef. Use name from source location. 2017-11-15 10:56:27 +01:00
Bartosz Taudul
c43eb29ce0 Don't send source location pointer in query reply.
Since reply order is the same as the query order, the server already
knows what source location it receives. This observation allows placing
zone name into the source location struct.
2017-11-14 23:06:45 +01:00
Bartosz Taudul
5c872b2137 Simplify GPU context handling. 2017-11-14 00:48:26 +01:00
Bartosz Taudul
d56f44a220 Remove zone block split on color change.
While this makes the collapsed block color variation nonexistent, it
also enables proper optimization of rendering.
2017-11-12 01:53:03 +01:00
Bartosz Taudul
3ef0d1333f Sticky display of GPU related CPU time. 2017-11-12 01:32:21 +01:00
Bartosz Taudul
cff8f9ebd7 GPU zone highlight. 2017-11-12 01:28:07 +01:00
Bartosz Taudul
e40f029b19 GPU info window. 2017-11-12 01:25:44 +01:00
Bartosz Taudul
dcc2b3fb09 Save/load GPU events. 2017-11-12 01:12:28 +01:00
Bartosz Taudul
7db21f23b5 Fix GPU zones triangle color. 2017-11-12 01:05:55 +01:00
Bartosz Taudul
d61e03f879 Show when GPU commands were issued. 2017-11-11 23:13:54 +01:00
Bartosz Taudul
af81d999e9 Draw GPU zones. 2017-11-11 22:56:05 +01:00
Bartosz Taudul
84100bd459 Store proper source location. 2017-11-11 22:48:54 +01:00
Bartosz Taudul
7ebaa46f75 GPU time transfer. 2017-11-11 22:08:47 +01:00
Bartosz Taudul
a0729d3500 Implement single element erase() in TracyVector. 2017-11-11 22:07:23 +01:00
Bartosz Taudul
7e3ddfff1f Store proper cpu time. 2017-11-11 22:07:08 +01:00
Bartosz Taudul
6fcdb924e8 CPU-side GPU event transfer. 2017-11-11 21:09:48 +01:00
Bartosz Taudul
b208df8829 Add pop_back() to TracyVector. 2017-11-11 20:51:03 +01:00
Bartosz Taudul
3c00ce0958 GPU context registration. 2017-11-11 19:44:09 +01:00
Bartosz Taudul
ce35009c63 Move structs out of TracyView. 2017-11-11 19:21:25 +01:00
Bartosz Taudul
8868cad7b1 Fix typo. 2017-11-11 19:01:31 +01:00
Bartosz Taudul
81735aea2f Support for setting zone names in lua. 2017-11-11 17:56:41 +01:00
Bartosz Taudul
59ec40c045 Preemptive transfer of source location payload. 2017-11-11 15:59:30 +01:00
Bartosz Taudul
7f3b8f4647 Preemptive message text delivery. 2017-11-11 15:41:21 +01:00
Bartosz Taudul
76e11174dc Preemptive sending of custom strings. 2017-11-11 15:22:55 +01:00
Bartosz Taudul
35391d08f1 TracyCountBits should be static inline. 2017-11-11 02:46:41 +01:00
Bartosz Taudul
88d4580631 Proper initialization order. 2017-11-11 02:44:51 +01:00
Bartosz Taudul
f1ac7e9d49 Remove unused variable. 2017-11-11 02:42:17 +01:00
Bartosz Taudul
ca4483ecf5 Prevent source location payload duplication. 2017-11-11 02:31:51 +01:00
Bartosz Taudul
24084cbcd2 Standard way of string reference storage in SourceLocation.
StringRef::isptr was changed to isidx, as initialization of empty
SourceLocation zeroes the struct.
2017-11-11 02:02:47 +01:00
Bartosz Taudul
947cd04e5e General solution for string pointer/index problem. 2017-11-11 01:39:34 +01:00
Bartosz Taudul
96ce90c6ed Common storage for plot names. 2017-11-10 19:41:37 +01:00
Bartosz Taudul
5ec3ccd595 Store m_strings in common string storage. 2017-11-10 19:30:17 +01:00
Bartosz Taudul
b28fdc94ce Use common string storage for thread names. 2017-11-10 19:24:12 +01:00
Bartosz Taudul
1baf7faf8f Construct temporary in-place string. 2017-11-10 19:15:00 +01:00
Bartosz Taudul
51459d724c Don't use std::string to pass strings. 2017-11-10 18:39:43 +01:00
Bartosz Taudul
d9bdd56208 String pointer translation map is now named pointerMap. 2017-11-10 18:24:20 +01:00
Bartosz Taudul
8e78e38334 String map is not needed when reading timeline. 2017-11-10 18:22:41 +01:00
Bartosz Taudul
2887753b5d Separate custom string processing from string storage. 2017-11-10 17:45:19 +01:00
Bartosz Taudul
f6af913fd3 Remove ability to disable LZ4 compression. 2017-11-10 17:34:11 +01:00
Bartosz Taudul
44ee282b6e Store custom strings in an addressable vector. 2017-11-10 17:13:30 +01:00
Bartosz Taudul
0aef1b6d4d Proper tooltip for one condensed lock block. 2017-11-07 22:14:54 +01:00
Bartosz Taudul
4821a58720 Fix frame line flicker on big zoom. 2017-11-07 22:11:27 +01:00
Bartosz Taudul
8727910289 Snap lines to pixel grid. 2017-11-07 22:02:27 +01:00
Bartosz Taudul
2ca28b779a Display proper tooltip when only 1 zone is too small to display. 2017-11-07 21:51:21 +01:00
Bartosz Taudul
bb59eafda4 Remove zone block rounding. 2017-11-07 21:48:24 +01:00
Bartosz Taudul
d34a01eb96 Remove lock block rounding. 2017-11-07 21:46:17 +01:00
Bartosz Taudul
e869b6ead9 Proper drawing of lock inaccuracy indicators. 2017-11-07 01:51:30 +01:00
Bartosz Taudul
5d2f2beb53 Increase zoom speed. 2017-11-06 01:04:49 +01:00
Bartosz Taudul
58ef34ce42 Save/load source location payloads. 2017-11-05 21:36:22 +01:00
Bartosz Taudul
c6a7bcb086 Store source location payloads.
No saving yet. No detection of duplicate entries.
2017-11-05 21:24:50 +01:00
Bartosz Taudul
8178b61973 Wrap access to source location function and file. 2017-11-05 21:03:08 +01:00
Bartosz Taudul
3d2450fc10 Store source locations in a proper data structure. 2017-11-05 20:54:49 +01:00
Bartosz Taudul
bc77aa8d26 Source location payload transfer. No storage yet. 2017-11-05 16:46:00 +01:00
Bartosz Taudul
1323596ab2 Use switch instead of if ladder. 2017-11-05 16:14:51 +01:00
Bartosz Taudul
0fb5f012ce Lua profiling framework. No source location transfer yet. 2017-11-05 15:06:28 +01:00
Bartosz Taudul
9524b6447e Pack LockEvent data, saving one byte. 2017-10-29 16:49:22 +01:00
Bartosz Taudul
34123de977 Reduce custom vector size 16 -> 13 bytes. 2017-10-28 23:12:11 +02:00
Bartosz Taudul
1a117b330f Prevent lock event overdraw.
If two lock events would overdraw (and they were), it was very easy for
a non-blocking zone to completely hide a blocking one.
2017-10-28 22:44:41 +02:00
Bartosz Taudul
0edbe38334 Improve locks visibility. 2017-10-28 22:34:52 +02:00
Bartosz Taudul
2988dda68f Fix for missing unended zones. 2017-10-28 22:20:39 +02:00
Bartosz Taudul
39ac41bc19 Store source location on 32 bits, not 64. 2017-10-28 22:14:01 +02:00
Bartosz Taudul
fb6c91b552 Simplify switch. 2017-10-28 22:11:24 +02:00
Bartosz Taudul
db16aecf64 Try to display only frame time, if no space for full text. 2017-10-28 21:55:01 +02:00
Bartosz Taudul
2a6ccf8ee9 Fix some warnings. 2017-10-28 21:50:06 +02:00
Bartosz Taudul
5ebbf83eb3 Time variables should be signed. 2017-10-28 21:36:47 +02:00
Bartosz Taudul
adeb9b74f9 Make while condition explicit. 2017-10-28 21:35:38 +02:00
Bartosz Taudul
6aea2a0348 Enforce minimum size for zones and locks. 2017-10-28 16:14:52 +02:00
Bartosz Taudul
b6244d1180 Reorder checks. 2017-10-28 15:48:05 +02:00
Bartosz Taudul
f89713b7c6 Proper tooltip for condensed lock events. 2017-10-28 15:33:34 +02:00
Bartosz Taudul
32fc88de7b Disable rounding on proper rectangle. 2017-10-28 15:30:20 +02:00
Bartosz Taudul
6832a4ae57 Better lock merging. 2017-10-28 15:29:25 +02:00
Bartosz Taudul
958e472751 Better lock combining. 2017-10-28 15:24:25 +02:00
Bartosz Taudul
3e0b1f0ad5 Lock drawing optimization. 2017-10-28 15:15:07 +02:00
Bartosz Taudul
fcc76412fe Move common variables out of loop. 2017-10-28 14:25:35 +02:00
Bartosz Taudul
591da109a8 Outer loop check is no longer needed. 2017-10-28 14:15:18 +02:00
Bartosz Taudul
25e9ae4b68 Simplify code. 2017-10-28 14:14:26 +02:00
Bartosz Taudul
d1789f1e3a Stay in fast loop until there's something to draw. 2017-10-28 14:08:10 +02:00
Bartosz Taudul
257f9818ed Fast iteration until state != Nothing. 2017-10-28 13:56:35 +02:00
Bartosz Taudul
433a80c2df Move lock state progression to a separate function. 2017-10-28 13:44:46 +02:00
Bartosz Taudul
09c9502061 Condense code. 2017-10-28 13:19:32 +02:00
Bartosz Taudul
a2a314678b Helper function for determining if other threads are waiting. 2017-10-28 12:48:05 +02:00
Bartosz Taudul
71504c4e53 Document lock state colors. 2017-10-28 12:40:25 +02:00
Bartosz Taudul
e5865cb23e Optimize drawing messages. 2017-10-28 12:37:34 +02:00
Bartosz Taudul
3163563a27 Fix crash on unended lock highlight. 2017-10-26 02:06:30 +02:00
Bartosz Taudul
db48cd6c1f Display threads that have acquired a lock. 2017-10-26 00:42:16 +02:00
Bartosz Taudul
f3bac060a6 Same thing for contended locks. 2017-10-25 23:45:53 +02:00
Bartosz Taudul
016048a761 Properly detect and show recursive lock release. 2017-10-25 23:39:56 +02:00
Bartosz Taudul
f013dfe706 Properly label recursive lock wait sections. 2017-10-25 23:37:10 +02:00
Bartosz Taudul
01b2e64985 Properly show recursive lock wait sections. 2017-10-25 23:36:08 +02:00
Bartosz Taudul
e16f784617 Proper handling of recursive mutices. 2017-10-25 23:30:51 +02:00
Bartosz Taudul
742e4e2893 Use proper type. 2017-10-25 22:56:02 +02:00
Bartosz Taudul
011253ac47 Display lock and wait counts. 2017-10-25 22:35:12 +02:00
Bartosz Taudul
339c177ee8 Sort lock map.
It is displayed in UI, so order is important.
2017-10-24 22:30:43 +02:00
Bartosz Taudul
8f814b2537 Optimize drawing zone frames. 2017-10-22 17:48:01 +02:00
Bartosz Taudul
73d23320ee Move string helper functions out of tracy::View. 2017-10-22 17:47:40 +02:00
Bartosz Taudul
262dfa53e9 Display lock number on lock list in options. 2017-10-22 17:30:02 +02:00
Bartosz Taudul
1967ce871a Fix getting parent of not ended zone. 2017-10-22 17:09:33 +02:00
Bartosz Taudul
cc8683a399 Store TextData pointer as an index in array.
This further reduces ZoneEvent size by 4 bytes.
2017-10-22 16:40:15 +02:00
Bartosz Taudul
2e6350877d Remove parent pointer from ZoneEvent. 2017-10-22 16:15:27 +02:00
Bartosz Taudul
b72d4b05de Remove dead code. 2017-10-22 15:40:56 +02:00
Bartosz Taudul
7345ca5aa6 Rename Event to ZoneEvent. 2017-10-22 15:37:24 +02:00
Bartosz Taudul
97b3cccb1a 64MB slab size. 2017-10-22 15:36:22 +02:00
Bartosz Taudul
eff6015aad Fix combo list. 2017-10-22 15:27:07 +02:00
Bartosz Taudul
5b20f0008f Optional namespace shortening. 2017-10-22 13:56:05 +02:00
Bartosz Taudul
caec31731f Add ability to hide uncontended locks. 2017-10-22 13:32:27 +02:00
Bartosz Taudul
92a38a43d5 Add ability to hide individual locks. 2017-10-22 13:26:11 +02:00
Bartosz Taudul
ba5312f429 Ability to completely hide plots. 2017-10-22 13:17:34 +02:00
Bartosz Taudul
133db4c68e Ability to completely hide threads. 2017-10-22 13:13:26 +02:00
Bartosz Taudul
bd8d423d16 Use small temporary buffer instead of growing one. 2017-10-21 14:27:38 +02:00
Bartosz Taudul
31dec96d0c Don't calculate min-max range of a large point quantity. 2017-10-21 14:27:38 +02:00
Bartosz Taudul
5f7dad1889 Don't do unnecessary hover checks. 2017-10-21 14:27:38 +02:00
Bartosz Taudul
c28b3a420f Delay insertion of postponed plot items.
This further reduces number of memmoves that need to be performed on a
vector, which results in net increased throughput.
2017-10-21 13:32:51 +02:00
Bartosz Taudul
75e3dd175a One function for adding threads. 2017-10-21 13:14:20 +02:00
Bartosz Taudul
fa985940f7 Check thread name when adding messages. 2017-10-21 13:05:37 +02:00
Bartosz Taudul
807d3c42be Use slab allocator for server allocations. 2017-10-21 13:01:57 +02:00
Bartosz Taudul
07cb693cbb Separate slab init/noinit allocation functions. 2017-10-21 12:54:12 +02:00
Bartosz Taudul
ad338a7cfd Fix message literals. 2017-10-21 12:39:26 +02:00
Bartosz Taudul
b7800be627 Perform bulk insertion of plot points. 2017-10-19 23:26:21 +02:00
Bartosz Taudul
cc1715ae98 Implement Vector::insert( it, begin, end ). 2017-10-19 23:26:02 +02:00
Bartosz Taudul
82476a310c Implement Vector::clear(). 2017-10-19 23:25:49 +02:00
Bartosz Taudul
cf94b1d2e8 Add missing locks. 2017-10-19 23:10:47 +02:00
Bartosz Taudul
476597f5ed Adaptive display compression range. 2017-10-19 21:05:59 +02:00
Bartosz Taudul
44cc0827d4 Store pointers to PlotItems. 2017-10-19 21:04:11 +02:00
Bartosz Taudul
7329eb6e99 Display plot points count with separators. 2017-10-19 20:34:48 +02:00
Bartosz Taudul
026a27aa05 Implement front() in custom vector. 2017-10-19 20:34:07 +02:00
Bartosz Taudul
6e4343c043 Use custom vector to store plot items. 2017-10-19 20:14:31 +02:00
Bartosz Taudul
0519df4dfc Reduce accuracy to decrease memory load. 2017-10-19 19:56:13 +02:00
Bartosz Taudul
5278bb29e6 Don't sort all values in a compressed range. 2017-10-19 19:43:27 +02:00
Bartosz Taudul
fd22fed773 Manually manage temporary plot buffer. 2017-10-19 19:09:40 +02:00
Bartosz Taudul
6e5ccf8391 Store values, not pointers to PlotItems. 2017-10-19 18:28:11 +02:00
Bartosz Taudul
8958780b18 Time must be signed. 2017-10-18 23:36:50 +02:00
Bartosz Taudul
c5eef172f1 Adapt "recording" circle size to font size. 2017-10-18 23:25:35 +02:00
Bartosz Taudul
4f3a64be9d Optimize drawing plots. 2017-10-18 22:29:59 +02:00
Bartosz Taudul
58ef271356 Add separator to zone count. 2017-10-18 20:35:01 +02:00
Bartosz Taudul
ac71622c0c Add separators to printed values. 2017-10-18 20:33:49 +02:00
Bartosz Taudul
cdde2ea2a3 Cut off trailing zeros when printing floating point values. 2017-10-18 20:18:33 +02:00
Bartosz Taudul
7c47edc64f Terminate connection handshake. 2017-10-18 18:48:51 +02:00
Bartosz Taudul
6d48404934 4KB is too small for some messages. Use 64KB buffer.
OpenGL extensions list bites in the ass again.
2017-10-17 01:21:00 +02:00
Bartosz Taudul
c0e5dd0369 Visual differentiation of tracy init from other frames. 2017-10-17 01:17:55 +02:00
Bartosz Taudul
1e3476cf36 Transfer profiler initialization time. 2017-10-17 01:10:38 +02:00
Bartosz Taudul
acc1d9d834 Measurement of time period by LMB dragging. 2017-10-15 16:42:56 +02:00
Bartosz Taudul
84abfadc72 Horizontal zone view dragging with RMB. 2017-10-15 16:20:45 +02:00
Bartosz Taudul
5b9fcddfb3 String literal message transfer. 2017-10-15 13:06:49 +02:00
Bartosz Taudul
eb95d65622 Fix types in std::max. 2017-10-14 18:48:44 +02:00
Bartosz Taudul
ad95813ba0 Message highlighting. 2017-10-14 15:47:06 +02:00
Bartosz Taudul
bf8f369e33 Increase plot point active hover area. 2017-10-14 15:29:04 +02:00
Bartosz Taudul
503ef8bcbc Save message data. 2017-10-14 15:26:02 +02:00
Bartosz Taudul
bd7f8111a6 Lock id size changed in data dump. 2017-10-14 15:21:15 +02:00
Bartosz Taudul
30fd899a90 Display messages in threads. 2017-10-14 15:03:28 +02:00
Bartosz Taudul
317b23c7c3 Assign messages to threads. 2017-10-14 14:46:03 +02:00
Bartosz Taudul
3ba349565a Message list window. 2017-10-14 14:36:30 +02:00
Bartosz Taudul
fa8030009f Store messages. 2017-10-14 14:28:04 +02:00
Bartosz Taudul
1aaab3c5e4 Use 32 bits to store lock id.
This makes queue item size 32 bytes. Queue operations can now be faster,
because multiplication by 33 is replaced by shift by 5.
2017-10-13 20:05:38 +02:00
Bartosz Taudul
ec789d60e8 Store source location color in 24 bits. 2017-10-13 19:59:18 +02:00
Bartosz Taudul
ed55fbfacb Save/load plot data. 2017-10-13 16:04:20 +02:00
Bartosz Taudul
348661c9df Display number of plot points per second. 2017-10-13 15:55:09 +02:00
Bartosz Taudul
e3abc8b52a Fix min, max value setting. 2017-10-13 15:46:00 +02:00
Bartosz Taudul
4066b9ae30 Add plot information tooltip. 2017-10-13 15:44:24 +02:00
Bartosz Taudul
40d7a26b37 Allow hiding plots. 2017-10-13 15:41:20 +02:00
Bartosz Taudul
4ed905ca88 Plot can't be empty. 2017-10-13 15:36:16 +02:00
Bartosz Taudul
591fbdf75a Store min, max values in plot. 2017-10-13 15:32:59 +02:00
Bartosz Taudul
5deb1c51dd Can't modify both variables. 2017-10-13 15:31:38 +02:00
Bartosz Taudul
d1c43ef917 Draw vertical line on mouse position in zone view. 2017-10-13 15:26:18 +02:00
Bartosz Taudul
b217e6ab30 Add lousy plot values tooltip. 2017-10-13 15:15:57 +02:00
Bartosz Taudul
f32114cb35 Draw plot points in a separate function. 2017-10-13 15:09:01 +02:00
Bartosz Taudul
d05827135d Draw plots. 2017-10-13 14:54:32 +02:00
Bartosz Taudul
ee60fc6885 Allow disabling zone/lock drawing. 2017-10-13 13:32:23 +02:00
Bartosz Taudul
fe0366c792 Receive plot data. 2017-10-13 03:36:59 +02:00
Bartosz Taudul
d9feeb3486 Disable scroll bar on profiler window. 2017-10-12 23:44:35 +02:00
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
4fad4be816 Pack event structures. 2017-10-04 18:12:11 +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