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

120 Commits

Author SHA1 Message Date
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
Bartosz Taudul d8fc004bfa libbacktrace: rewrite and simplify main zstd loop (fd9442f) 2023-01-05 20:29:51 +01:00
Bartosz Taudul 08d403e324 libbacktrace: support zstd decompression (c992dd8) 2023-01-05 20:27:36 +01:00
Bartosz Taudul c12505c19d Fix TRACY_NO_CALLSTACK on Windows. 2022-12-22 21:17:31 +01:00
Bartosz Taudul ba6416f68c Merge pull request #497 from pshurgal/detailed_function_names
More detailed function names under Clang and GCC
2022-11-30 12:14:46 +01:00
Petr Shurgalin 5ddf62b54e Customizable source location data 2022-11-30 12:39:50 +02:00
ReplayCoding 9da24b713c Always fallback to using native thread name...
...even when TRACY_ENABLE is defined.
2022-11-29 12:02:42 -08:00
ReplayCoding 311ad7b061 Fix compile error when TRACY_NO_CRASH_HANDLER is enabled 2022-11-27 13:40:45 -08:00
Bartosz Taudul 89a55a2220 Remove semicolons from lockable macros. 2022-11-09 22:07:36 +01:00
Bartosz Taudul 2c03306341 Always provide Callstack() implementation, even if dummy.
This fixes usage with TRACY_HAS_CALLSTACK undefined, allowing compilation of
otherwise unused functions, which are already protected from being called
through macro redirections.

See https://github.com/wolfpld/tracy/pull/492 for more information.
2022-11-09 21:55:41 +01:00
Bartosz Taudul 6c74320b3e Merge pull request #488 from xxxbxxx/master
Added typed plots variants to the C API
2022-11-03 19:28:04 +01:00
Bartosz Taudul e7ac54fba6 Signals are only set if TRACY_NO_CRASH_HANDLER is not defined. 2022-11-03 17:21:09 +01:00
xxxbxxx a0cb8eb1d5 Added typed plots variants to the C API 2022-11-03 13:47:04 +01:00
Bartosz Taudul 970468f937 Override dlclose() to do nothing.
Provide a custom no-op implementation of dlclose(), in order to prevent shared
object data from disappearing from profiler view. The server makes queries for
program executable code, which has to be always available, otherwise wrong
data may be provided, or the program may crash, due to referencing no longer
mapped memory.

The dlclose() documentation states that the function internally decreases the
reference count, and only does unload the shared object when the count reaches
zero. There is no guarantee that the shared object data will be unloaded
immediately after any dlclose call originating from the program. This function
override exploits this fact.
2022-10-28 01:21:52 +02:00
Bartosz Taudul 898140fbda Don't read payload.extra, if not needed. 2022-10-28 00:34:46 +02:00