From fece23a32be8cfbdc0f8605ab4a1694642c0ec56 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 23 May 2021 18:02:06 +0200 Subject: [PATCH] Set frequency, not period. This enables sampling on ARM dev board. --- client/TracySysTrace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 1cc3832c..8db5baca 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -785,10 +785,11 @@ static void SetupSampling( int64_t& samplingPeriod ) pe = {}; pe.type = PERF_TYPE_HARDWARE; pe.size = sizeof( perf_event_attr ); - pe.sample_freq = 1*1000*1000; + pe.sample_freq = 10000; pe.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; pe.disabled = 1; pe.exclude_kernel = 1; + pe.freq = 1; if( !noRetirement ) { TracyDebug( "Setup sampling cycles + retirement\n" ); @@ -818,7 +819,6 @@ static void SetupSampling( int64_t& samplingPeriod ) } // cache reference + miss - pe.sample_freq = 200*1000; if( !noCache ) { TracyDebug( "Setup sampling CPU cache references + misses\n" );