Module: Mesa
Branch: main
Commit: 4c0a54fc364dba6c7553f83a4c9dc8b6bd3c9ed5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c0a54fc364dba6c7553f83a4c9dc8b6bd3c9ed5

Author: Isaac Bosompem <[email protected]>
Date:   Mon Jan 16 15:54:21 2023 -0500

tool/pps: Fix 32-bit build issue with format string

Fixes a 32-bit build issue with Perfetto enabled.
Move the printf format specifier to use PRIx64 which
will be consistent regardless of the build type.

Signed-Off By: Isaac Bosompem <[email protected]>

Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20732>

---

 src/tool/pps/pps_datasource.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tool/pps/pps_datasource.cc b/src/tool/pps/pps_datasource.cc
index c7bd4caba36..9242a403fdd 100644
--- a/src/tool/pps/pps_datasource.cc
+++ b/src/tool/pps/pps_datasource.cc
@@ -14,6 +14,7 @@
 #include <condition_variable>
 #include <thread>
 #include <variant>
+#include <inttypes.h>
 
 // Minimum supported sampling period in nanoseconds
 #define MIN_SAMPLING_PERIOD_NS 50000
@@ -316,7 +317,7 @@ void GpuDataSource::trace(TraceContext &ctx)
          }
 
          if (!got_first_counters) {
-            PPS_LOG("Got first counters at gpu_ts=0x%016lx", gpu_timestamp);
+            PPS_LOG("Got first counters at gpu_ts=0x%016" PRIx64, 
gpu_timestamp);
             got_first_counters = true;
          }
 

Reply via email to