Commit Graph

1002 Commits

Author SHA1 Message Date
Bartosz Taudul
f4c95eb021
Load linux kernel symbols list. 2021-06-11 01:31:02 +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
9c2ea8a71f
Specify minimum length of subframe skip in one place. 2021-06-09 02:13:00 +02:00
Bartosz Taudul
e1c3babf43
Check whole ignore list on ARM. 2021-06-09 02:06:28 +02:00
Bartosz Taudul
c79bfa349f
Update ARM CPU parts list. 2021-06-04 19:41:59 +02:00
Bartosz Taudul
ecf0e3d587
Update apple devices list. 2021-06-04 19:16:51 +02:00
Bartosz Taudul
859aa3b2b0
Setup system tracing before launching profiler threads.
This makes sure that profiler threads are properly included in sample data on
Linux. This was previously working because sample capture was performed
system-wide. Now samples are only captured in client context, which includes
all spawned threads. Since this inclusion only works for threads which will be
spawned after the trace starts, no thread can be created before sampling setup
is done.
2021-06-04 14:07:46 +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
483d31c1f4
Ringbuffer tail is not updated by kernel. 2021-06-03 01:14:44 +02:00
Bartosz Taudul
eb38640114
Fix uninitialized pointer. 2021-06-03 00:53:49 +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
b7c5939bb8
Merge remote-tracking branch 'origin/master' into hw 2021-06-02 01:12:28 +02:00
Bartosz Taudul
f4d80a4f5f
Fix rpmalloc init for TRACY_MANUAL_LIFETIME path. 2021-05-31 22:55:30 +02:00
Bartosz Taudul
3da84d1579
Hide rpmalloc init behind thread local boolean. 2021-05-31 22:38:22 +02:00
Bartosz Taudul
b0fc0d5dcc
Check if rpmalloc has to be initialized before each operation.
The C++11 spec states in [basic.stc.thread] thread storage duration:

2. A variable with thread storage duration shall be initialized before its
   first odr-use (3.2) and, if constructed, shall be destroyed on thread exit.

Previously Tracy relied on the TLS data being initialized:
- During thread creation (MSVC).
- Or during first use in a thread, but the initialization was performed for
  the whole TLS block.

It seems that new compilers are more granular with how they perform the
initialization, hence rpmalloc init has to be checked before each allocation,
as it cannot be "folded" into, for example, initialization of the profiler
itself.
2021-05-31 02:31:42 +02:00
Bartosz Taudul
92fb197aac
Use weak compare, yield thread. 2021-05-31 02:22:13 +02:00
Bartosz Taudul
3feb2473a2
Fix rpmalloc on ios.
https://github.com/mjansson/rpmalloc/issues/146
2021-05-30 13:38:29 +02:00
Bartosz Taudul
4fc02f5680
Ignore intrinsic wrappers during code location resolution. 2021-05-24 00:02:44 +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
fef507dfa2
Merge remote-tracking branch 'origin/master' into hw 2021-05-22 02:05:47 +02:00
Bartosz Taudul
68948712b4
Don't sleep if queues are empty, but there's queries to handle. 2021-05-22 01:12:42 +02:00
Bartosz Taudul
1e6aedf9e6
Limit client query response rate.
Original idea by xavier <xavierb@gmail.com>
2021-05-22 01:05:06 +02:00
Bartosz Taudul
d7541bbdba
Allow disabling inline resolution on windows.
Original commit a6b25497 by xavier <xavierb@gmail.com>:

add TRACY_CALLSTACK_IGNORE_INLINES to tradeoff speed vs precision in win32 DecodeCallstackPtr()

SymQueryInlineTrace() is too slow in some cases:
300000 queries backlog getting processed at ~70 per second is prohibitive.

(without inlines resolution, it's more like ~20000 queries per second)
2021-05-21 22:27:35 +02:00
Bartosz Taudul
8ec08465ee
Add debug messages to perf event setup. 2021-05-21 01:47:45 +02:00
Bartosz Taudul
afcebb6e6a
Add debug print macros. 2021-05-21 01:47:31 +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