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

6616 Commits

Author SHA1 Message Date
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
Bartosz Taudul 066c266df9 Add missing includes. 2022-04-26 22:01:09 +02:00
Bartosz Taudul 1a94929780 Use clang to make VS Code builds.
This should improve build times to take only ~65% of time.
2022-04-26 21:19:56 +02:00
Bartosz Taudul 1f3ebc9f41 Use item spacing instead of ExtraLineHeight. 2022-04-26 21:11:38 +02:00
Bartosz Taudul d56741cbeb Stop pretending to not require additional fonts. 2022-04-25 23:29:44 +02:00
Bartosz Taudul e0897e8e40 Draw wait reason/state explanation with small font. 2022-04-25 03:05:12 +02:00
Bartosz Taudul b59739fac2 Update launch configurations. 2022-04-24 16:07:49 +02:00
Bartosz Taudul 3b33a49bd8 Setup VS Code build tasks. 2022-04-24 16:07:49 +02:00
Bartosz Taudul 2dd61aba49 Makefiles can now build clangd database.
Executing the "make db" will run the build process of the selected tool or
library through the bear wrapper (which has to be available in the system),
which will record the compilation parameters of each source file. This
database can be then used by VS Code to set the proper defines and find all
the required includes.

Note that database building is performed in context of the specific tool or
library. Not all tools have the same set of flags.
2022-04-23 23:46:55 +02:00