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

234 Commits

Author SHA1 Message Date
Marcos Slomp 6454b0bd65 removing windows/com header bloat 2023-09-11 12:07:42 -07:00
Marcos Slomp cf38d6a102 reworking context id initialization 2023-09-11 11:56:52 -07:00
Marcos Slomp 4f42a75df2 compressing redundant code 2023-09-11 11:53:33 -07:00
gan74 b979a3d26f Fixed Vulkan context running out of queries after 64k 2023-09-11 20:51:42 +02:00
gan74 2153973abe Fixed Vulkan query id generation not being thread safe 2023-09-11 15:12:58 +02:00
Bartosz Taudul 73da891805 Remove std:: qualifier from size_t. 2023-09-11 11:33:40 +02:00
xhe 4e771b2da0 adapt libbacktrace to musl
Signed-off-by: xhe <xw897002528@gmail.com>
2023-09-10 19:26:38 +08:00
Bartosz Taudul e23aa01d51 Merge pull request #612 from slomp/slomp/d3d12-tabs-to-spaces
D3D12 back-end: converting tabs to spaces
2023-09-09 23:29:12 +02:00
xyz1001 30fb2b5f89 Fix two bugs (#615)
* Fix wrong check for wcstombs return value
* Fix memory leak when call GetThreadDescription
2023-09-08 14:02:55 +02:00
Vincent Loppin 98de2ed1c4 Remove warning (unused parameters) 2023-09-07 10:06:42 +02:00
Marcos Slomp 393ea938c9 converting tabs to spaces 2023-09-06 08:47:57 -07:00
Mathias Lang c6d9741136 Fix and test TRACY_DEMANGLE for TracyClient
The configuration wasn't tested and stopped compiling.
This fixes it and adds a test to ensure it doesn't break again.
2023-09-06 01:28:58 +02:00
Marcos Slomp fc33fc010b typo 2023-08-31 13:09:34 -07:00
Marcos Slomp 2bdf0ee75d more power-efficient busy-wait 2023-08-30 09:09:46 -07:00
Marcos Slomp bac06853fe reworking the TracyD3D11 macros 2023-08-30 09:02:01 -07:00
Marcos Slomp dcd34397bd refactoring of the D3D11 back-end 2023-08-28 14:15:06 -07:00
Björn Blissing e1b1fd72dc Wrap std::numeric_limits<T>::max() in parenthesis
The windows.h header file defines the macro max. If the max macro is include
it will lead to name collisions with the std::numeric_limits<T>::max() function.

One solution is to define NOMINMAX before the inclusion of windows.h.
However, that might be a demanding task for a large codebase. Defining the
NOMINMAX as global define may also break previous code.

Another to solution to the problem is to wrap the numeric_limits function in
parenthesis to instruct the compiler to treat it as a function and not a macro.

This commit wraps the std::numeric_limits<T>::max() calls in the public
interfacing header files, with parenthesis.
2023-08-17 10:03:52 +02:00
menduz e05545b04a Fix mac compile for latest macos SDK
Following https://github.com/wolfpld/tracy/commit/3feb2473a2042337db65d3ff4c0dd17c8e69430f, `mach_vm.h` seems to have been deleted
2023-08-15 21:00:46 -03:00
Ястребков Дмитрий Ирикович de45af63cc Fix compilation for the case of using TRACY_NO_CALLSTACK 2023-07-31 11:40:12 +07:00
Andréa MACHIZAUD 47843918f4 Fix missing entries in tracy/TracyVulkan.hpp 2023-06-23 14:56:53 +02:00
Light7734 b9eb5f6bef fix: add missing #endif in 'TracyVulkan.hpp' 2023-06-22 09:31:33 +00:00
robertblaketaylor 1b65a87c32 Support use of dynamic vulkan symbols (#570) 2023-06-09 12:48:30 +02:00
sean ca61a1350a Fix: Missing TracyVkContextHostCalibrated overload with Tracy disabled 2023-05-21 21:47:25 +02:00
Bartosz Taudul 72cfa3e0d1 Fix copy pasta. 2023-05-04 15:16:46 +02:00
Bartosz Taudul 778d0cb3fb Socket::ReadUpTo() doesn't support timeouts. 2023-04-16 12:19:48 +02:00
Bartosz Taudul 77402eb9c2 libbacktrace: minor fixes for zstd decompression (cdb64b68) 2023-04-05 17:24:19 +02:00
Bartosz Taudul 0f19727dc6 libbacktrace: change PC variables from uint64_t to uintptr_t (afe2967c) 2023-04-05 17:23:04 +02:00
Cody Tapscott 6249999153 linux: respect TRACY_NO_SAMPLING for sys-tracing
This compile-time flag was being ignored on Linux. This change adds
gating for software-sampled stack trace sampling following the same
pattern as other `TRACY_NO_SAMPLE_*` options.

If `TRACY_NO_SAMPLING=1` is provided as an environment variable,
software stack sampling is also disabled.
2023-04-04 17:22:31 -04:00
Bartosz Taudul e2e55a77b5 Add TracySetProgramName() macro to set broadcast contents. 2023-03-30 21:51:00 +02:00
Bartosz Taudul 7d69103444 Add plot type "power" and Watt format.
Note that this technically breaks backwards compatibility of trace files
for 0.9.2 builds. But, whatever, as it's not yet released.
2023-03-10 01:25:41 +01:00
Bartosz Taudul 2971db21e3 Read and report power usage. 2023-03-10 00:23:09 +01:00
Bartosz Taudul c3e7157cd5 Detect power domains. 2023-03-10 00:05:18 +01:00
Bartosz Taudul 5e2e5eeefb Add system power use tracking skeleton. 2023-03-09 22:31:31 +01:00
Bartosz Taudul 7151c6afd9 Add support for configuring plots to C API. 2023-03-08 23:18:36 +01:00
Bartosz Taudul 22661f79de Merge pull request #532 from spnda/vulkan_host_ops
Add: Alternative Vulkan context constructor
2023-03-05 18:38:07 +01:00
sean c7ee536209 Add: Alternative Vulkan context constructor 2023-03-05 17:37:22 +01:00
Bartosz Taudul e92874c0bb Save "on demand" flag in traces.
Previously on demand mode was determined by frame offset parameter being
greater than zero. However, if the application is not pumping frames with
FrameMark macro, the frame index will never increase and the frame offset
parameter stay at zero. It is not possible to distinguish on demand traces
from normal ones in this scenario.

Fix by explicitly saving the on demand flag in trace file and employ the
previous logic to set the flag when importing older traces.
2023-03-04 00:11:32 +01:00
Bartosz Taudul 897aec5b06 Release 0.9.1. 2023-02-26 15:30:03 +01:00
Lectem ecdf6adc32 Fix race condition for symbols resolution on windows
There might have been new modules loaded by another thread between the `SymInitialize` and `EnumProcessModules` calls.
Since we register the enumerated modules into the cache, we need to make sure that symbols for this module are loaded.
The only way to do that is to call `SymLoadModuleEx`, just like we do when finding new modules after `InitCallstack`.
2023-02-14 15:32:37 +01:00
Levente Koncz f4a5bce28c Add missing include 2023-02-10 12:15:58 +01:00
John Plate 37bc03fd63 Fix MSVC compiler warning 2023-02-08 13:27:17 +00:00
mwl4 1439e93a69 Fix compilation on linux: always initialize ScopedZone::m_connectionId to 0.
gcc error:
public/tracy/../client/TracyScoped.hpp:102:9: error: ‘___tracy_scoped_zone.tracy::ScopedZone::m_connectionId’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if( GetProfiler().ConnectionId() != m_connectionId ) return;
         ^~
2023-01-25 15:11:49 +01:00
mwl4 789f572332 Fix compilation on linux: use abort() instead of assert( false ).
assert() in release configuration resolves to empty code, while abort() is marked as [[noreturn]] and always is available.

gcc error:
error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]:
public/tracy/../client/../common/TracyAlign.hpp: In function ‘void tracy::SysTraceWorker(void*)’:
public/tracy/../client/../common/TracyAlign.hpp:22:11: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     memcpy( ptr, &val, sizeof( T ) );
     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from public/TracyClient.cpp:26,
                 from X.cpp:
public/client/TracySysTrace.cpp:1258:35: note: ‘type’ was declared here
                         QueueType type;
                                   ^~~~
2023-01-25 15:08:51 +01:00
Bartosz Taudul d47122586c Fix color channel names in source location message. 2023-01-23 01:23:15 +01:00
Bartosz Taudul 6652999a60 Fix color channels names in zone color message. 2023-01-23 01:18:54 +01:00
Bartosz Taudul eb7c13e7bb Fix message color component names in the protocol.
Red and blue channels were mislabeled. Otherwise, coding and decoding was
performed correctly, as far as the color channel order described in the manual
is followed by the user.

No change to the binary protocol was made.
2023-01-23 01:07:07 +01:00
Simonas Kazlauskas 5a7a83d307 move ___tracy_fiber* declarations to under ifdef
These functions are only defined when -DTRACY_FIBERS is set. However,
the function is declared regardless of this declaration, which seems
like it could lead to obscure linking errors. I haven’t encountered any
of these specifically, but in my case, this distinction makes it more
difficult to produce correctly auto-generated bindings.
2023-01-19 01:54:26 +02:00
Bartosz Taudul ecb4a0527a Do not retrieve call stacks if sampling is not requested. 2023-01-05 21:45:44 +01:00
Bartosz Taudul b53acde418 Fix type. 2023-01-05 20:34:50 +01:00
Bartosz Taudul 236bbfa8b1 libbacktrace: unpack literals into output buffer (da7eff2) 2023-01-05 20:31:05 +01:00