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

7011 Commits

Author SHA1 Message Date
Bartosz Taudul 6e36469840 Add non-View-dependent thread color getter. 2022-09-03 19:28:50 +02:00
Bartosz Taudul 0c4ca4cd69 Add function for highlighting a thread. 2022-09-03 19:25:02 +02:00
Bartosz Taudul e19a3a8767 Implement check for empty plot. 2022-09-03 19:18:01 +02:00
Bartosz Taudul 450fbf5ea0 Draw timeline item separator lines with proper colors. 2022-09-03 19:06:06 +02:00
Bartosz Taudul fa20700825 Replace timeline item open/close triangles with font carets. 2022-09-03 18:53:05 +02:00
Bartosz Taudul 119152aac1 Worker must be mutable.
This is to allow use of various accessors that cache results, etc.
2022-09-03 18:34:11 +02:00
Bartosz Taudul b481bb367c Switch plot drawing to the timeline items system. 2022-09-03 17:51:33 +02:00
Bartosz Taudul 55a82ea714 Make plot color/value formatting generic utilities.
Previous implementations of these functions (in TracyView) are still used
throughout the code. They will be removed in subsequent commits.
2022-09-03 17:51:32 +02:00
Bartosz Taudul 1736fb387a Allow access to timeline items stored in the controller.
This is similar to the previously existing Vis() access function.
2022-09-03 17:51:32 +02:00
Bartosz Taudul 9355a14657 New TimelineController begin/end logic. 2022-09-03 17:51:31 +02:00
Bartosz Taudul 8034fce416 Allow adding timeline items to TimelineController.
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.
2022-09-03 17:51:30 +02:00
Bartosz Taudul 449dff0eca Store View and Worker in TimelineController. 2022-09-03 17:51:30 +02:00
Bartosz Taudul b42182f0a8 Add base class for timeline items. 2022-09-03 17:51:29 +02:00
Bartosz Taudul 427dc4fffa Make View::ZoomToRange() public. 2022-09-03 17:51:26 +02:00
Bartosz Taudul 3207df8236 Merge pull request #460 from Krzmbrzl/revamp-cmake
CMake: Fix invalid syntax
2022-09-03 17:51:09 +02:00
Robert Adam 92137e8050 CMake: Fix invalid syntax
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.
2022-09-03 17:13:31 +02:00
jkriegshauser 59ae71df2b Import frame messages (#459)
Co-authored-by: Joshua Kriegshauser <joshuakr@nvidia.com>
Co-authored-by: Bartosz Taudul <wolf@nereid.pl>
2022-09-02 19:44:37 +02:00
Bartosz Taudul 8b75a3fab0 Fix callstackPayload overflow when data to read size was POT. 2022-09-02 18:52:32 +02:00
Bartosz Taudul 2f44f65e02 Don't copy short_ptr. 2022-09-02 18:47:13 +02:00
Bartosz Taudul 66255dc950 Update NEWS. 2022-09-02 01:28:08 +02:00
Bartosz Taudul 2cc5eff9a2 Normalize symbol paths on libbacktrace systems. 2022-09-02 01:23:29 +02:00
Bartosz Taudul 8cc43284bd Add path normalization function. 2022-09-02 01:23:14 +02:00
Bartosz Taudul 165cc22115 Merge pull request #454 from Krzmbrzl/revamp-cmake
CMake: Add option to explicitly set lib type
2022-08-31 21:17:46 +02:00
Bartosz Taudul 5289a9c999 Merge pull request #453 from Krzmbrzl/fix-cpuid-compile-error
Fix cpuid symbol redefinition on older GCC versions
2022-08-31 21:14:58 +02:00
Robert Adam 1f7656e845 CMake: Add option to explicitly set lib type
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.
2022-08-31 18:06:51 +02:00
Robert Adam 0aeadb4c49 Use TRACY_PUBLIC_DIR throughout 2022-08-31 18:06:22 +02: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 107975c8de Fix time rounding logic.
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.
2022-08-28 14:50:38 +02:00
Bartosz Taudul f0386d2f72 Update manual. 2022-08-28 13:26:15 +02:00
Bartosz Taudul cedd8b590c Update NEWS. 2022-08-28 13:21:24 +02:00
Bartosz Taudul c2d527e2e7 Cosmetics. 2022-08-28 13:17:29 +02:00
Bartosz Taudul 74789d1049 Merge pull request #446 from simplyWiri/master
Add WASD panning/zooming functionality to timeline.
2022-08-28 13:13:21 +02:00
Bartosz Taudul 87723cdcc4 Update json.hpp to 3.11.2. 2022-08-27 16:09:42 +02:00
Bartosz Taudul be392a76fb Move TracyVersion.hpp to common. 2022-08-27 16:05:36 +02:00
Bartosz Taudul 165099ca87 Merge pull request #448 from hulakdar/multithreaded_d3d12_zones
Multithreaded d3d12 zones
2022-08-26 13:11:35 +02:00
hulakdar e35db2657b A bit more consistent usage of atomic 2022-08-26 13:25:58 +03:00
hulakdar 391cb4242e Fix d3d12 gpu zones for multithreaded use 2022-08-26 13:07:07 +03:00
Bartosz Taudul 11b11d5f51 Update NEWS. 2022-08-26 00:54:36 +02:00
Bartosz Taudul f3113f24a9 Update manual. 2022-08-26 00:48:18 +02:00
Bartosz Taudul 72b7d0db5b Add user data pointer to parameter callback. 2022-08-26 00:46:01 +02:00
simplyWiri d2e3856724 Add WASD panning/zooming functionality to timeline. 2022-08-22 17:23:57 +10:00
Bartosz Taudul 655d8a01ea Move vis data to timeline controller. 2022-08-20 17:02:29 +02:00
Bartosz Taudul 49bda91be5 Cosmetics. 2022-08-20 01:45:55 +02:00
Bartosz Taudul 414f467c6e More jump targets to normalize. 2022-08-19 12:50:47 +02:00
Bartosz Taudul 2f219188e1 Fix function normalization being forced on. 2022-08-18 14:13:53 +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 1d60c0cd5b Remove leftovers. 2022-08-18 13:18:39 +02:00
Bartosz Taudul 07a56f1148 Load globals to local variables. 2022-08-18 01:08:22 +02:00
Bartosz Taudul d62f7d5d13 Shorten zone name in jump popup target submenu. 2022-08-18 00:49:42 +02:00