Commit Graph

6774 Commits

Author SHA1 Message Date
Bartosz Taudul
6e6f19d8f7
Query debuginfod for source code. 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
324cab3d34
Merge pull request #377 from Net5F/net/build_option_fixes
Fix build options, add TRACY_TIMER_FALLBACK option.
2022-05-01 23:32:15 +02:00
Michael Puskas
a5ea07f107 Fix build options, add TRACY_TIMER_FALLBACK option.
Renamed TRACY_NO_SYS_TRACE -> TRACY_NO_SYSTEM_TRACING to match the
build flag name. Unlike the meson logic, the CMake logic directly
maps the option name to the build flag that is injected. With the
mismatched name, the flag wasn't being properly applied.

Added TRACY_TIMER_FALLBACK option to expose the same-named flag.

Moved signal.h include to get sigaction definition that was missing when
TRACY_NO_CALLSTACK was defined.
2022-05-01 13:52:27 -07:00
Bartosz Taudul
aa2bbfe5f9
Transfer executable image name in source file queries. 2022-05-01 14:30:18 +02:00
Bartosz Taudul
fd55c1e975
Pass symbol image name to CacheSource(). 2022-05-01 14:25:07 +02:00
Bartosz Taudul
33a6853423
Use big font to print save path. 2022-05-01 13:04:16 +02:00
Bartosz Taudul
ce4c83d45b
String length is known, use memcpy instead of strcpy. 2022-05-01 12:46:09 +02:00
Bartosz Taudul
20cfdc3022
Save executable file names next to build identifiers. 2022-05-01 12:43:15 +02:00
Bartosz Taudul
b4343d58f1
Pass filename to elf_open_debugfile_by_buildid.
This is not needed for anything at this moment, but it will become quite useful
soon.
2022-05-01 12:21:51 +02:00
Bartosz Taudul
89778fee9a
Free dl_iterate_phdr data immediately after use. 2022-05-01 12:18:39 +02:00
Bartosz Taudul
4f1af9deaa
Restrict debuginfod to Linux. 2022-05-01 01:04:05 +02:00
Bartosz Taudul
59a9dc80c4
Update manual. 2022-05-01 00:38:43 +02:00
Bartosz Taudul
4c3b106e5e
Update NEWS. 2022-04-30 23:29:42 +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
7e8961d2fc
Workaround dl_iterate_phdr problems.
The code now performs a dry run of a dl_iterate_phdr call, storing the results
in a vector. Then, the original processing loop is issued, but outside of
dl_iterate_phdr.

For possible cause of problems see:
https://github.com/libunwind/libunwind/issues/16
2022-04-30 23:15:16 +02:00
Bartosz Taudul
4559120821
Get descriptors using debuginfod, if not available otherwise. 2022-04-30 21:46:36 +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
bae12548c7
Enable debuginfod in test application. 2022-04-30 19:19: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
6d6b7c0989
Add test application build and run configuration. 2022-04-30 19:02:47 +02:00
Bartosz Taudul
d0be4fa784
Update profiler description. 2022-04-30 19:02:34 +02:00
Bartosz Taudul
d80ad500ee
Do not pass linker flags during compilation. 2022-04-30 19:02:06 +02:00
Bartosz Taudul
254e87cbac
Fix preprocessor syntax. 2022-04-30 19:00:54 +02:00
Bartosz Taudul
2ef014608f
Notify when software sampling setup has failed. 2022-04-29 19:13:40 +02:00
Bartosz Taudul
4c0dd704d8
There are situations in which inSym can be nullptr.
Don't know exactly how to reproduce this. Nevertheless, the capture was
produced in an usual way. This may be dependant on the exact client
configuration.
2022-04-29 19:13:34 +02:00
Bartosz Taudul
fc37f3c04c
Remove leftovers. 2022-04-29 19:13:26 +02:00
Bartosz Taudul
31b3212f76
The mold linker is not recognized by gcc. 2022-04-29 19:13:16 +02:00
Bartosz Taudul
3bc42faeb3
Fix clang test. 2022-04-29 19:13:09 +02:00
Bartosz Taudul
7d80c088fc
Use mold for even faster linking. 2022-04-29 19:12:43 +02:00
Bartosz Taudul
d71ecd5271
Make test program data generation rate more sensible. 2022-04-29 19:12:20 +02:00
Bartosz Taudul
18fec05e57
Merge pull request #375 from robertblaketaylor/master
Add flag to disable crash handler
2022-04-29 00:18:01 +02:00
Blake Taylor
aa7c1db6ad Merge branch 'master' of https://github.com/robertblaketaylor/tracy 2022-04-27 07:13:31 -07:00
Blake Taylor
8c5120ee5a Add flag to disable crash handler 2022-04-27 07:11:53 -07:00
Blake Taylor
5fb8b38f3a Add flag to disable crash handler 2022-04-26 21:19:56 -07:00
Bartosz Taudul
afd4cdec63
LTO + lld wants the compiler to be clang. 2022-04-27 02:33:22 +02:00
Bartosz Taudul
b10c83f358
Use lld linker, if available. 2022-04-27 02:17:16 +02:00
Bartosz Taudul
7f44eba2e9
Process command line parameters immediately after starting. 2022-04-27 01:51:30 +02:00
Bartosz Taudul
92dc52d530
Add --help message to GUI profiler. 2022-04-27 01:44:26 +02:00
Bartosz Taudul
1e35bbd54e
Join update thread before bailing out on bad input. 2022-04-27 01:39:51 +02:00
Bartosz Taudul
1b7e8c3520
Use ImGui keycodes. 2022-04-27 01:16:46 +02:00
Bartosz Taudul
0d547bf4db
Update ImGui to 1.87 + docking. 2022-04-27 00:49:37 +02:00
Bartosz Taudul
bc36f5ff27
Fix buffer overflow. 2022-04-26 22:42:54 +02:00
Bartosz Taudul
7493663e13
It's Debian, it's always Debian.
/usr/lib/gcc/x86_64-linux-gnu/9/include/cpuid.h:223:1: error: redefinition of ‘unsigned int __get_cpuid_max(unsigned int, unsigned int*)’
In file included from ../../client/TracyProfiler.cpp:108,
                 from ../../TracyClient.cpp:23:
/usr/lib/gcc/x86_64-linux-gnu/9/include/cpuid.h:223:1: note: ‘unsigned int __get_cpuid_max(unsigned int, unsigned int*)’ previously defined here
2022-04-26 22:19:32 +02:00
Bartosz Taudul
80d760d950
Define NEON data tables only if NEON is available. 2022-04-26 22:01:09 +02:00
Bartosz Taudul
95cf143336
Remove unused variables. 2022-04-26 22:01:09 +02:00
Bartosz Taudul
c9240c100d
Fix initialization order. 2022-04-26 22:01:09 +02:00