Commit Graph

938 Commits

Author SHA1 Message Date
Ivan Molodetskikh
41fc293043 Add GpuTimeSync event
Allows to resynchronise GPU and CPU timestamps during profiling.
2023-10-22 10:16:41 +04:00
Bartosz Taudul
4e1b198380 FreeBSD has alloca in stdlib.h. 2023-05-23 23:38:34 +02:00
Bartosz Taudul
5019f7d2b4 Force inline GetZoneEnd's fast exit path. 2023-05-01 01:28:32 +02:00
Bartosz Taudul
2e9d8f8215 Check if external threads are local.
For some unknown reason, local threads may be attributed to an external
process (at least when profiling on Windows). This causes some problems,
for example the CPU usage graph may show that CPU is pegged by some other
program, when it reality it is the profiled program that uses the CPU time.

Workaround by checking first, if the thread id is known to be local by the
profiler, i.e. if there were user-generated events originating from it.

This still leaves other things, such as the CPU data list, being wrong,
but the CPU data is meant to show raw TID -> PID mapping. If the source
data is wrong, there's not much to fix here.
2023-04-30 13:55:49 +02:00
Bartosz Taudul
ac29cffd3a Fix assert condition. 2023-04-20 21:41:15 +02:00
Bartosz Taudul
7797557e8c Don't pass memname parameter to functions handling allocation changes. 2023-04-16 18:12:14 +02:00
Bartosz Taudul
38b7aab4ef Remove unused parameters from various payload handling functions. 2023-04-16 18:08:48 +02:00
Bartosz Taudul
3b00e55235 Rename IsThreadStringRetrieved -> IsFailureThreadStringRetrieved.
IsThreadStringRetrieved() interface suggested that it can be used for
checking any thread state, as it had an uint64_t id parameter.

The implementation ignored this parameter and checked the status of
failure thread only. This was never an issue because the code using
this function was only checking for the failure thread state.

Fixed by renaming the function to explicitly state what it does and
removing the thread id parameter.
2023-04-16 17:49:21 +02:00
Bartosz Taudul
b64bab197a No need for GetZoneName() with GpuEvent + srcloc parameters. 2023-04-16 17:46:15 +02:00
Bartosz Taudul
1c13c1ee8f ThreadCompress::Load() doesn't need fileVer. 2023-04-16 17:17:07 +02:00
Bartosz Taudul
f60e51c91b Fix std::move() usage. 2023-04-16 16:47:47 +02:00
Bartosz Taudul
33a640f848 Name worker threads. 2023-03-25 22:14:34 +01:00
Bartosz Taudul
5eebc5d7cf Preprocess CPU usage.
Things of note: Worker::GetCpuUsage() functionality was moved to
TimelineItemCpuData::PreprocessCpuUsage().
2023-03-25 17:55:15 +01:00
Bartosz Taudul
7d69103444 Add plot type "power" and Watt format.
Note that this technically breaks backwards compatibility of trace files
for 0.9.2 builds. But, whatever, as it's not yet released.
2023-03-10 01:25:41 +01:00
Bartosz Taudul
69855c671f Process power usage messages. 2023-03-10 01:02:41 +01:00
Bartosz Taudul
a8cc3cb06b Use on demand flag in GetFirstTime(). 2023-03-04 00:33:52 +01:00
Bartosz Taudul
e92874c0bb Save "on demand" flag in traces.
Previously on demand mode was determined by frame offset parameter being
greater than zero. However, if the application is not pumping frames with
FrameMark macro, the frame index will never increase and the frame offset
parameter stay at zero. It is not possible to distinguish on demand traces
from normal ones in this scenario.

Fix by explicitly saving the on demand flag in trace file and employ the
previous logic to set the flag when importing older traces.
2023-03-04 00:11:32 +01:00
Bartosz Taudul
28199512cd Create first memory plot data point at first time. 2023-03-03 22:44:25 +01:00
Bartosz Taudul
c91b052c80 Add first time getter. 2023-03-03 21:48:34 +01:00
Bartosz Taudul
d47122586c Fix color channel names in source location message. 2023-01-23 01:23:15 +01:00
Bartosz Taudul
6652999a60 Fix color channels names in zone color message. 2023-01-23 01:18:54 +01:00
Bartosz Taudul
eb7c13e7bb Fix message color component names in the protocol.
Red and blue channels were mislabeled. Otherwise, coding and decoding was
performed correctly, as far as the color channel order described in the manual
is followed by the user.

