Commit Graph

965 Commits

Author SHA1 Message Date
Bartosz Taudul
0d17d5eaaa
Remove dead code. 2024-09-14 01:04:03 +02:00
Bartosz Taudul
f387929653
No capture is needed. 2024-09-14 01:03:22 +02:00
Bartosz Taudul
2716311f51
Store die number in CpuThreadTopology. 2024-08-24 16:36:04 +02:00
Bartosz Taudul
357b557684
Add die to CPU topology data structures.
Drawing dies on the topology chart is a minimal effort for the time being.
An improved version will be added later on.
2024-08-22 20:26:11 +02:00
Bartosz Taudul
835ba9fddf
Pass fiber group hint to NewThread(). 2024-08-04 00:10:45 +02:00
Bartosz Taudul
0b74b14f88
Save thread group hint. 2024-08-03 20:23:26 +02:00
Bartosz Taudul
bdacfe7c37
Add a list of pending thread hints. 2024-08-03 20:10:36 +02:00
Bartosz Taudul
28a9750f8a
Process thread group hints. 2024-08-03 20:10:36 +02:00
Bartosz Taudul
1458a6ab23
Don't assert on a workarounded bad case. 2024-07-11 20:45:14 +02:00
Matias Kangasjärvelä
4bbe973e3a Fix source location payload source file string length calculation 2024-06-19 19:47:56 +03:00
Bartosz Taudul
be40c1e38e
Use strlen instead of pointer walking in the rest of places. 2024-06-16 18:20:16 +02:00
Andrew Woloszyn
0c7cbd1d03 Fix for assert in GetGpuSourceLocationZonesCntReal
When TRACY_NO_STATISTICS is defined, the assert in
GetGpuSourceLocationZonesCntReal will always get hit
as nothing is ever inserted in gpuSourceLocationZonesCnt
unless reading from a file.

Match the behavior with GetGpuSourceLocationZonesReal
to add the source location if it is missing.
2024-05-30 14:26:20 -04:00
Bartosz Taudul
d3da7dcecd
Fix out-of-bounds access on non-continuous frames. 2024-05-24 22:52:46 +02:00
Bartosz Taudul
afe5c8dfbe
Don't try to create FrameData in ProcessFrameMarkEnd(). 2024-05-23 19:48:33 +02:00
Bartosz Taudul
89f1fb4825
Terminate connection when memory limit is exceeded. 2024-05-05 21:04:26 +02:00
Bartosz Taudul
5f0cac546b
Pass memory limit to worker. 2024-05-05 20:50:03 +02:00
Bartosz Taudul
fee5982abd
Make InlineStackData non-static. 2024-05-04 14:42:40 +02:00
Bartosz Taudul
e77224975d
Update last time when callstack or hw samples arrive. 2024-03-26 20:48:52 +01:00
Bartosz Taudul
fc8fc80900
Drop support for pre-0.9.0 traces. 2024-01-02 20:08:41 +01:00
Bartosz Taudul
762582357b
Check if source location counts are in order when loading traces. 2023-12-31 14:16:50 +01:00
Bartosz Taudul
586c6bf166
Hook up source location overflow failures.
Note: not tested. Expect some off-by-one bugs. Control flow may fail. Oh no.
2023-12-31 13:06:51 +01:00
Bartosz Taudul
54ee77026f
Add source location overflow failures. 2023-12-31 12:58:56 +01:00
Bartosz Taudul
d01113150d
Calculate per-thread source location counts. 2023-12-20 16:42:37 +01:00
Bartosz Taudul
af73dba73e
Merge pull request #665 from tiago-rodrigues/trodrigues/offline_symbol_resolve
Add support for offline callstack symbol resolving
2023-11-27 16:53:22 +01:00
Ivan Molodetskikh
ad39a01de1
Don't error on frame end without start (#666)
With on-demand profiling we're very likely to connect in the middle of a
discontinuous frame and thus receive a frame end without any preceding
frame start. So don't error out in this case.
2023-11-19 19:09:58 +01:00
Tiago Rodrigues
687d681764 Instead of adding new method, make StoreString public 2023-11-19 06:32:17 -08:00
Tiago Rodrigues
f4f75eac64 Add support for offline symbol resolving by setting the "TRACY_SYMBOL_OFFLINE_RESOLVE=1" env var
- Add a tool "tracy-edit" that allows loading a tracy capture, patching symbols and recompress the result
- Add offline symbol resolvers for linux (using addr2line) and windows (using dbghelper)
2023-11-19 06:32:16 -08:00
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