Bartosz Taudul
f1095bba12
GPU statistics data accessors.
2022-01-29 00:15:32 +01:00
Bartosz Taudul
db64a5fa7e
Explicitly save context switch callstack samples.
2021-12-21 15:24:11 +01:00
Bartosz Taudul
c5654c333a
Process explicit context switch callstack samples.
2021-12-21 14:18:32 +01:00
Bartosz Taudul
3f1c540b3a
Further split ProcessCallstackSampleImpl().
2021-12-21 14:18:14 +01:00
Bartosz Taudul
9b624049a5
Immediately disconnect connection on disconnect request.
...
The disconnect handling logic is broken on the client, after the symbol
resolution was moved to a separate thread. Use workaround until a proper fix
is available.
2021-12-11 13:15:50 +01:00
Bartosz Taudul
bbbae35925
Only identify samples when IdentifySamples is set.
2021-12-04 15:16:17 +01:00
Bartosz Taudul
c98680ad0b
Add support for sample data without time.
2021-12-02 02:06:05 +01:00
Bartosz Taudul
d8a611e952
Also calculate sample parents without inlines.
2021-11-27 17:47:09 +01:00
Bartosz Taudul
687d4defc0
Cosmetics.
2021-11-27 17:46:43 +01:00
Bartosz Taudul
355a179678
Merge callstack samples with the same timestamp.
2021-11-27 15:29:33 +01:00
Bartosz Taudul
4f735e1ae2
Extract callstack merging.
2021-11-27 15:06:58 +01:00
Bartosz Taudul
a02575322f
Collect child sample addresses.
2021-11-27 02:03:59 +01:00
Bartosz Taudul
4bde9022e1
Properly acknowledge unavailable symbol code.
2021-11-25 22:44:56 +01:00
Bartosz Taudul
abdd6020ba
No need to remember addresses of symbol code queries.
2021-11-25 22:35:43 +01:00
Bartosz Taudul
b4da047355
Don't filter out kernel symbols from code transfer.
2021-11-25 22:28:05 +01:00
Bartosz Taudul
8d65b190d6
Handle frame image dictionary creation failures.
2021-11-20 03:30:28 +01:00
Bartosz Taudul
641338cb3c
Remove postponed samples when they are handled.
2021-11-14 23:55:44 +01:00
Bartosz Taudul
710a488af0
Handle postponed samples with SortedVector.
2021-11-14 23:48:50 +01:00
Bartosz Taudul
f2380590f9
Limit server query space to 8K entries.
...
In the default configuration this limit is unlikely to be hit. On Windows the
send buffer is 64 KB, which results in ~5K entries. On Linux the buffer is a
bit higher and the number of entries is lower than 7K.
2021-11-14 18:14:52 +01:00
Bartosz Taudul
ffa8bf4d75
Use table instead of map to track reentrant calls.
2021-11-14 16:42:11 +01:00
Bartosz Taudul
cb004e9cc0
Sort source location zones only when needed.
2021-11-14 16:05:55 +01:00
Bartosz Taudul
e0872ce61b
Cosmetics.
2021-11-14 15:51:27 +01:00
Bartosz Taudul
864d7e4e47
Sort symbols list only when actually needed.
2021-11-14 13:05:05 +01:00
Bartosz Taudul
b978a7c652
Sort plot data only when needed (i.e. to draw).
2021-11-14 13:01:27 +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
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
f925da5e01
Handle fiber enter -> enter case (without leave in between).
2021-11-06 21:14:37 +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
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
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
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
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
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
Bartosz Taudul
bcfc4a4fa7
Fix message thread assignment in import-chrome.
2021-09-23 18:08:03 +02:00
Bartosz Taudul
9a22b8e83c
Cosmetics.
2021-06-23 20:43:46 +02: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
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
53111f9dd9
Save/load code symbol map.
2021-06-19 19:58:16 +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
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
d49da69972
Count kernel samples.
2021-06-17 01:47:19 +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
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
Bartosz Taudul
2d2a5c92fd
Increase symbol retrieval size limit to 128 KB.
2021-06-13 01:16:29 +02:00
Bartosz Taudul
ff54c29913
Save/load GPU timer overflow information.
2021-06-09 21:12:50 +02:00
Bartosz Taudul
27e61b8204
Remove not needed check.
2021-06-09 21:08:48 +02:00
Bartosz Taudul
b7b9912b10
Handle GPU timer overflows with heuristics.
2021-06-09 21:08:47 +02:00
Bartosz Taudul
9c2ea8a71f
Specify minimum length of subframe skip in one place.
2021-06-09 02:13:00 +02:00
Bartosz Taudul
86510c48e0
Use proper type.
2021-06-04 15:16:44 +02:00
Bartosz Taudul
3c31fb56a8
Allow range-limiting hardware samples.
2021-06-04 13:58:00 +02:00
Bartosz Taudul
a1acea0c50
Support hw sample times on server.
2021-06-04 13:38:45 +02:00
Bartosz Taudul
b7c5939bb8
Merge remote-tracking branch 'origin/master' into hw
2021-06-02 01:12:28 +02:00
Bartosz Taudul
94ec6a0d9d
Move TracyYield.hpp to common.
2021-05-31 02:19:35 +02:00
Bartosz Taudul
f8ccd8c40d
Move TracyStackFrames to common.
2021-05-23 23:51:56 +02:00
Bartosz Taudul
a6011cd1ad
Ignore intrinsic wrappers in callstack frames.
...
With gcc/clang the wrapper functions for intrinsics are annoyingly inserted at
top level of stack traces, making it hard to see the call site. Filter out all
known instrinsic headers.
2021-05-23 23:22:45 +02:00
Bartosz Taudul
c6f071a66a
Save and load hardware sample data.
2021-05-20 19:37:51 +02:00
Bartosz Taudul
227a8d1aee
Process additional hardware sample data.
2021-05-20 02:19:11 +02:00
Bartosz Taudul
3a0e12043d
Differentiate hw samples from code addresses.
2021-05-19 23:29:27 +02:00
Bartosz Taudul
3228e20c2e
Add hardware samples accessors.
2021-05-19 23:05:50 +02:00
Bartosz Taudul
373a2b66c6
Collect hardware sample data.
2021-05-19 23:05:33 +02:00
Bartosz Taudul
64ed3d057d
Add no-op dispatch of HW samples.
2021-05-19 21:09:55 +02:00
Bartosz Taudul
8219a0e4ca
Fix shift.
2021-05-15 18:39:01 +02:00
Bartosz Taudul
c91c7a7fd5
Use zstd dict for packing/unpacking frame images.
...
This only affects run-time memory usage and needs an offline calculation of
the dictionary. Results vary depending on similarity of image blocks.
agora 34.96 MB -> 28.21 MB
agora2 40.75 MB -> 34.14 MB
android-vk 36.21 MB -> 18.44 MB
astar3 44.72 MB -> 43.38 MB
clipper1 134.36 MB -> 52.16 MB
fi 50.82 MB -> 40.79 MB
fi-big 537.74 MB -> 469.54 MB
test 23.26 MB -> 1.87 MB
2021-05-15 18:06:44 +02:00
Bartosz Taudul
d555256546
Don't use separate texture compression context.
...
Previously it was needed, as saving could be made at the same time the UI was
active. Currently saving blocks UI access to data structures, as it possibly
may need to sort unsorted vectors.
2021-05-15 18:04:14 +02:00
Bartosz Taudul
a53f5702b1
Calculate frame images dictionary.
2021-05-15 18:03:50 +02:00
Bartosz Taudul
3d75bf653a
Add interface for frame images dict building.
2021-05-15 15:50:20 +02:00
Bartosz Taudul
7f1f929662
Decode PID and TID when generating imported thread names.
2021-05-15 13:08:51 +02:00
Bartosz Taudul
8ea02a4794
Cosmetics.
2021-05-15 13:03:42 +02:00
Bartosz Taudul
4f76fb2cda
Store location in SourceLocation during chrome import.
2021-05-11 01:37:59 +02:00
David Farrell
dcf33b51cf
Updated comment to say that both OpenGL _and_ Direct3D11
...
don't need per-zone thread id.
2021-05-01 16:31:06 -07:00
Bartosz Taudul
0e6a25fdd8
Directly compare time, with data piggybacked in low bits.
2021-05-01 15:04:56 +02:00
David Farrell
be963f184c
Change ev.ptr nullptr early-out to happen only when there is not a previous allocation for address 0. Custom memory pools (like custom allocators for Vulkan memory pools) can allocate at address 0, so the previous code would cause the Tracy server to alloc(0), free(0) (but early out), then on the next alloc(0) it would have a MemAllocTwiceFailure (because it skipped the free).
2021-04-21 11:53:55 -07:00
Bartosz Taudul
e189f596ac
Add no-statistics guards.
2021-04-18 22:59:10 +02:00
Bartosz Taudul
d234f4dbe4
Generate child sample data during capture.
2021-04-18 22:44:37 +02:00
Bartosz Taudul
a5afa2cb4e
Use correct address for child sample information.
2021-04-18 20:43:23 +02:00
Bartosz Taudul
34b80ac52f
Add child samples count getters.
2021-04-18 15:03:42 +02:00
Bartosz Taudul
df462f109d
Reconstruct child sample data.
2021-04-18 15:00:19 +02:00
Bartosz Taudul
4dc6222ba1
Add child samples data structure.
2021-04-18 14:42:35 +02:00
Bartosz Taudul
07996c16cf
Fix gcc 8.3 with LTO.
...
In member function ‘UpdateSampleStatisticsImpl’:
warning: argument 1 value ‘18446744073709551598’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
auto cfdata = (CallstackFrame*)alloca( ( fxsz-1 ) * sizeof( CallstackFrame ) );
^
2021-04-09 01:15:18 +02:00
Bartosz Taudul
8dd92f32af
Handle memory double allocation failure.
2021-03-09 22:19:42 +01:00
Bartosz Taudul
6d5710901c
Fix ZoneColor channel order.
2021-03-09 02:14:57 +01:00
Bartosz Taudul
18e893752b
Use SortedVector for source location zones.
2021-02-07 19:35:53 +01:00
Bartosz Taudul
c220177828
Do postponed work only when needed.
2021-02-07 18:29:29 +01:00
Bartosz Taudul
9bb1d13afa
Revert to non-shared mutex for data lock.
...
The main change here is that the UI will be unresponsive when a trace is being
saved when there's no capture being performed. Note that the UI was always
frozen during saving if the capture was live, due to how starvation is
prevented by the locks.
2021-02-07 18:11:36 +01:00
Bartosz Taudul
417d526581
Use SortedVector for plot data.
2021-02-07 15:52:08 +01:00
Bartosz Taudul
3400331de1
Check source file validity against executable time.
2021-02-06 22:59:07 +01:00
Bartosz Taudul
ad2062fb40
Last-resort source code transfer from client to server.
2021-02-04 00:45:00 +01:00
Bartosz Taudul
f97223e394
Rename ParamPingback to more generic AckServerQueryNoop.
2021-02-04 00:03:58 +01:00
Bartosz Taudul
c4a6f3f980
Save/load GPU context names.
2021-01-31 19:15:23 +01:00
Bartosz Taudul
7bb6114270
Process GPU context name messages.
2021-01-31 19:15:23 +01:00
Bartosz Taudul
8d39f91c6e
Save/load executable image mtime.
2021-01-31 17:51:16 +01:00
Bartosz Taudul
6c728f6d23
Cosmetics.
2021-01-31 17:24:41 +01:00
Bartosz Taudul
c08d591bf3
Use proper capstone include path.
2021-01-26 20:35:57 +01:00
Bartosz Taudul
81c91a87fc
Search in cache before issuing syscall.
2021-01-26 01:47:00 +01:00
Bartosz Taudul
ccf441176b
Merge pull request #168 from jkriegshauser/improve-import
...
Improve chrome import
2021-01-22 14:57:52 +01:00
joshuakr
c96f01956d
PR feedback: write the name into the tracy file
2021-01-21 18:33:59 -08:00
joshuakr
2920f97911
Imported Chrome traces bring over thread names
2021-01-21 17:26:00 -08:00
joshuakr
25a95d99c0
Imported chrome traces show the file name in the title bar
2021-01-21 17:25:53 -08:00
Bartosz Taudul
239a17deb9
Fix typo.
2021-01-22 02:17:12 +01:00
Bartosz Taudul
a4764141c6
Support serial callstacks when processing GPU zones.
2021-01-15 22:11:34 +01:00
Bartosz Taudul
d4c0d4fbb7
Rename CallstackMemory to CallstackSerial.
2021-01-15 20:49:39 +01:00
Bartosz Taudul
c66b2cb536
Process allocated source location GPU zones.
2021-01-15 20:33:45 +01:00
Bartosz Taudul
d827832d4d
Don't operate on short_ptr.
2021-01-15 20:25:07 +01:00
Bartosz Taudul
44020487d2
Keep zone begin implementations together.
2021-01-15 20:20:34 +01:00
Ben Vanik
7dfdad2e02
Adding ZoneColor to set a dynamic color override to an existing zone.
2020-11-27 20:12:24 +01:00
Bartosz Taudul
d0acee2a9a
Add missing default no-op to switch.
2020-11-23 22:58:40 +01:00
Bartosz Taudul
34e208368d
Add missing include.
2020-11-23 22:58:12 +01:00
Bartosz Taudul
de69fc9850
Check if plot data values are finite numbers.
2020-11-23 22:48:55 +01:00
Bartosz Taudul
a2f0f7754d
Fix integer types.
2020-10-02 19:30:01 +02:00
Bartosz Taudul
b6724bec3a
Ports are uint16_t.
2020-10-02 18:51:54 +02:00
Bartosz Taudul
a5e0336936
Add missing server query space updates to failure handling.
2020-09-30 16:48:59 +02:00
Bartosz Taudul
9d392d2c90
Process call stack frames during failure dispatch.
2020-09-30 15:57:14 +02:00
Bartosz Taudul
641649143c
Make symbol queries optional.
2020-09-30 15:49:29 +02:00
Bartosz Taudul
cecc3783a8
Handle single and second string data in failure dispatch.
2020-09-30 15:46:00 +02:00