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

6459 Commits

Author SHA1 Message Date
Bartosz Taudul 6c33a23390 Merge pull request #333 from sideeffects/opencl_transient
Add transient OpenCL Zones.
2022-02-27 23:19:11 +01:00
johner 194471487d Update TracyOpenCL.hpp
Add transient OpenCL Zones.
2022-02-27 15:53:24 -06:00
Bartosz Taudul a0ae37a350 Merge pull request #332 from Lectem/cmake_options
CMake: Add missing options
2022-02-23 22:39:19 +01:00
Clément Grégoire f4f558bdc9 CMake: New description for TRACY_CALLSTACK 2022-02-23 14:29:20 +01:00
Clément Grégoire d48fdafde7 Fix IPV4 -> IPv4 typo 2022-02-23 14:16:50 +01:00
Clément Grégoire 92a0feb821 CMake: Add the new TRACY_NO_CALLSTACK option 2022-02-23 14:09:04 +01:00
Clément Grégoire 2844fea858 CMake: Add missing options 2022-02-23 10:58:31 +01:00
Bartosz Taudul a43da3dc13 Update manual. 2022-02-22 21:26:55 +01:00
Bartosz Taudul 6e1d4a7ec1 Update NEWS. 2022-02-22 21:26:55 +01:00
Bartosz Taudul e2b0268d7a Allow disabling callstack handling. 2022-02-22 21:26:55 +01:00
Bartosz Taudul d318f75123 Merge pull request #325 from BrychDaneel/automatic_timer_fallback
Automatic timer fallback
2022-02-21 13:47:50 +01:00
Daniil Brychikov a9ba1ce688 Codestyle fixes 2022-02-19 11:44:15 +03:00
Daniil Brychikov 73f6c66cde Automatic timer fallback 2022-02-16 15:18:45 +03:00
Bartosz Taudul 46d2977694 prev_state is long. 2022-02-14 22:34:20 +01:00
Bartosz Taudul 9f2ffb05ac Check if memory can be allocated in a thread.
Consider running the following code with operator new and delete overloaded to
track allocations with call stacks:

