TimelineItem class is basically an expansion of the previous VisData
structure. After the transition process is finished the VisData map will be
removed, as it will no longer have any function.
In 1f7656e845 I introduced a new option
but for setting its default value, I accidentally introduced invalid
cmake syntax that blows off as soon as BUILD_SHARED_LIBS is actually
defined to be non-empty.
With this new option, it is now possible to explicitly build Tracy as a
shared or static library independent from the BUILD_SHARED_LIBS
variable, which always acts on a global scope (thus, affecting all CMake
targets).
If the options is not explicitly given, it will default to whatever
BUILD_SHARED_LIBS would indicate, leaving the default behavior
unchanged.
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
PrintSmallInt() expects values in the 0-999 range, but the in+1 may produce
1000 here. This is invalid and it either asserted, or outputted an empty
string.
Workaround by simple outputting "1000" as the value here.
This function is only used in context of printing time, and only in specific
context. The end result will be that values like "1000 us" or "1000 ms" may
appear, where they would be otherwise shortened to "1 ms" or "1 s". This may
be a bit unusual, but is acceptable, as the real time value has not yet
crossed the threshold required for such shortening.
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.