Bartosz Taudul
99e68715c7
Include SIGABRT in crash handling.
2021-02-07 19:04:48 +01:00
Bartosz Taudul
ad2062fb40
Last-resort source code transfer from client to server.
2021-02-04 00:45:00 +01:00
Bartosz Taudul
3376620919
Move server query acknowledgement to a separate function.
2021-02-04 00:03:58 +01:00
Bartosz Taudul
f97223e394
Rename ParamPingback to more generic AckServerQueryNoop.
2021-02-04 00:03:58 +01:00
Bartosz Taudul
253c3ae4c8
Android applications spawn through a common executable.
...
/proc/self/exe -> /system/bin/app_process64
2021-02-01 15:26:34 +01:00
Bartosz Taudul
f89fd4ab04
Executable path discovery on BSDs.
2021-01-31 20:27:32 +01:00
Bartosz Taudul
a795c21962
Get process executable path on macos.
2021-01-31 19:34:39 +01:00
Bartosz Taudul
7f5810dfd6
Add GPU context name transfer to the protocol.
2021-01-31 18:46:42 +01:00
Bartosz Taudul
c92974d920
Send executable mtime in welcome message.
2021-01-31 17:45:31 +01:00
Bartosz Taudul
0ce113a96c
Check mtime of profiled executable.
2021-01-31 17:45:31 +01:00
Bartosz Taudul
2890f24c97
Implement getting process executable path.
2021-01-31 17:37:54 +01:00
Bartosz Taudul
a3bfbab6bd
Fix timer setup for fallback timer.
2021-01-29 11:20:23 +01:00
Bartosz Taudul
33ca38b581
Add a define for fallback timer usage.
2021-01-28 18:49:17 +01:00
Bartosz Taudul
b58358f81f
Cosmetics.
2021-01-28 18:49:12 +01:00
Bartosz Taudul
6b276a1a64
Init rpmalloc thread-local data when sending messages.
...
There was a possibility of having uninitialized TLS block there, if the first
thing done in a thread was sending a message.
2021-01-27 02:14:23 +01:00
Bartosz Taudul
90de2d2f73
Support queuing serial items with callstack.
2021-01-15 22:11:34 +01:00
Bartosz Taudul
d4c0d4fbb7
Rename CallstackMemory to CallstackSerial.
2021-01-15 20:49:39 +01:00
Bartosz Taudul
5a8d30ddc3
Add transient OpenGL zones.
2021-01-15 20:13:09 +01:00
Bartosz Taudul
3d37c686cf
Mark rprealloc as a part of Tracy API.
2020-12-27 14:11:45 +01:00
Bartosz Taudul
a467ef4c2b
Expose rpmalloc init/finalize functions.
2020-12-26 14:57:54 +01: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
Bartosz Taudul
2049332211
Broadcast to localhost if listening only on localhost.
2020-12-16 15:27:00 +01:00
AWoloszyn
064d264445
Fix switch for memory free.
...
Because of the layout difference between messageFat and
messageColorFat, this was referencing the text member
3-bytes offset from where it should have been.
2020-12-07 22:07:12 -05:00
Ben Vanik
7dfdad2e02
Adding ZoneColor to set a dynamic color override to an existing zone.
2020-11-27 20:12:24 +01:00
bjacob
dfdf70aea3
Fix shutdown with TRACY_NO_EXIT=1 on Android. ( #134 )
2020-11-26 20:33:54 +01:00
Benoit Jacob
fc8ef12a78
fix condition in LookUpMapping, and some cosmetic fixes
2020-11-23 11:56:08 -05:00
Benoit Jacob
d787636804
remove some useless inline keywords
2020-11-22 09:49:46 -05:00
bjacob
d05641d70c
Ensure that mappings have read permission before decoding symbols and reading code. ( #129 )
2020-11-21 21:05:39 +01:00
Bartosz Taudul
9facbe848c
Merge pull request #128 from philix/int_fixes
...
Fix integer type warnings
2020-11-19 17:17:08 +01:00
Felipe Oliveira Carvalho
c9865c5f95
Fix integer type warnings
...
This is necessary to compile Tracy-instrumented code in
codebases built with -Werror.
2020-11-19 16:36:01 +01:00
Bartosz Taudul
119e357dbf
Improve parsing of kernel tracing data.
2020-11-19 11:37:05 +01:00
bjacob
3fe4e7c3a7
Fix sampling on Android with default su
command. ( #123 )
2020-11-17 21:11:48 +01:00
Bartosz Taudul
09203905d6
Support memory pools in the C API.
2020-11-15 15:23:22 +01: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
8b4e03486d
Remove trailing whitespace.
2020-10-29 23:06:28 +01:00
Bartosz Taudul
e2515c6a99
Remove pre-C++11 compat macros from concurrentqueue.
2020-10-29 23:05:24 +01:00
Bartosz Taudul
3d2ff4ffd1
Add support for user-provided dbghelp locks.
2020-10-28 20:04:37 +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
bd31e3d2d6
Send callstacks before sending events they belong to.
2020-09-29 16:40:19 +02:00
Bartosz Taudul
8eb51aa01d
Get LFQ item before capturing callstack.
...
This is to ensure that thread local structures have been properly
initialized (lock-free queue buffers are thread local), as capturing
callstack involves allocating memory from rpmalloc, which must be
initialized in each thread before allocation.
2020-09-29 15:10:55 +02:00
Bartosz Taudul
24f25751ce
Prevent move and copy of ScopedZone.
2020-09-24 01:31:24 +02:00
Bartosz Taudul
4db092437c
Add support for custom allocator tracking to client.
2020-09-24 01:31:23 +02:00
Bartosz Taudul
593ce74042
Notify servers that client is no longer listening for connections.
...
This happens in these two cases:
- The client is exiting.
- A connection attempt is performed.
This message type is indicated by negative time value.
2020-09-20 22:20:33 +02:00
Bartosz Taudul
5c826c2723
Send signed active time in broadcast message.
...
This allows special treatment of negative values.
2020-09-20 22:15:10 +02:00
Bartosz Taudul
1e34b22a82
There's no QPC on non-windows systems.
2020-09-20 19:47:00 +02:00
Bartosz Taudul
24c834bf8c
Don't set sample_max_stack with kernel headers < 4.8.
2020-09-15 17:38:35 +02:00
Niclas Olmenius
607f988d1a
Remove unnecessary defines in concurrentqueue
...
Remove defines related to exceptions in
`tracy_concurrentqueue.h` as they are not used anywhere
2020-09-15 11:41:39 +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
f3eabc28e2
Don't handle crashes, if there's no connection.
2020-08-28 17:21:52 +02:00
Bartosz Taudul
960c7fb1b9
Don't alias struct names in client and server.
2020-08-20 17:38:29 +02:00
Bartosz Taudul
411ca81786
Don't operate on reference.
2020-08-18 21:36:09 +02:00
Bartosz Taudul
818d20d273
Don't use image name as a replacement for source file.
...
Image name is now reported separately.
2020-08-18 20:34:11 +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
c53a1f1dac
Extend ScopedZone to allow allocated srcloc construction.
2020-08-16 15:52:27 +02:00
Bartosz Taudul
5239b706c3
Allow disabling code transfer.
2020-08-16 01:31:54 +02:00
Bartosz Taudul
518ce1e946
No need to store two same pointers.
2020-08-15 13:40:36 +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
c0c9832713
Implement TSC conversion and caps checking in ring buffer.
2020-08-13 01:40:18 +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
c16200ac02
Add ring buffer for perf events.
2020-08-12 14:06:19 +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
6db581ff4e
Suppress warning.
2020-08-11 23:25:23 +02:00
Bartosz Taudul
f07eebebf7
ETW threads are time critical.
2020-08-05 15:34:39 +02:00
Bartosz Taudul
2682ae1af0
Add new apple devices.
2020-07-31 02:42:22 +02:00
Bartosz Taudul
a1ce31a226
Add some more ARM cpu ids.
2020-07-31 02:34:25 +02:00
Bartosz Taudul
be2ffb2023
Compile ARM CPU decoding functions only if used.
2020-07-31 01:51:31 +02:00
Bartosz Taudul
b696f1b466
GetHex() is only used on ARM linux.
2020-07-31 01:46:16 +02:00
Bartosz Taudul
2be3f1766f
Use constexpr instead of enum.
2020-07-31 00:58:59 +02:00
Bartosz Taudul
7e6a41e647
No need for lean alloc srcloc zone begin messages.
2020-07-26 14:35:04 +02:00
Bartosz Taudul
062bb3044f
No need for lean callstack sample message.
2020-07-26 14:28:13 +02:00
Bartosz Taudul
4252cac654
No need for lean callstack alloc message.
2020-07-26 14:25:32 +02:00
Bartosz Taudul
18713de70c
No need for lean frame image message.
2020-07-26 14:23:04 +02:00
Bartosz Taudul
b76726c597
No need for lean callstack, callstack memory messages.
2020-07-26 14:23:03 +02:00
Bartosz Taudul
14a15bf152
Order of lock events is now always well-defined.
2020-07-26 13:54:40 +02:00
Bartosz Taudul
3e3aa80fa7
Completely serialize lock events.
2020-07-26 13:46:05 +02:00
Bartosz Taudul
b7af9a0860
Reduce frame images frame index to 32 bit.
2020-07-26 13:46:05 +02:00
Bartosz Taudul
03f46d7228
Custom string data is no longer needed.
2020-07-26 01:47:49 +02:00
Bartosz Taudul
c0b73c248f
Add second single string transfer.
2020-07-26 01:47:49 +02:00
Bartosz Taudul
a7d2ab4d4f
Send single string for lock name.
2020-07-26 01:47:49 +02:00
Bartosz Taudul
e91950f006
Send single string for messages.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
5553761c02
Send single string for zone text and name.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
309a151610
Symbol length no longer has to be packed.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
88685440b6
Send single string for callstack frame.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
61e3acde06
Send single string for callstack frame size.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
06ca4e2d16
Send single string for symbol information.
2020-07-26 01:35:52 +02:00
Bartosz Taudul
14b180cd16
Send single string for code information.
2020-07-26 01:35:51 +02:00
Bartosz Taudul
81d5a8db5e
Implement transport of single string data.
...
In most cases only one string is sent per message and no pointer
tracking is needed.
This is only plumbing work, no changes to messages have been made yet.
2020-07-26 01:35:51 +02:00
Bartosz Taudul
02e7893c75
Preserve messages size.
2020-07-21 20:58:58 +02:00
Bartosz Taudul
9d01fa86ab
Preserve zone text, zone name string length.
2020-07-21 20:58:58 +02:00
Bartosz Taudul
5d748f3568
Don't calculate known strings length.
2020-07-21 20:58:58 +02:00
Bartosz Taudul
e4fbf60668
Add SendString() with length parameter.
2020-07-21 20:58:58 +02:00
Bartosz Taudul
346e5a426f
Mask out alpha channel on SSE and AVX2 paths.
2020-07-20 13:58:35 +02:00
Bartosz Taudul
7b00812fa7
Add missing rpmalloc include.
2020-07-19 13:04:51 +02:00
Bartosz Taudul
2bef3629b7
Merge pull request #74 from avoroshilov/manual-lifetime
...
Manual lifetime management for Multi-DLL
2020-07-19 12:06:11 +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
b8df7a1302
Expose m_isConnected in non-on-demand builds.
2020-07-16 11:22:06 +02:00
Andrey Voroshilov
cbfb19816b
Merge remote-tracking branch 'tracy/master' into manual-lifetime
...
# Conflicts:
# AUTHORS
2020-07-13 01:49:11 -07:00
Andrey Voroshilov
4c397ebe1e
Fixing some of the copy-paste errors
2020-07-12 10:12:50 -07:00
Andrey Voroshilov
3ae84647c4
Moving GetProfiler
back to the original place
2020-07-12 10:10:09 -07:00
Andrey Voroshilov
a758de2f03
Moving GetProfiler
back to the original place
2020-07-12 10:06:09 -07:00
Andrey Voroshilov
6b790d778d
Replacing removing spinlock that is not needed anymore, making TRACY_MANUAL_LIFETIME
a sub-option of TRACY_DELAYED_INIT
, and addressing feedback
2020-07-12 10:04:07 -07:00
Andrey Voroshilov
4d505f507b
Fixed rogue TAB indentation
2020-07-08 03:52:00 -07:00
Andrey Voroshilov
199dc46e7d
Fixing crash on exit due to RP malloc not being deinitialized
2020-07-08 03:50:25 -07:00
Andrey Voroshilov
71ca0683d6
Fixing preprocessor formatting
2020-07-08 03:48:37 -07:00
Bartosz Taudul
5e5bf928a5
Add QPC frequency query to API.
2020-07-07 21:25:35 +02:00
Andrey Voroshilov
6a72560989
Fixing functions case to match the source capitalization rules
2020-07-07 03:12:02 -07:00
Andrey Voroshilov
da5e58682f
Adding manual lifetime management to aid multi-DLL usecase
2020-07-07 00:39:09 -07:00
Bartosz Taudul
384e2e3fa1
Reduce memory requirements of allocated call stacks.
2020-07-05 17:33:29 +02:00
Bartosz Taudul
f718761905
Reduce allocated source location size by 2 bytes.
2020-07-05 17:11:15 +02:00
Bartosz Taudul
4179e85029
Add missing parameters.
2020-07-02 17:17:01 +02: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
Bartosz Taudul
4bbeb51e34
Add secure alloc/free macros.
2020-06-24 01:33:26 +02:00
Bartosz Taudul
530e464347
Add checker for profiler availability.
2020-06-24 01:32:57 +02:00
Bartosz Taudul
cf8620b956
Cosmetics.
2020-06-24 01:14:55 +02:00
Simonas Kazlauskas
b0d67064b5
Check for null FILE handles in ReportTopology
...
On Linux `/sys` is not guaranteed to exist. When it doesn't, tracy
would crash with a SIGSEGV due to a nullptr dereference. Not actually
sure how well tracy clients will handle the case where this information
is missing, though.
2020-06-21 20:14:05 +03:00
Bartosz Taudul
b353eb753b
Merge pull request #56 from nagisa/nagisa/fix-macos-build
...
Fix build on macos
2020-06-20 19:57:09 +02:00
Simonas Kazlauskas
b03da81afa
Fix build on macos
...
It was broken by a110b42011
.
In addition, adjust the CI definition to test builds on macOS.
2020-06-20 20:44:55 +03:00
Simonas Kazlauskas
29886435b4
___tracy_alloc_*
take pointer-size pairs
...
This enables better bindings in languages that do not have 0-terminated
strings for source/function name. It does not introduce any additional
overhead in languages that do use 0-terminated strings, either, but it
_is_ a breaking API change.
Fixes https://github.com/wolfpld/tracy/issues/53
2020-06-20 20:35:42 +03:00
Simonas Kazlauskas
a110b42011
Add ___tracy_init_thread function
...
This function needs to be called for each non-main thread before calling
the `___tracy_alloc_` functions.
Alternative way to achieve this could be initializing the allocator
transparently in the `___tracy_alloc_*` calls.
2020-06-20 04:22:32 +03:00
Bartosz Taudul
aa3b0de1f5
Use proper cpuid flag.
2020-06-10 16:25:19 +02:00
Bartosz Taudul
284d49b34b
Change rdtscp check to rdtsc check.
2020-06-08 19:35:42 +02:00
Bartosz Taudul
65314e0c90
Set proper SymbolData contents on symbol retrieval error.
2020-06-04 17:46:39 +02:00
Graydon Hoare
28a29d071f
only write SysTime::used if fscanf succeeds
2020-06-03 19:54:49 -07:00
Graydon Hoare
93b7b5a8e7
ensure regs is initialized even if cpuid fails
2020-06-03 19:54:48 -07:00
Bartosz Taudul
54eb75b063
Report symbol entry address in inline function discovery.
2020-05-30 15:38:59 +02:00
Bartosz Taudul
2b304581cf
Implement transfer of integral values for zones.
2020-05-24 16:13:09 +02:00
Bartosz Taudul
1bcde1f2ff
Only one branch.
2020-05-24 13:41:41 +02:00
kudansam
1151ec1328
Fix defines when compiling with -Werror=undef
...
Some ARM defines fail when compiling with -Werror=undef as they rely on
the missing define mapping to 0.
2020-05-22 15:48:59 +02:00
Thales Sabino
c2c234cf5a
Fix crash when running Tracy from DLLs
...
Instantiating Tracy from within a DLL will tie its internal threads life-time to the DLL. Windows does not guarantee
that threads will be alive after the main function. This has implications in the Profiler dtor since will try to perform
some deallocations, however, _memory_deallocate_large will try to get the heap of the current thread which can
be invalid at the point of shutdown causing a crash. Checking the pointer here will won't make TRACE_NO_EXIT
work, but it will prevent the Profiler from crashing.
2020-05-21 14:26:29 +01:00
Bartosz Taudul
4eb78f5c86
Auto-initialize profiler in delayed init scenario.
2020-05-19 13:55:54 +02:00
Bartosz Taudul
fad7e72fd4
Harden against uninitialized rpmalloc.
...
Initialize rpmalloc either by explicitly calling InitRPMallocThread(),
or by forcing initialization of thread local variables block.
2020-05-19 13:51:11 +02:00
Bartosz Taudul
665c6d6699
Don't check for allocation validity.
...
Will fail anyway right afterwards, if nullptr.
2020-05-16 16:40:25 +02:00
Bartosz Taudul
21c168156c
Restrict client to C++11.
2020-05-13 18:15:12 +02:00
Bartosz Taudul
e9f93f5bc7
Send lean frame images.
2020-05-10 20:16:08 +02:00
Bartosz Taudul
03b5dfacd6
Send lean callstack samples.
2020-05-10 20:00:51 +02:00