Commit Graph

3516 Commits

Author SHA1 Message Date
Bartosz Taudul
601f0a17df
Remove "Go to frame" button. 2021-11-13 15:13:35 +01:00
Bartosz Taudul
81c66ad126
Fix samples order on save, not load.
Sorting samples during load was a major mistake, as three different background
processing threads were concurrently accessing the samples table, and it was
being sorted in one of them!
2021-11-13 03:25:47 +01:00
Bartosz Taudul
0ab73e2aa7
Detect context switch samples during reconstruction. 2021-11-13 03:15:20 +01:00
Bartosz Taudul
484ed84252
Display context switch samples count. 2021-11-13 02:52:08 +01:00
Bartosz Taudul
d8d6423266
Context switch samples counting. 2021-11-13 02:47:39 +01:00
Bartosz Taudul
8ef212c26e
Determine if postponed callstacks are for context switches.
Samples are processed only when new context switch data has been received.
2021-11-13 02:44:54 +01:00
Bartosz Taudul
745b795d50
Detect context switch callstack samples.
Context switch callstack samples are not included in the sampling data
statistics (as these don't represent random sampling), but are rather put into
a separate dedicated data structure.

For this to work, a complete context switch data has to be available for the
callstack timestamp. There is no guarantee it will be present at the time it
is needed, so a second structure is added to allow postponing qualification of
callstacks.
2021-11-13 02:40:32 +01:00
Bartosz Taudul
5b799e0e45
Monitor when new context switch data is received. 2021-11-13 02:38:33 +01:00
Bartosz Taudul
00834ed32b
No need to pass time and callstack. 2021-11-13 02:26:11 +01:00
Bartosz Taudul
06c1bb4e59
Open callstack windows when clicking on context switch. 2021-11-13 01:34:49 +01:00
Bartosz Taudul
4b74777fcf
Display image name in callstack tooltips. 2021-11-13 01:31:28 +01:00
Bartosz Taudul
1200409a44
Display context switch wait call stack. 2021-11-13 01:21:47 +01:00
Bartosz Taudul
ce8e42f00b
Separate drawing callstack tooltip from drawing its contents. 2021-11-13 01:08:36 +01:00
Bartosz Taudul
f925da5e01
Handle fiber enter -> enter case (without leave in between). 2021-11-06 21:14:37 +01:00
Bartosz Taudul
d33de972f0
Properly show fiber context switch data. 2021-11-06 21:06:08 +01:00
Bartosz Taudul
40cd5435df
Fix context switch reconstruction condition. 2021-11-06 20:49:15 +01:00
Bartosz Taudul
69e5cf796d
Construct faux context switch data from fiber events. 2021-11-06 20:38:16 +01:00
Bartosz Taudul
efeed326bf
Context switch data may exists without CPU data. 2021-11-06 20:22:08 +01:00
Bartosz Taudul
904a444ea5
Label fiber threads across the UI. 2021-11-06 19:27:36 +01:00
Bartosz Taudul
0075050679
Allow checking if thread is a fiber. 2021-11-06 19:02:02 +01:00
Bartosz Taudul
3ede2a1345
Explicit tracking of fiber state in ThreadData.
This replaces the use of hard-to-track global state with well-defined accessor
functionality.
2021-11-06 18:55:29 +01:00
Bartosz Taudul
373a6fc19e
Add event debug routine. 2021-11-04 22:30:16 +01:00
Bartosz Taudul
4c774130ee
Allow direct switching from one fiber to another. 2021-11-04 17:51:32 +01:00
Bartosz Taudul
fceb065329
Fiber name transport. 2021-11-03 18:57:30 +01:00
Bartosz Taudul
211b202d8e
Process fiber entry and leave events. 2021-11-02 01:53:10 +01:00
Bartosz Taudul
b4e4c05088
Thread context data may be invalidated due to fibers. 2021-11-02 01:52:41 +01:00
Bartosz Taudul
d522af99b9
Threads may be mapped to fibers. 2021-11-02 01:51:54 +01:00
Bartosz Taudul
0718330016
Add fiber labels to places with thread information. 2021-11-02 01:48:28 +01:00
Bartosz Taudul
e5c44afdcb
Distinguish fiber threads with green color. 2021-11-02 01:48:07 +01:00
Bartosz Taudul
bb72bf10e9
Add fiber failures. 2021-11-02 01:47:31 +01:00
Bartosz Taudul
93b6d88c4c
Save/load fiber thread flag. 2021-11-02 01:46:29 +01:00
Bartosz Taudul
8f44f1c68b
Store fiber state is ThreadData. 2021-11-02 01:45:01 +01:00
Bartosz Taudul
8f6a911f1e
Save/load sum of values in plots. 2021-10-17 13:14:44 +02:00
Bartosz Taudul
0b190b1a69
Calculate sum of values in reconstructed memory plot. 2021-10-17 13:14:23 +02:00
Bartosz Taudul
04db76d5fd
Calculate plot values sum during data import. 2021-10-17 13:07:37 +02:00
Bartosz Taudul
facd2be33b
Display average plot value. 2021-10-17 13:05:10 +02:00
Bartosz Taudul
0bd1364c2f
Calculate plot values sum. 2021-10-17 13:04:56 +02:00
Bartosz Taudul
a1511a39bd
Delta-encode code information pointers. 2021-10-16 16:29:06 +02:00
Bartosz Taudul
dfb1ce64df
Sample data inconsistency warning. 2021-10-16 16:15:19 +02:00
Bartosz Taudul
bcaac7b53f
Add ~2 second overflow grace period.
This fixes issues when the GPU is actually permitted to report out-of-order
timestamps (e.g. when tasks are scheduled by the GPU, instead of being forced
to execute in submission order).
2021-10-11 00:29:24 +02:00
Bartosz Taudul
d3905bd4bb
Add context to zone text failures. 2021-10-10 14:14:33 +02:00
Bartosz Taudul
930ef77ea9
Add zone value failure context. 2021-10-10 14:12:13 +02:00
Bartosz Taudul
9300934fa5
Separate zone value and text failures. 2021-10-10 14:05:21 +02:00
Bartosz Taudul
07bc665d8c
Drop support for Cygwin. 2021-10-07 23:28:40 +02:00
Bartosz Taudul
b7a27d02af
Fix total time in find zone, if limit range is enabled. 2021-09-28 01:11:22 +02:00
Bartosz Taudul
9cb54982cb
Fix crash. 2021-09-27 18:13:45 +02:00
Bartosz Taudul
c2e94355f0
Add icon to samples label. 2021-09-27 02:07:02 +02:00
Bartosz Taudul
99f2d0e059
Fix vertical spacing in inline symbols list. 2021-09-27 01:54:37 +02:00
Bartosz Taudul
28ae970887
Remove trailing whitespace. 2021-09-27 01:54:15 +02:00
xavier
f37ef1affd Display the samples after the groups in the "find zone" window
to make it clear they are filtered by selected group.
2021-09-23 21:03:56 +02:00
xavier
61670e30aa Update samples statistics continuously in the "find zone" window 2021-09-23 21:03:56 +02:00
xavier
63acfe72e7 Apply group filters to the samples statistics in the "find zone" window
reduce memory by storing the thread ids next to the zones intead of
making zone lists per thread.

speed-up by reading the zones in linear order rather than bisecting
the whole list for each sample.
2021-09-23 21:03:56 +02:00
xavier
41130d2a69 Avoid useless work when there aren't any samples 2021-09-23 21:03:56 +02:00
xavier
1233b39b69 Move samples before groups in "find zone" window
and fix style
2021-09-23 21:03:56 +02:00
xavier
0089c832f7 Cache samples statistics in the "find zone" window 2021-09-23 21:03:56 +02:00
xavier
ed42c2388c Add samples statistics to the "find zone" window 2021-09-23 21:03:56 +02:00
xavier
e4ce9f0f41 Include threadid in SampleDataRange
TODO: maybe make lists per thread to avoid increasing the packed structure by 2 bytes?
2021-09-23 21:03:56 +02:00
xavier
6b901a7156 Extract DrawSamplesStatistics() 2021-09-23 21:03:56 +02:00
Bartosz Taudul
4c220bdc14
Always display statistics mode selection.
Even if only one option is available.
2021-09-23 18:32:59 +02:00
Bartosz Taudul
f74818ece5
Make accumulation combo consistent. 2021-09-23 18:28:19 +02:00
Bartosz Taudul
bcfc4a4fa7
Fix message thread assignment in import-chrome. 2021-09-23 18:08:03 +02:00
Bartosz Taudul
dfb4020a92
Add missing include for intptr_t. 2021-08-22 13:38:28 +02:00
Bartosz Taudul
673dfd0f02
Update ImGui GLFW and OpenGL 3.x backends.
The new embedded ImGui OpenGL loader has been extended with a couple of
functions and definitions needed by TracyTexture.cpp.
2021-08-22 13:30:46 +02:00
Bartosz Taudul
30445b656f
Update ImGui to 1.84.1 + docking. 2021-08-21 00:52:30 +02:00
Bartosz Taudul
c82bf3915b
Extend thread expansion grace period to half a second.
Previously a framerate-dependent 10 frame count was used.
2021-08-19 00:24:11 +02:00
Bartosz Taudul
7304558bdf
Cycle through assembly blocks when right-clicking source line. 2021-07-26 01:21:58 +02:00
Bartosz Taudul
55a966f9c6
Fix assert. 2021-07-26 01:18:17 +02:00
Bartosz Taudul
06ae39d9cc
Fix debug build. 2021-07-18 16:34:24 +02:00
Bartosz Taudul
8b489c95ff
Rename slow branches/cache to branch/cache impact. 2021-07-18 16:15:32 +02:00
Bartosz Taudul
0e603a0997
Render relative hw samples values. 2021-07-18 16:15:32 +02:00
Bartosz Taudul
d0fad4fd39
Rename relative hw samples to "impact". 2021-07-18 16:15:31 +02:00
Bartosz Taudul
83b159b43b
Count hw stats, if relative mode is set. 2021-07-18 15:00:22 +02:00
Bartosz Taudul
fbf2c87a20
Include hw stats in AddrStatData. 2021-07-18 15:00:22 +02:00
Bartosz Taudul
e30608afbf
Store and pass AddrStat data in one data structure. 2021-07-18 15:00:22 +02:00
Bartosz Taudul
9c7a122d94
Implement counting relative hw samples data.
This exploits the fact that AddrStat has two data fields (local and ext) to
store branch and cache information.
2021-07-18 15:00:22 +02:00
Bartosz Taudul
8c78af4d00
Drop limitView from GatherIpHwStats interface. 2021-07-18 15:00:21 +02:00
Bartosz Taudul
a5e655d1ee
Add relative hw samples checkbox. 2021-07-18 15:00:21 +02:00
Bartosz Taudul
b4c1313a2e
Make hw stats cost a parameter. 2021-07-18 02:03:29 +02:00
Bartosz Taudul
50f7deb1a3
Merge pull request #243 from benvanik/patch-4
Indenting empty GPU zone tree nodes when grouped to keep zones aligned.
2021-07-17 20:48:43 +02:00
Ben Vanik
ba185b18f9 Indenting empty grouped CPU/GPU zone tree nodes to keep things aligned. 2021-07-17 11:46:29 -07:00
Ben Vanik
e3165c333b Fixing unbalanced tree pop in grouped GPU zones. 2021-07-17 09:25:44 -07:00
Bartosz Taudul
edae542a48
Allow selecting image name for filtering from a list. 2021-07-11 19:43:51 +02:00
Bartosz Taudul
b6db644ac6
Add hasher and comparator for StringIdx. 2021-07-11 19:43:40 +02:00
Terence Rokop
68ec7abdf4
Move responsibility for spacing of combo box
Thereby fix a spurious horizontal separator bar.
2021-06-26 11:51:57 -07:00
Terence Rokop
d6fd252ce4
Add more spacing to pre-existing options 2021-06-26 10:41:24 -07:00
Terence Rokop
e105d2d96c
Aesthetic fixes to accumulation mode combo box
Shorter text fields and more spacing.
2021-06-26 10:41:23 -07:00
Terence Rokop
1dd117533e
Avoid non-reentrant option in sampling/symbol view 2021-06-26 10:41:23 -07:00
Terence Rokop
f000dce73f
Replace "enum class" switches with explicit casts 2021-06-26 08:30:15 -07:00
Terence Rokop
b392671a7a
Make time accumulation mode use combo box 2021-06-25 21:27:45 -07:00
Bartosz Taudul
9a22b8e83c
Cosmetics. 2021-06-23 20:43:46 +02:00
Bartosz Taudul
913463635a
Cosmetics. 2021-06-23 20:37:14 +02:00
Terence Rokop
9366e58d12
Introduce "Non-reentrant time" radio button
Add to the statistics view an option for "Non-reentrant
time", which displays the count of and time spent in zone
events which were the only appearances (at that time) of
their zones on their threads' stacks.

Besides the GUI changes, this involves:

- Introducing a tri-state accumulation mode to replace the
boolean "self time":  now there's "Self time only",
"Child time", and "Non-reentrant time".

- Removing the separate "selfTotal" from SrcLocZonesSlim,
making "total" represent whichever of the now three options
is active, which in turn requires keeping track of the
accumulation mode in StatisticsCache and invalidating that
cache when the accumulation mode changes.
2021-06-20 17:56:15 -07:00
Terence Rokop
66053e37f7
Add non-reentrant stats to SourceLocationZones
Extend SourceLocationZones with fields to track the count
and time of non-reentrant zone events -- that is, zone
events which were the only appearances (at the time) of
those zones on their threads' stacks.
2021-06-20 17:56:15 -07:00
Terence Rokop
c90e39e06e
Keep track of zone appearances on thread stacks
Start keeping track, using the previously-introduced
SrcLocCountMap, of the number of appearances of each zone
on each thread's stack at a given time.
2021-06-20 17:56:15 -07:00
Terence Rokop
1f0b4656f4
Introduce SrcLocCountMap
Add to ThreadData a map from source location to a counter,
which will be used to keep track of the number of
appearances of zones with the corresponding source locations
on each thread's stack.
2021-06-20 17:56:14 -07:00
Terence Rokop
0a8ec09566
Introduce View::IsZoneReentry()
These two methods can search a timeline to determine whether
a given ZoneEvent is the only appearance of the given zone
on the current thread stack, or a re-entry.
2021-06-20 17:53:38 -07:00
Bartosz Taudul
0e0692b7f7
Don't display hw samples as time in selected lines summary. 2021-06-20 16:01:19 +02:00
Bartosz Taudul
e9aca02880
Make hw sample cost in source files relative to whole symbol. 2021-06-20 15:55:21 +02:00
Bartosz Taudul
846bde1a11
Narrow down search range. 2021-06-20 14:37:56 +02:00
Bartosz Taudul
15b42039bd
Add very early exit test. 2021-06-20 14:34:47 +02:00
Bartosz Taudul
d4b92e0fbe
Add early exit conditions. 2021-06-20 14:33:08 +02:00
Bartosz Taudul
a10d71b766
Switch loop order for better cache locality on the slow path. 2021-06-20 14:30:55 +02:00
Bartosz Taudul
a9a16b4d94
Narrow down search region. 2021-06-20 14:24:42 +02:00
Bartosz Taudul
22352dd29b
Select optimized path before entering loop. 2021-06-20 14:22:14 +02:00
Bartosz Taudul
5d86002f82
Calculate all CPU usage values in one go. 2021-06-20 14:19:18 +02:00
Bartosz Taudul
5efc03cdf9
Move cycles up in cost combo selector. 2021-06-20 12:50:13 +02:00
Bartosz Taudul
7e17c8643c
Don't show hw events as time. 2021-06-20 01:08:18 +02:00
Bartosz Taudul
bc4016e97c
Don't depend on callstack frames to match hw samples to source. 2021-06-20 01:01:29 +02:00
Bartosz Taudul
2f3ee594f0
Use square root to make slow branches and cache less spiky. 2021-06-20 00:50:14 +02:00
Bartosz Taudul
3305ea2775
Keep raw hw sample data visually separate. 2021-06-20 00:46:29 +02:00
Bartosz Taudul
07fe0a5447
Use enum for cost selection. 2021-06-20 00:45:39 +02:00
Bartosz Taudul
3cc69b221e
Select Zstd compression when Zstd level is changed. 2021-06-20 00:25:30 +02:00
Bartosz Taudul
80e1b0c2cf
Don't display hw samples as time in files list. 2021-06-20 00:14:19 +02:00
Bartosz Taudul
52708268fe
Store 64-bit integers in AddrStat. 2021-06-20 00:08:25 +02:00
Bartosz Taudul
4e6a1bae22
Don't display time for hw samples. 2021-06-20 00:04:08 +02:00
Bartosz Taudul
326a2a70d8
Add indirect hw statistics. 2021-06-20 00:01:37 +02:00
Bartosz Taudul
ad2b6e932b
Don't scroll cost combo list. 2021-06-20 00:01:21 +02:00
Bartosz Taudul
a5991036dc
Add more hw stats as cost. 2021-06-19 23:43:46 +02:00
Bartosz Taudul
c7b3d42852
Calculating cost in cycles and retirements. 2021-06-19 23:39:33 +02:00
Bartosz Taudul
90149641df
Reset cost selection when no samples. 2021-06-19 23:17:24 +02:00
Bartosz Taudul
8d52d2acfd
Disable inline context if no inline symbols available. 2021-06-19 21:40:30 +02:00
Bartosz Taudul
2e3241ba54
Restrict hardware samples to inline function context. 2021-06-19 20:50:06 +02:00
Bartosz Taudul
6cc844abee
Display inline symbol address. 2021-06-19 20:20:52 +02:00
Bartosz Taudul
748c22df8e
Darken assembly instructions which aren't in current context. 2021-06-19 20:11:53 +02:00
Bartosz Taudul
53111f9dd9
Save/load code symbol map. 2021-06-19 19:58:16 +02:00
Bartosz Taudul
8045ceee5d
Display function assigned to assembly line. 2021-06-19 19:52:33 +02:00
Bartosz Taudul
ec3ee09f09
Add inline symbols map accessors. 2021-06-19 19:13:34 +02:00
Bartosz Taudul
654331a8c8
Create code address -> symbol map. 2021-06-19 19:07:57 +02:00
Bartosz Taudul
cc0ca341bb
Add cost criteria selection UI. 2021-06-19 18:16:11 +02:00
Bartosz Taudul
7ad9cafefb
Add child call samples hints to the UI. 2021-06-19 17:41:29 +02:00
Bartosz Taudul
6e8d57bc98
Update context switches look. 2021-06-19 16:50:25 +02:00
Bartosz Taudul
c17a913cf5
Update zones look. 2021-06-19 16:43:56 +02:00
Bartosz Taudul
b91cd9148d
Add 2-segment line drawing wrapper. 2021-06-19 16:22:50 +02:00
Bartosz Taudul
188320db48
Simplify zone color data retrieval. 2021-06-19 16:20:35 +02:00
Bartosz Taudul
5e582ef057
Omit line number from source locations, if not known. 2021-06-19 12:47:55 +02:00
Bartosz Taudul
91f1845d92
Add LocationToString() helper. 2021-06-19 12:33:23 +02:00
Bartosz Taudul
c69cf5bd3f
Cosmetics. 2021-06-19 12:33:16 +02:00
Bartosz Taudul
8e5a53a191
Merge remote-tracking branch 'origin/master' into hw 2021-06-19 12:19:10 +02:00
Andrey Voroshilov
d4d77006ac Fix a crash in Worker c-tor when converting certain JSON files 2021-06-19 01:12:41 -07:00
Bartosz Taudul
e1b68232dc
Better describe kernel ghost zones. 2021-06-19 01:40:05 +02:00
Bartosz Taudul
a96410547b
Display thread kernel time. 2021-06-17 01:56:16 +02:00
Bartosz Taudul
d49da69972
Count kernel samples. 2021-06-17 01:47:19 +02:00
Bartosz Taudul
d2ebe341f2
Allow filtering out kernel symbols from statistics view. 2021-06-16 01:43:09 +02:00
Bartosz Taudul
f145ca5897
Fix assert. 2021-06-16 01:39:43 +02:00
Bartosz Taudul
48fe6550a6
Kernel code is unreachable from user space. 2021-06-15 21:40:08 +02:00
Bartosz Taudul
5b642cad01
Implement combining sample callstacks.
This is required, because Windows will send two callstacks with the same
timestamp, one for kernel-space, second for user-space.
2021-06-15 02:25:12 +02:00
Bartosz Taudul
db1dc311b0
Add Int48 clearing function. 2021-06-15 02:04:32 +02:00
Bartosz Taudul
0fdd5ab01b
Extract callstack sample processing implementation. 2021-06-15 01:59:49 +02:00
Bartosz Taudul
891e1ac280
Read combine samples flag on server. 2021-06-15 01:33:43 +02:00
Bartosz Taudul
06dcdd342f
Combine flags in welcome message. 2021-06-15 01:26:50 +02:00