Bartosz Taudul
f2b0aadedc
Return external names, instead of sending them.
...
Note that the old function is still used by code, so this commit won't
compile.
2021-10-22 22:20:30 +02:00
Bartosz Taudul
250ef2cf6e
Change thread id size from 64 to 32 bits.
...
Both Windows and Linux use 32-bit thread identifiers. MacOS has a 64-bit
counter, but in practice it will never overflow during profiling and no false
aliasing will happen.
These changes are only done client-side and in the network protocol. The
server still uses 64-bit thread identifiers, to enable virtual threads, etc.
2021-10-08 00:42:52 +02:00
Bartosz Taudul
07bc665d8c
Drop support for Cygwin.
2021-10-07 23:28:40 +02:00
Michal Ziulek
789328f73d
Undo my previous change.
...
-D_WIN32_WINNT=0x601 must be defined when building TracyClient.cpp for mingw-w64 on Windows. In that case definitions I've added are not needed.
2021-09-17 11:34:40 +02:00
Michal Ziulek
ad97854f12
Fixed compile error when using zig cc.
2021-09-14 19:30:20 +02:00
Bartosz Taudul
7e1622083e
Use monotonic raw clock for hardware sampling.
2021-06-19 13:40:31 +02:00
Bartosz Taudul
6d03b18d1c
Don't filter out kernel frames on win32.
2021-06-15 01:40:21 +02:00
Bartosz Taudul
698e5f0210
Probe precise_ip for software sampling.
2021-06-13 01:21:09 +02:00
Bartosz Taudul
0a954fda87
Capture kernel frames on Linux.
...
Garbage frames ("markers") have to be filtered out.
2021-06-12 14:36:07 +02:00
Bartosz Taudul
ed50447f7a
Use alias for s_ring[i].
2021-06-12 13:13:53 +02:00
Bartosz Taudul
ca2130d56c
Process all data available in ring buffers.
2021-06-10 02:07:29 +02:00
Bartosz Taudul
5b7cd06840
Don't init rpmalloc, if we know it has been done already.
2021-06-10 01:48:11 +02:00
Bartosz Taudul
2765be92fb
Sample time for hardware samples.
2021-06-04 12:50:55 +02:00
Bartosz Taudul
1616411257
Use AVX2 to search in strings with 32-byte blocks.
2021-06-03 13:49:38 +02:00
Bartosz Taudul
348582d6e4
Search for string matches with 8-byte blocks.
2021-06-03 13:10:26 +02:00
Bartosz Taudul
f8bb24ed36
Search for a character in string in 8-byte blocks.
2021-06-03 12:47:00 +02:00
Bartosz Taudul
b79014f3ee
Optimize parsing numbers.
...
Don't read byte-by-byte, process data in 8-byte packets.
2021-06-03 00:27:01 +02:00
Bartosz Taudul
cfb6d0d2ae
Timestamp conversion might be temporarily unavailable.
2021-05-23 20:32:09 +02:00
Bartosz Taudul
233a0bb6d6
Set precise_ip to 0 for cache on Intel.
...
Fuck knows how this is supposed to work. perf_event_open() opens the
descriptor successfully, but it produces no samples, if precise_ip is not 0.
There are no such problems on ARM (where precise_ip is 3, but maybe it is not
supported at all on that architecture, again, fuck knows if), and on AMD
perf_event_open() does not succeed when precise_ip > 0.
2021-05-23 19:45:13 +02:00
Bartosz Taudul
b2d5fe8e1f
Reduce sampling frequency.
2021-05-23 19:03:11 +02:00
Bartosz Taudul
b1e4d16537
PIDs are no longer needed in samples.
2021-05-23 19:00:45 +02:00
Bartosz Taudul
bbd1c4505c
Restrict perf to return events only for the current PID.
2021-05-23 18:53:09 +02:00
Bartosz Taudul
4ad6f682c8
Exclude VM-related stuff.
2021-05-23 18:44:16 +02:00
Bartosz Taudul
fece23a32b
Set frequency, not period.
...
This enables sampling on ARM dev board.
2021-05-23 18:02:06 +02:00
Bartosz Taudul
7d3119cbac
Remove irrelevant flag.
2021-05-23 18:01:18 +02:00
Bartosz Taudul
34ca6d865e
Sample branches and cache more frequently.
2021-05-22 02:28:32 +02:00
Bartosz Taudul
c7026cbc1f
Reduce hw sample period.
2021-05-22 02:27:34 +02:00
Bartosz Taudul
089eda0be9
Precise_ip should be shared in each pair of counters.
2021-05-22 02:16:49 +02:00
Bartosz Taudul
8ec08465ee
Add debug messages to perf event setup.
2021-05-21 01:47:45 +02:00
Bartosz Taudul
4d668741eb
Probe for acceptable precise_ip value.
...
This is stupid, but it's exactly what perf does... Sigh.
2021-05-21 01:33:37 +02:00
Bartosz Taudul
bcb7b94272
Tid is not needed.
2021-05-20 02:39:22 +02:00
Bartosz Taudul
f0f3babacf
Set correct message types.
2021-05-20 02:27:36 +02:00
Bartosz Taudul
5f3d1c0faf
Sample cache and branch stats.
2021-05-20 02:15:23 +02:00
Bartosz Taudul
faf87809d7
Reduce hw sampling rate.
2021-05-20 01:48:52 +02:00
Bartosz Taudul
741de5c8fb
Allow disabling cycle/retirement sampling.
2021-05-19 23:38:32 +02:00
Bartosz Taudul
2e38e70049
Reduce hardware sampling perdiod. Don't sample time.
2021-05-19 23:21:21 +02:00
Bartosz Taudul
101cdd9b4b
Don't send thread id for hw samples.
2021-05-19 22:52:13 +02:00
Bartosz Taudul
7794443453
Collect CPU cycles and instruction retirement events.
2021-05-19 21:09:55 +02:00
Bartosz Taudul
16101571e0
Close perf_event file descriptor on exec.
2021-05-19 21:09:55 +02:00
Bartosz Taudul
9cd1b26bc7
Keep count of ring buffers separate from number of CPUs.
2021-05-19 21:09:55 +02:00
Bartosz Taudul
b7d52d2eab
Store RingBuffer identifier.
2021-05-19 21:09:52 +02:00
Bartosz Taudul
42a272edf5
Allow control of sampling frequency.
2021-05-11 18:31:20 +02:00
Bartosz Taudul
a6c6943a6c
Check if GetThreadDescription() is supported.
...
This functionality is available since Win 10 1607.
2021-05-04 16:13:42 +02:00
Bartosz Taudul
56f0bdd571
ARM doesn't follow x64 canonical address requirements.
2021-04-29 18:24:37 +02:00
Bartosz Taudul
505656df5a
Trace frame count may be zero.
2021-04-29 18:24:37 +02:00
Bartosz Taudul
1a1df0229d
Add missing include.
2020-12-26 14:48:31 +01:00
Bartosz Taudul
dab68b2f21
Manually initialize GUID structs.
2020-12-21 16:13:59 +01:00
Bartosz Taudul
063ad1f1d3
Check return value of EnableTraceEx2().
2020-12-21 15:41:01 +01:00
bjacob
dfdf70aea3
Fix shutdown with TRACY_NO_EXIT=1 on Android. ( #134 )
2020-11-26 20:33:54 +01:00
Bartosz Taudul
119e357dbf
Improve parsing of kernel tracing data.
2020-11-19 11:37:05 +01:00