Commit Graph

4256 Commits

Author SHA1 Message Date
Bartosz Taudul
2f17e33851 Prevent duplicate callstack frame queries.
Callstack frames will now have nullptr as the value in the callstackFrameMap
map, as a way to signal that a query for given key is already pending.
Duplicate queries should no longer happen.

@slomp provided alternative implementation, which produced the following
results:

Queries made: 195,778
Duplicate queries skipped: 9,518,910

Co-authored-by: Marcos Slomp <slomp@adobe.com>
2025-07-18 01:16:46 +02:00
Bartosz Taudul
c704f909be Move duplication check into QueryCallstackFrame() to make things clear. 2025-07-18 01:15:16 +02:00
Bartosz Taudul
c4a6cf3456 Use contains() to check if map contains element. 2025-07-18 00:45:26 +02:00
Bartosz Taudul
f578d14553 Extract callstack frame query to a separate function. 2025-07-18 00:33:09 +02:00
Bartosz Taudul
38ff7a6697 Make sure count is right. 2025-07-18 00:24:23 +02:00
Bartosz Taudul
320eb67581 Assume callstackFrameMap can store null ptrs. 2025-07-18 00:23:43 +02:00
Bartosz Taudul
880c600506 Remove queue delay calibration.
This value is not used for anything, it was just a number displayed in
the UI without much meaning to anyone.

Operations on the queue during early init may not work correctly, stopping
some programs from running past the calibration loop.
2025-07-11 23:23:31 +02:00
jcl1234
791904a37f Fix FiberEnter start time always being processed as 0 2025-07-01 22:38:10 -05:00
Bartosz Taudul
71fc3bc747 Merge pull request #1040 from blegat/TimeToStringExact
Time to string exact
2025-05-19 12:57:45 +02:00
Benoît Legat
45f9ece0b1 Apply review comment 2025-05-18 09:30:38 +02:00
Clément Grégoire
c100b32b48 Fix crash when reaching the source location limit
Instead of crashing when reaching the maximum number of source locations, display an empty source location ( with "???" everywhere).
Keeping the assert for discoverability of the limit in debug, but ensure profiler won't crash later on (or in release).
2025-05-12 13:49:31 +02:00
Bartosz Taudul
5140a5a411 Merge pull request #1021 from siliceum/wakeup
Thread wakeup visualization
2025-05-10 13:55:51 +02:00
Tomaž Vöröš
a088ebe337 fix some buffer sizes 2025-05-10 00:27:32 +02:00
Benoît Legat
98c7768fd0 Add _int64_abs function 2025-05-06 17:49:01 +02:00
Benoît Legat
4f424dfea0 Fix TimeToStringExact with mininmal int64 input 2025-05-06 17:34:36 +02:00
Clément Grégoire
2c2d126967 Remove added spaces 2025-05-05 15:52:54 +02:00
Clément Grégoire
58401a93ab Fix file read when skipping context switches data 2025-05-05 15:29:30 +02:00
Clément Grégoire
296a3bb590 Add a comment about where to find KWAIT_REASON 2025-04-09 17:15:31 +02:00
Clément Grégoire
31859042bd Remove ContextSwitchData SetStartCpu and SetEndReasonState 2025-04-09 17:02:51 +02:00
Clément Grégoire
b6ec625ab4 Remove assert that would trigger on dropped CSwitch events 2025-04-09 14:45:03 +02:00
Clément Grégoire
4e282371bf Version 0.11.3 instead of 0.12.0 2025-04-08 13:51:32 +02:00
Clément Grégoire
6486d8147d Fix formating issues 2025-04-08 13:48:50 +02:00
Clément Grégoire
df76b376a7 Thread wakeup visualization
This PR does the following things:
- Allow to lock the highlighted thread using left mouse click or lane popup menu
- Add more descriptions for wait reasons in View::DecodeContextSwitchReason
- Stores the Wakeup CPU so that we may display it in the CPU data view
- `QueueThreadWakeup` now contains cpu and adjust info (currently unused). Fits in the padding, no struct size change.
- `QueueContextSwitch` now also contains thread priorities information (windows+linux) and CState (windows), but currently unused by the profiler. Fits in the padding, no struct size change.
- Fixes Linux `EventWakeup` which tries to remove PERF_SAMPLE_CALLCHAIN on the wrong member. Set the whole `perf_event_attr` explicitely instead.
- Fixes Windows ReadyThread event being dropped if triggered before the thread switches out (this is confirmed to be normal behaviour, probably due to thread being switched out but context switch actually happening later)
- Bumps tracy file version and protocol versions
2025-04-08 11:02:27 +02:00
Bartosz Taudul
c5dc5f4455 Bump zstd to 1.5.7, use CPM to download. 2025-02-19 23:47:37 +01:00
Dirk Eibach
8f25eaf54e Display zone values also in hex 2024-12-10 11:07:48 +01:00
Bartosz Taudul
84718101fe Use proper name for inline frames in flame graph. 2024-10-27 19:44:40 +01:00
Bartosz Taudul
9d2f874b02 Calculate flame graph begin times. 2024-10-27 11:58:23 +01:00
Bartosz Taudul
872367f068 Process memory pool discard events. 2024-10-21 18:22:22 +02:00
Bartosz Taudul
5454b3202d Bump capstone to 6.0.0-Alpha1. 2024-10-04 17:19:18 +02:00
Bartosz Taudul
346d8a45c6 Cache flame graph. 2024-09-29 00:26:00 +02:00
Bartosz Taudul
1c1faeff2d Replace parallel STL with PPQSort.
PPQSort is supposedly quite fast: https://github.com/GabTux/PPQSort

More importantly, it does not depend on TBB fuckery, so there's no longer
a need to link with an external library that people may or may not have.

The NO_PARALLEL_STL option is out, as it was provided solely to deal with
TBB being not available. Sequential sorting is still used on emscripten.
2024-09-26 14:41:59 +02:00
Bartosz Taudul
717605065a Mark comparators const. 2024-09-26 14:04:20 +02:00
Bartosz Taudul
19960c0287 Fix invalid memory read when pointers are not 64-bit.
Fixes invalid read on emscripten.
2024-09-22 13:36:15 +02:00
Bartosz Taudul
0b5b674e1f Fix indentation. 2024-09-20 01:02:48 +02:00
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
b6eb08befe Use algorithmic and vectorizable BC1 index fixup. 2024-08-21 22:23:16 +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
Bartosz Taudul
277ec25a8d Spin when waiting for decompressed data instead of using lock + cv. 2024-06-02 15:06:16 +02:00
Bartosz Taudul
ce240ddfc1 Loading multi-stream data. 2024-06-02 14:32:33 +02:00
Bartosz Taudul
048ff8213a Support loading single-stream new format traces. 2024-06-02 14:32:32 +02:00
Bartosz Taudul
eb1cbb454a Move common file buffer sizes to a separate header. 2024-06-02 14:32:32 +02:00