std::thread( []({ thread_local std::string str; });

Each call stack requires a memory allocation to be performed by the profiler,
to make the stack available at a later time. When the thread is created, the
TLS block is initialized and the std::string buffer can be allocated. To track
this allocation, rpmalloc has to be initialized. This initialization also
happens within the TLS block.

Now, when the thread exits, the heap managed by rpmalloc may be released first
during the TLS block destruction (and if the destruction is performed in
reverse creation order, then it *will* be destroyed first, as rpmalloc was
initialized only after the std::string initialization, to track the allocation
performed within). The next thing to happen is destruction of std::string and
release of the memory block it contains.

The release is tracked by the profiler, and as mentioned earlier, to save the
call stack for later use, a memory allocation is needed. But the allocator is
no longer available in this thread, because rpmalloc was released just before!

As a solution to this issue, profiler will detect whether the allocator is
still available and will ignore the call stack, if it's not. The other
solution is to disable the rpmalloc thread cleanup, which may potentially
cause leak-like behavior, in case a large number of threads is spawned and
destroyed.

Note that this is not a water-tight solution. Other functions will still want
to allocate memory for call stacks, but it is rather unlikely that such calls
would be performed during TLS block destruction. It is also possible that the
event queue will run out of allocated space for events at this very moment,
and in such a case the allocator will also fail.
2022-02-14 17:55:46 +01:00
Bartosz Taudul 793e6b0e29 Add rpmalloc thread state accessor. 2022-02-14 17:53:27 +01:00
Bartosz Taudul 20680fa6a3 Keep track of rpmalloc thread shutdown state. 2022-02-14 17:52:33 +01:00
Bartosz Taudul 72ae4d2ee4 Merge pull request #326 from Lectem/install_namepace
CMake install should use the Tracy:: namespace
2022-02-12 01:14:52 +01:00
Bartosz Taudul 278878e4f1 Merge pull request #327 from Lectem/fix_cmake_uwp
Fix missing TracyUwp in the CMake headers install
2022-02-12 00:26:57 +01:00
Clément Grégoire 5a67fa99a7 Fix missing TracyUwp in the CMake headers install 2022-02-12 00:20:37 +01:00
Clément Grégoire 0b6c60de76 Since tracy provides the Tracy::TracyClient it should also install with that namespace 2022-02-11 23:58:47 +01:00
Bartosz Taudul 4084dec939 Update AUTHORS. 2022-02-11 20:22:53 +01:00
Bartosz Taudul af136f8289 Update NEWS. 2022-02-11 20:21:32 +01:00
Bartosz Taudul a2d017c456 Merge pull request #324 from shapr3d/uwp_fix
Make Tracy usable in UWP applications
2022-02-11 20:20:18 +01:00
Balazs Kovacsics aa44cedcd2 Fix indentation 2022-02-11 17:14:16 +01:00
Balazs Kovacsics 85e16ee33a Add UWP platform limitations to manual 2022-02-11 14:14:27 +01:00
Balazs Kovacsics a0a56eaf9e Move TRACY_UWP define to own header 2022-02-10 20:26:45 +01:00
Balazs Kovacsics 7169f5f30a Fix compiling TracyClient.cpp on UWP with defined TRACY_ENABLE 2022-02-09 22:14:36 +01:00
Balazs Kovacsics 10b3d7ad82 Fix compiling TracyClient.cpp on UWP with undefined TRACY_ENABLE 2022-02-09 18:25:04 +01:00
Bartosz Taudul 92b182d47e Font Awesome is licensed under SIL OFL.
"In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files."
2022-02-08 21:30:49 +01:00
Bartosz Taudul fe927d63f7 Update to Font Awesome 6. 2022-02-08 21:27:51 +01:00
Bartosz Taudul 1a4f369d4a Backport 19471da from ImGui.
https://github.com/ocornut/imgui/issues/4920
2022-02-03 01:59:56 +01:00
Bartosz Taudul f058ad01fc Don't process ring buffers when not connected in on-demand mode. 2022-01-31 20:53:10 +01:00
Bartosz Taudul 361782f3fd Fix edge case triggered by mouse being out-of-window. 2022-01-29 15:53:50 +01:00
Bartosz Taudul df96293477 Create GPU source location zones stats entry, if not present.
In case of CPU statistics data, this entry is created during creation of a
source location. This won't be done for GPU zones, as it would needlessly
expand the number of held entries. This is assuming the number of GPU zones
is significantly less than the number of CPU zones.
2022-01-29 15:45:25 +01:00
Bartosz Taudul 32173dca29 Update NEWS. 2022-01-29 15:35:52 +01:00
Bartosz Taudul f4043d9bb8 Display GPU zone statistics. 2022-01-29 15:35:25 +01:00
Bartosz Taudul 45c7edcc96 GPU source locations zones data accessor. 2022-01-29 15:22:49 +01:00
Bartosz Taudul 6d55f79109 Save source location data counts. 2022-01-29 15:14:43 +01:00
Bartosz Taudul 2ca4b0058a Add AreGpuSourceLocationZonesReady() query. 2022-01-29 00:51:43 +01:00
Bartosz Taudul ba87929074 Perform GPU statistics reconstruction.
Note: Zone counts are currently being calculated, but they are not being
saved. Proper usage of this data (as is performed in the CPU counterpart)
would remove the possibility of insertion of new entries into the map in
ReconstructZoneStatistics().
2022-01-29 00:48:01 +01:00
Bartosz Taudul 7870ca9da6 Add GPU mutable children accessor. 2022-01-29 00:40:11 +01:00
Bartosz Taudul 7a1b9efc2f Add GPU statistics radio button. 2022-01-29 00:33:53 +01:00
Bartosz Taudul 28d029f820 Collection of GPU statistics. 2022-01-29 00:15:33 +01:00
Bartosz Taudul f9279afaec GPU zone counting. 2022-01-29 00:15:32 +01:00
Bartosz Taudul f1095bba12 GPU statistics data accessors. 2022-01-29 00:15:32 +01:00
Bartosz Taudul 8533bdf5f4 Add data structures for GPU statistics. 2022-01-29 00:15:31 +01:00
Bartosz Taudul fcced3c76a Don't call SameLine() twice in a row. 2022-01-29 00:15:31 +01:00
Bartosz Taudul 3ee91b909f Unify comparison for accumulation mode combo box. 2022-01-29 00:15:28 +01:00
Bartosz Taudul f3f5f1dab8 Merge pull request #313 from cloudhan/update-opencl
Update OpenCL
2022-01-28 12:01:00 +01:00