1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00
Commit Graph

125 Commits

Author SHA1 Message Date
Bartosz Taudul b6f155bb6a Move debuginfod include to TracyCallstack.hpp. 2022-05-02 01:12:34 +02:00
Bartosz Taudul f540f3ad89 Remove accidentally committed line. 2022-05-02 01:12:34 +02:00
Bartosz Taudul 726b70b683 Add debuginfod context accessor. 2022-05-02 01:12:33 +02:00
Bartosz Taudul ae373b4050 Implement build id retrieval by image name. 2022-05-02 01:12:33 +02:00
Bartosz Taudul 20cfdc3022 Save executable file names next to build identifiers. 2022-05-01 12:43:15 +02:00
Bartosz Taudul 6b10ed0af7 Remove debug info retrieval and download separation.
Retrieval of the descriptor has to be performed in a single step. Finding out
what is missing and then downloading in bulk is not possible, as libbacktrace
caches the returned descriptors.
2022-04-30 23:23:20 +02:00
Bartosz Taudul 4549671caa Collect and issue debuginfod requests.
Build identifiers stored in vectors are searched linearly. While not optimal,
this is enough for a basic implementation. In the future binary search option
may be explored, to see if it is worthwhile. Possible gains wouldn't be
significant, due to relatively small amount of debug info modules to handle.

Debug info descriptor requests that have not yet been checked for (i.e. not in
the s_di_known vector) are stored in the s_di_pending vector. When a check is
performed from within a libbacktrace callback handler, there are some unknown
problems with downloading data. Hence, the download process is delayed to be
performed at a later time. The debug info descriptors retrieval can be then
repeated.
2022-04-30 21:35:14 +02:00
Bartosz Taudul d9fb5c71eb Add debug info data structures. 2022-04-30 20:07:47 +02:00
Bartosz Taudul 8b477291f2 Initialize debuginfod session. 2022-04-30 19:19:00 +02:00
Bartosz Taudul 532c5a240c Add no-op callstack cleanup procedure. 2022-04-30 19:18:52 +02:00
Bartosz Taudul 0b1e5d2c96 Define ___tracy_demangle on Android. 2022-03-11 15:40:56 +01:00
hulakdar e98f7e5019 Fix potentially unitialized value warning 2022-01-26 21:08:54 +02: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
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 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 1ed174c1b6 Expose GetModuleName() outside TracyCallstack.cpp. 2021-11-25 21:56:13 +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 af5da6f53c Move inline string copy helpers to a separate header. 2021-10-22 21:53:46 +02:00
Bartosz Taudul 93b6fd72c3 Keep lock until we're done with the data. 2021-10-21 01:31:03 +02:00
Bartosz Taudul 4348c5428d Returned strings may be invalidated, so copy them. 2021-10-21 01:30:17 +02:00
Bartosz Taudul 07bc665d8c Drop support for Cygwin. 2021-10-07 23:28:40 +02:00
Bartosz Taudul 32b1e8dcb0 No kernel symbol on macos. 2021-06-20 19:35:05 +02:00
Bartosz Taudul c445c3805c Merge remote-tracking branch 'origin/master' into hw 2021-06-20 11:13:02 +02:00
Andrey Voroshilov 5670493757 Fix compilation warning 2021-06-19 23:26:03 -07:00
Bartosz Taudul ee13d3fa44 Retrieve address of symbol, not first instruction in line. 2021-06-19 19:52:33 +02:00
Bartosz Taudul 3ce2f6209a Return symbol address in DecodeCodeAddress(). 2021-06-19 19:02:08 +02:00
Bartosz Taudul 7086f2db65 Merge branch 'master' into hw 2021-06-17 01:37:10 +02:00
Bartosz Taudul fde62b4e6e Dynamically load some dbghelp functions. 2021-06-17 01:34:45 +02:00
Bartosz Taudul 50e0d4781b No kernel cache on cygwin. 2021-06-16 00:51:30 +02:00
Bartosz Taudul f1bf663160 Load kernel symbols. 2021-06-15 21:28:32 +02:00
Bartosz Taudul 2d5f6a411c Add windows kernel module discovery. 2021-06-15 21:28:32 +02:00
Bartosz Taudul 8fa9860764 Load windows device drivers list. 2021-06-15 21:28:31 +02:00
Bartosz Taudul bdb11f6e48 Use same kernel module name as on Linux. 2021-06-15 02:31:51 +02:00
Bartosz Taudul 4dc05ab858 Implement retrieval of kernel symbol names. 2021-06-12 15:27:35 +02:00
Bartosz Taudul f4c95eb021 Load linux kernel symbols list. 2021-06-11 01:31:02 +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 4fc02f5680 Ignore intrinsic wrappers during code location resolution. 2021-05-24 00:02:44 +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 3d2ff4ffd1 Add support for user-provided dbghelp locks. 2020-10-28 20:04:37 +01:00
Bartosz Taudul 960c7fb1b9 Don't alias struct names in client and server. 2020-08-20 17:38:29 +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 65314e0c90 Set proper SymbolData contents on symbol retrieval error. 2020-06-04 17:46:39 +02:00
Bartosz Taudul 54eb75b063 Report symbol entry address in inline function discovery. 2020-05-30 15:38:59 +02:00
Bartosz Taudul 91bb392678 Avoid executing strlen() twice in assert-enabled builds. 2020-05-10 15:55:12 +02:00
Rokas Kupstys 04eaf358d0 Fix linking error in some configurations. Unresolved CallTrace symbol was observed in static MSVC RelWithDebInfo build (but not in debug build). 2020-05-05 13:23:46 +03:00