Commit Graph

1132 Commits

Author SHA1 Message Date
Bartosz Taudul
f058ad01fc
Don't process ring buffers when not connected in on-demand mode. 2022-01-31 20:53:10 +01:00
hulakdar
e98f7e5019 Fix potentially unitialized value warning 2022-01-26 21:08:54 +02:00
hulakdar
9fda60820a Silence padding warnings, as this is intended behaviour 2022-01-26 21:08:54 +02:00
Bartosz Taudul
4731bb9ec1
Cast GetProcAddress() ptr to const void*. 2022-01-05 20:03:20 +01:00
Bartosz Taudul
621c68352b
Call RtlWalkFrameChain directly from inlined function. 2022-01-01 17:33:39 +01:00
Bartosz Taudul
e368266837
Add custom demangler interface. 2021-12-22 18:17:48 +01:00
Bartosz Taudul
2f0d4a7707
Merge pull request #294 from Lectem/symbols_post_init
Call SymLoadModuleEx for modules loaded after init (Fixes #293)
2021-12-22 16:36:08 +01:00
Bartosz Taudul
29dc2fadf9
Do not bail-out on software sampling failure. 2021-12-21 22:09:40 +01:00
Bartosz Taudul
f1fa352a13
/sys/kernel/debug/tracing/... files are accessible on android. 2021-12-21 21:10:17 +01:00
Bartosz Taudul
efae847690
Replace getline(). 2021-12-21 20:28:18 +01:00
Bartosz Taudul
7f10265e34
Keep ring buffer size unsigned. 2021-12-21 20:24:52 +01:00
Bartosz Taudul
81ae7c06b8
Android libstdc++ is really stupid, it seems. 2021-12-21 19:56:32 +01:00
Bartosz Taudul
5741bcfd32
Make ring buffer size adjustable.
If call stack capture is enabled for context switch data, the 64KB buffer is
too small to work without overruns. However, if the default buffer size is
increased, then the maximum locked memory limit is hit.

This change keeps the small buffer size for all the buffers that may be used
without escalated privileges. The context switch buffer is bigger, but it does
not need to obey the limits, as the application is running as root, if it is
to be used.
2021-12-21 15:48:40 +01:00
Bartosz Taudul
d88bf2c7a8
Separate message type for context switch callstack samples. 2021-12-21 14:05:07 +01:00
Bartosz Taudul
0ba2c0a86e
Collect context switch callstack on Linux. 2021-12-21 13:59:16 +01:00
Bartosz Taudul
0c041795b6
Move Linux calltrace processing to a separate function. 2021-12-21 13:58:43 +01:00
Bartosz Taudul
4a89a30556
Implement checking if any TID is within current process. 2021-12-21 13:52:52 +01:00
Bartosz Taudul
b8d7824a4f
Increase ring buffer size. 2021-12-21 13:27:08 +01:00
Lectem
5d0466b729 Rename GetModuleName and call it before sym* use 2021-12-12 14:32:24 +01:00
Lectem
17855cbac5 Call SymLoadModuleEx for modules loaded after init
This fixes issue #293. Symbols are not loaded if the module is loaded dynamically after the SymInitialize call.
This may stall the symbol resolver thread a bit the first time a module is loaded.
2021-12-08 21:30:06 +01:00
Bartosz Taudul
14cdf3d43e
Use perf_event_open for context switch tracking. 2021-12-05 12:02:28 +01:00
Bartosz Taudul
0a3da9efdb
Optional CPU idx storage in RingBuffer. 2021-12-05 03:03:14 +01:00
Bartosz Taudul
6a0d233613
Proper mmap failure detection. 2021-12-05 01:32:33 +01:00
Bartosz Taudul
22284d57e7
Don't identify samples if there will be no context switches. 2021-12-05 01:32:30 +01:00
Nathan Day
bdafd0c7b6 Added IsConnected C API Equivalent 2021-12-04 16:55:41 +00:00
Bartosz Taudul
20f8c8b8a4
Add IdentifySamples flag to the protocol.
On Windows there is no way to distinguish callstack data coming from random
sampling and from context switches. Each callstack timestamp has to be matched
against the context switch data in order to decide its origin. This is
obviously non-trivial.

On some other platforms, the origin information may be available right away,
in which case the process of matching against the context switch data, which
possibly includes postponing callstacks for processing in the future, may be
completely omitted.
2021-12-04 14:50:25 +01:00
Bartosz Taudul
2008c88983
Silence compiler warnings. 2021-12-04 13:41:55 +01:00
Bartosz Taudul
74e2a63516
Don't require time to be available for samples. 2021-12-02 01:29:22 +01:00
Bartosz Taudul
051b1ba8f5
Display sampling disabled message on debug log channel. 2021-12-02 00:49:01 +01:00
slembcke
87a727dd7f Add fibers to TracyC.h 2021-11-26 16:49:39 -06:00
Bartosz Taudul
d41447b0c9
Pass full module path to LoadLibraryEx(). 2021-11-25 23:27:20 +01:00
Bartosz Taudul
a27d1902ae
Store paths to kernel modules. 2021-11-25 23:27:05 +01:00
Bartosz Taudul
8428ede59d
Retrieve kernel symbols on Windows. 2021-11-25 23:12:41 +01:00
Bartosz Taudul
4bde9022e1
Properly acknowledge unavailable symbol code. 2021-11-25 22:44:56 +01:00
Bartosz Taudul
e8fb2abb2a
Dispatch kernel code retrieval. 2021-11-25 22:27:35 +01:00
Bartosz Taudul
01db142144
Rpmalloc is initialized here. 2021-11-25 22:23:28 +01:00
Bartosz Taudul
1ed174c1b6
Expose GetModuleName() outside TracyCallstack.cpp. 2021-11-25 21:56:13 +01:00
Bartosz Taudul
2bd1e5bca7
Merge pull request #283 from expenses/c-gpu-zones
Implement a bare-bones C API for graphics profiling
2021-11-24 12:50:20 +01:00
Ashley Ruglys
2db109ab98
Add serial functions 2021-11-24 11:56:43 +01:00
Ashley Ruglys
2995db4b5e
Remove the 'active' argument 2021-11-24 11:45:37 +01:00
Bartosz Taudul
cad65ab52f
Handle magic dbghelp line numbers.
https://github.com/Microsoft/microsoft-pdb/issues/16
https://docs.microsoft.com/en-us/archive/blogs/jmstall/line-hidden-and-0xfeefee-sequence-points
2021-11-20 17:09:20 +01:00
Bartosz Taudul
bbbd78883c
Allow crash signal selection by user. 2021-11-18 20:20:10 +01:00
Ashley Ruglys
bf1896f6ba
memset the thread to 0 when writing the GpuZoneEnd as this seems to prevent an assert failure 2021-11-17 18:14:57 +01:00
Ashley Ruglys
cc45865239
Small formatting changes 2021-11-17 11:31:02 +01:00
Ashley Ruglys
91b4058dc4
Implement bare-bones functionality for gpu contexts in the C api 2021-11-17 11:27:52 +01:00
Bartosz Taudul
590a4afb89
Full dequeue is needed to handle symbol queries. 2021-11-14 19:24:05 +01:00
Bartosz Taudul
a5f5dcc00f
Remove capacity safeties. 2021-11-14 18:52:57 +01:00
Bartosz Taudul
5306034893
Remove unused methods. 2021-11-14 18:52:27 +01:00
Bartosz Taudul
9055a31156
Decrease number of SPSCQueue items to 8K.
This matches the query limit set on the server.
2021-11-14 18:51:11 +01:00
Bartosz Taudul
a203eb5aef
Adapt to SPSCQueue interface. 2021-11-14 18:50:59 +01:00