Benoit Jacob
662d3c1ed5
some touch-ups
2020-11-12 21:05:24 -05:00
Benoit Jacob
89b184311d
polish error messages (not in Polish though)
2020-11-12 16:17:55 -05:00
Benoit Jacob
e2c1af9d5a
be graceful if CLOCK_MONOTONIC_RAW is not defined.
2020-11-12 14:19:07 -05:00
Benoit Jacob
de9b7acfcd
Make it work on non-android Linux.
2020-11-12 14:12:08 -05:00
Benoit Jacob
577b8712a3
add comments
2020-11-12 11:18:18 -05:00
Benoit Jacob
bd147e2dee
logging simplification
2020-11-12 11:18:18 -05:00
Benoit Jacob
f1a0e97bee
make it work
2020-11-12 11:18:18 -05:00
Benoit Jacob
bc49763888
start reintroducing support for profiling a non-root process.
2020-11-12 11:18:18 -05:00
Benoit Jacob
c2add4bc14
Simplify calling TraceWrite and consistently check its return value.
2020-11-12 11:18:18 -05:00
Benoit Jacob
a9c391b9e3
Remove the 'payload' stuff now that we're just doing IO.
...
This unifies the android and other-linux code paths.
The rationale for just doing IO now is as in the previous commit:
we need the whole process to be run as root, so we don't need to
isolate this particular IO in a separate `su -c` command anymore.
2020-11-12 11:18:18 -05:00
Benoit Jacob
ff6537abff
Make sampling work on current Android (no su -c).
...
The `su -c` approach does not work on current Android. It seems that
on current Android, access to /proc and /sys is restricted enough
that in practice, developers profiling on Android are likely running
the whole instrumented process as root anyway, so `su` shouldn't be
needed. (In particular, note that access to /proc/$pid is limited
to members of a `readproc` group).
2020-11-12 11:18:18 -05:00
Bartosz Taudul
e920b5cf64
Allow disabling call stack sampling.
...
Only on Windows for now.
2020-11-05 23:59:52 +01:00
Bartosz Taudul
4caaa325c2
Allow disabling context switch tracing.
...
Currently only on Windows.
2020-11-05 23:56:19 +01:00
Bartosz Taudul
a34abe646c
Allow disabling vsync capture.
2020-11-05 23:44:28 +01:00
Bartosz Taudul
d75503047c
Test whole call stack for non-canonical pointers.
2020-10-06 18:27:14 +02:00
Bartosz Taudul
fc1b03d67d
Remove non-canonical pointer at the end of sampled stack.
2020-10-02 22:14:33 +02:00
Bartosz Taudul
24c834bf8c
Don't set sample_max_stack with kernel headers < 4.8.
2020-09-15 17:38:35 +02:00
Bartosz Taudul
4dae36cb73
Don't use EVENT_FILTER_EVENT_ID, etc with SDK < Win 8.1.
2020-09-06 14:02:18 +02:00
Bartosz Taudul
9e51e3fa85
Remove unused variable.
2020-09-06 14:02:12 +02:00
Bartosz Taudul
411ca81786
Don't operate on reference.
2020-08-18 21:36:09 +02:00
Bartosz Taudul
9ba7381030
Small speedup for ReadNumber().
2020-08-18 20:07:15 +02:00
Bartosz Taudul
4d4b6c7ac9
Use memchr() to find newline in memory block.
2020-08-18 19:51:02 +02:00
Bartosz Taudul
28aae73f74
RingBuffer has const size, so use template.
...
This eliminates division.
2020-08-15 02:43:18 +02:00
Bartosz Taudul
16ad6ee2ac
Tune number of ETW kernel buffers.
2020-08-13 15:26:36 +02:00
Bartosz Taudul
9258e2ced0
Restore TSC usage on Linux.
2020-08-13 01:41:05 +02:00
Bartosz Taudul
98fe63b5eb
Increase sampling frequency to 10 kHz.
...
Works fine on bare metal.
2020-08-12 22:18:59 +02:00
Bartosz Taudul
f7574c5adc
Reduce ring buffer size to workaround sigbus on android.
2020-08-12 18:46:19 +02:00
Bartosz Taudul
649994706b
Use clock monotonic raw on Linux.
...
Because Linux kernel interfaces are fucking stupid.
2020-08-12 16:49:30 +02:00
Bartosz Taudul
d48b3187b1
Call stack sampling using perf events.
2020-08-12 16:49:30 +02:00
Bartosz Taudul
90ed18222a
Use proper allocator.
2020-08-12 01:30:22 +02:00
Bartosz Taudul
b1b7be0a46
Adjust kernel tracing threads priorities.
2020-08-12 01:27:59 +02:00
Bartosz Taudul
1f4bfb68a0
Increase Linux sys trace per-cpu buffer size to 4 MB.
2020-08-12 01:19:10 +02:00
Bartosz Taudul
f07eebebf7
ETW threads are time critical.
2020-08-05 15:34:39 +02:00
Bartosz Taudul
062bb3044f
No need for lean callstack sample message.
2020-07-26 14:28:13 +02:00
Bartosz Taudul
5d748f3568
Don't calculate known strings length.
2020-07-21 20:58:58 +02:00
Andrey Voroshilov
175ec3e3d8
Moving ThreadExitHandler to a commonly accessible space, adding thread handler usage to SysTrace worker threads
2020-07-18 18:24:49 -07:00
Bartosz Taudul
0da6342a86
Trace vsyncs.
2020-06-27 19:56:23 +02:00
Bartosz Taudul
1fff99ebb0
Fix memory leak.
2020-06-27 17:43:08 +02:00
ikrima
707117c04f
Build sanitization & Static analysis warning fixes
...
- Wrapping FORCEINLINE & WIN32_LEAN_AND_MEAN definess with ifndef bc other libraries may define it and trigger redefinition warning
- Possibly contentious given tone in the manual (:P) but removing variable shadowing in TracySysTrace.cpp
- Alternate Solution: Add #define TRACY_FORCE_SILENT_WARNINGS toggle-able flag. If flag is enabled, push/pop warning disables that have to be included in client code
2020-05-02 14:52:57 -07:00
Bartosz Taudul
b69aaf04e9
Add support for QPC timer.
2020-04-07 22:01:31 +02:00
Bartosz Taudul
8d9a611874
Get rid of unicode ifdefs.
2020-04-07 21:35:37 +02:00
Bartosz Taudul
69c5e667ae
Dynamically load Get/SetThreadDescription.
2020-04-07 21:33:03 +02:00
Bartosz Taudul
9b8eb69886
Apparently sampled call stacks may be empty.
2020-03-28 16:09:44 +01:00
Bartosz Taudul
6c0c508280
Ignore kernel-only stacks.
...
It is common to receive duplicate stack traces for the same timestamp
(and thread), one containing proper user-space stack, and the second one
containing only kernel frames. Discard the second one, as there's no
documentation how this should be interpreted and the kernel stack is
mostly useless.
2020-03-21 15:25:30 +01:00
Bartosz Taudul
c7afda2562
Exit processing loops when trace has stopped.
2020-03-10 18:56:49 +01:00
Bartosz Taudul
2b7f5091f1
Store sampling period.
2020-02-25 23:08:52 +01:00
Bartosz Taudul
24cd73e366
Fix linux tracing with long pids.
2020-02-23 18:23:53 +01:00
Bartosz Taudul
0fa1d25d98
Disable trace annotations.
2020-02-23 18:20:48 +01:00
Bartosz Taudul
d0930e9053
Use maximum possible sampling rate.
2020-02-22 19:08:15 +01:00
Bartosz Taudul
4502858407
Use maximum possible etw buffer size (1MB).
2020-02-22 18:52:38 +01:00