-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Upgrade LibTracyClient to 0.9.1
- Loading branch information
1 parent
9ca700e
commit 1526534
Showing
5 changed files
with
101 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
## jll artifact | ||
LIBTRACYCLIENT_JLL_NAME := LibTracyClient | ||
LIBTRACYCLIENT_JLL_VER := 0.9.0+1 | ||
LIBTRACYCLIENT_JLL_VER := 0.9.1+0 | ||
|
||
## source build | ||
LIBTRACYCLIENT_VER := 0.9.0 | ||
LIBTRACYCLIENT_BRANCH=v0.9 | ||
LIBTRACYCLIENT_SHA1=5a1f5371b792c12aea324213e1dc738b2923ae21 | ||
LIBTRACYCLIENT_VER := 0.9.1 | ||
LIBTRACYCLIENT_BRANCH=v0.9.1 | ||
LIBTRACYCLIENT_SHA1=897aec5b062664d2485f4f9a213715d2e527e0ca |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
commit 6249999153a9497b32bc84e9dc95a1537a0af714 | ||
Author: Cody Tapscott <[email protected]> | ||
Date: Tue Apr 4 15:20:46 2023 -0400 | ||
|
||
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. | ||
|
||
diff --git a/public/client/TracySysTrace.cpp b/public/client/TracySysTrace.cpp | ||
index 4a562eaa..af0641fe 100644 | ||
--- a/public/client/TracySysTrace.cpp | ||
+++ b/public/client/TracySysTrace.cpp | ||
@@ -770,6 +770,13 @@ bool SysTraceStart( int64_t& samplingPeriod ) | ||
TracyDebug( "sched_wakeup id: %i\n", wakeupId ); | ||
TracyDebug( "drm_vblank_event id: %i\n", vsyncId ); | ||
|
||
+#ifdef TRACY_NO_SAMPLING | ||
+ const bool noSoftwareSampling = true; | ||
+#else | ||
+ const char* noSoftwareSamplingEnv = GetEnvVar( "TRACY_NO_SAMPLING" ); | ||
+ const bool noSoftwareSampling = noSoftwareSamplingEnv && noSoftwareSamplingEnv[0] == '1'; | ||
+#endif | ||
+ | ||
#ifdef TRACY_NO_SAMPLE_RETIREMENT | ||
const bool noRetirement = true; | ||
#else | ||
@@ -839,28 +846,31 @@ bool SysTraceStart( int64_t& samplingPeriod ) | ||
pe.clockid = CLOCK_MONOTONIC_RAW; | ||
#endif | ||
|
||
- TracyDebug( "Setup software sampling\n" ); | ||
- ProbePreciseIp( pe, currentPid ); | ||
- for( int i=0; i<s_numCpus; i++ ) | ||
+ if( !noSoftwareSampling ) | ||
{ | ||
- int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC ); | ||
- if( fd == -1 ) | ||
+ TracyDebug( "Setup software sampling\n" ); | ||
+ ProbePreciseIp( pe, currentPid ); | ||
+ for( int i=0; i<s_numCpus; i++ ) | ||
{ | ||
- pe.exclude_kernel = 1; | ||
- ProbePreciseIp( pe, currentPid ); | ||
- fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC ); | ||
+ int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC ); | ||
if( fd == -1 ) | ||
{ | ||
- TracyDebug( " Failed to setup!\n"); | ||
- break; | ||
+ pe.exclude_kernel = 1; | ||
+ ProbePreciseIp( pe, currentPid ); | ||
+ fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC ); | ||
+ if( fd == -1 ) | ||
+ { | ||
+ TracyDebug( " Failed to setup!\n"); | ||
+ break; | ||
+ } | ||
+ TracyDebug( " No access to kernel samples\n" ); | ||
+ } | ||
+ new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCallstack ); | ||
+ if( s_ring[s_numBuffers].IsValid() ) | ||
+ { | ||
+ s_numBuffers++; | ||
+ TracyDebug( " Core %i ok\n", i ); | ||
} | ||
- TracyDebug( " No access to kernel samples\n" ); | ||
- } | ||
- new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCallstack ); | ||
- if( s_ring[s_numBuffers].IsValid() ) | ||
- { | ||
- s_numBuffers++; | ||
- TracyDebug( " Core %i ok\n", i ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters