Commit Graph

9 Commits

Author SHA1 Message Date
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
ecb4a0527a
Do not retrieve call stacks if sampling is not requested. 2023-01-05 21:45:44 +01:00
Robert Adam
ece8779362 Fix cpuid symbol redefinition on older GCC versions
Since commit 940f32c1a8 building the Tracy
library on Linux using a GCC version < 11 would result in compile errors
due to symbol redefinitions of __get_cpuid_max, __get_cpuid and
__get_cpuid_count.

This is because prior to GCC 11 the cpuid.h header file did not have any
include guards and thus including this header more than once would
produce the abovementioned errors.

To work around this issue, including cpuid.h has been wrapped into a
custom header file that itself uses include guards and thus shields
cpuid.h from being included multiple times.

Fixes #452
2022-08-31 17:59:46 +02:00
Bartosz Taudul
197007ab47
Keep a list of buffers left to handle.
Previously a bitmap of buffers was repeatedly scanned to see which buffers
still contain data. This process was needlessly wasting cycles (seen as a
hotspot when profiled) and worse yet, the workload increased with the number
of CPU cores (=> buffers used) to handle.

The new implementation instead maintains a list of buffer indices that have to
be handled. This list does not contain empty buffers, so each loop iteration
performs some work, instead of just spinning in search for buffers to handle.
2022-08-18 13:59:56 +02:00
Bartosz Taudul
940f32c1a8
Add include for cpuid. 2022-08-18 13:40:37 +02:00
Bartosz Taudul
07a56f1148
Load globals to local variables. 2022-08-18 01:08:22 +02:00
Bartosz Taudul
e0f813d9e9
Add support for Vsync capture on Linux. 2022-07-30 21:29:44 +02:00
Bartosz Taudul
91b002267e
Emit dedicated Vsync frame messages. 2022-07-30 19:53:40 +02:00
Bartosz Taudul
06c7984a16
Move all client headers and sources to public/ directory. 2022-07-17 15:47:38 +02:00