No change to the binary protocol was made.
2023-01-23 01:07:07 +01:00
Bartosz Taudul
c59413ab56 Query jump and call target addresses.
This enables discovery of target function names (and recursively, their
bodies), even if such function has no samples and is not present in any
callstack.
2023-01-22 02:06:43 +01:00
sean
b597ab5a0a Fix: Don't let make_unique initialise data unnecessarily 2023-01-03 13:09:26 +01:00
Bartosz Taudul
bae7fb3e88 Drop support for 0.7.x traces. 2022-10-28 00:14:06 +02:00
Bartosz Taudul
b88ef29792 Make sure source file data is properly tracked. 2022-10-13 19:00:22 +02:00
Bartosz Taudul
fc85e46f31 Always fill source code query queue when performing a query.
Previous implementation made these two events separate.
2022-10-13 18:15:04 +02:00
Bartosz Taudul
c041b962c0 Construct fake callstack frames for code location data. 2022-10-12 00:27:12 +02:00
Bartosz Taudul
0b84b50d9f Remove locationCodeAddressList map from Worker.
Mapping of source code locations to code addresses is now performed
dynamically during disassembly in SourceView.
2022-10-12 00:13:07 +02:00
Bartosz Taudul
57e039f96c Restore building code symbol map. 2022-10-11 23:04:06 +02:00
Bartosz Taudul
383ecb6a12 Remove CodeLocation query and CodeInformation response. 2022-10-11 22:56:23 +02:00
Bartosz Taudul
ac6902501a Get location for address from callstack frame data. 2022-10-11 21:47:28 +02:00
Bartosz Taudul
4d0768ba9d Replace code location queries with callstack frame ones. 2022-10-11 21:40:45 +02:00
Bartosz Taudul
dff45f1dc1 Just one compression worker thread on emscripten. 2022-10-02 00:40:43 +02:00
Bartosz Taudul
23ebce2862 Implement checking if frames are in use. 2022-09-05 20:12:12 +02:00
jkriegshauser
59ae71df2b Import frame messages (#459)
Co-authored-by: Joshua Kriegshauser <joshuakr@nvidia.com>
Co-authored-by: Bartosz Taudul <wolf@nereid.pl>
2022-09-02 19:44:37 +02:00
Bartosz Taudul
8b75a3fab0 Fix callstackPayload overflow when data to read size was POT. 2022-09-02 18:52:32 +02:00
Bartosz Taudul
2f44f65e02 Don't copy short_ptr. 2022-09-02 18:47:13 +02:00
Bartosz Taudul
be392a76fb Move TracyVersion.hpp to common. 2022-08-27 16:05:36 +02:00
Bartosz Taudul
e8aaf5fa99 Run source file query on payloaded source locations. 2022-08-17 16:04:20 +02:00
Bartosz Taudul
d5a46f97c1 Release MemData. 2022-08-14 11:37:24 +02:00
Bartosz Taudul
259672abc6 Use proper type in StringKey initialization. 2022-08-08 18:47:11 +02:00
Bartosz Taudul
5a36782c83 Fix inline functions not being attributed to symbols.
Regression was introduced in commit 18112d3c6.
2022-07-31 12:38:24 +02:00
Bartosz Taudul
8b4385498d Process Vsync frame messages.
Version bump is required due to frame set name pointer hack.
2022-07-30 19:51:29 +02:00
Jiangping Xu
ad7c2cf5d8 fix tracy worker threads conflict 2022-07-27 11:44:19 -07:00
Bartosz Taudul
b026e09a09 Include custom color in plot configuration. 2022-07-24 13:42:25 +02:00
Bartosz Taudul
b2a94cbfa2 Set plot fill using configuration message. 2022-07-24 13:10:20 +02:00
Bartosz Taudul
dceb2399ee Set plot staircase using plot configuration message. 2022-07-24 13:09:45 +02:00
Bartosz Taudul
810f1573ac Use separate messages for transfer of different plot value types. 2022-07-24 13:00:36 +02:00
Bartosz Taudul
aeedf7de2d Save/load plot steps parameter. 2022-07-24 12:42:39 +02:00