Skip to content

Commit 0702c55

Browse files
BNieuwenhuizenMarge Bot
authored and
Marge Bot
committed
util/perf: Fix some warnings.
Warnings about long unsigned vs. long long unsigned, so lets use the proper thing. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32019>
1 parent 105fbaa commit 0702c55

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/util/perf/gpuvis_trace_utils.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
#if !defined( GPUVIS_TRACE_UTILS_DISABLE )
5353

54+
#include <inttypes.h>
5455
#include <time.h>
5556
#include <stdint.h>
5657
#include <stdlib.h>
@@ -218,7 +219,7 @@ static inline void gpuvis_trace_block_finalize( uint64_t m_t0, const char *str )
218219
if ( dt > 11000 )
219220
dt -= 11000;
220221

221-
gpuvis_trace_printf( "%s (lduration=-%lu)", str, dt );
222+
gpuvis_trace_printf( "%s (lduration=-%" PRIu64 ")", str, dt );
222223
}
223224

224225
static inline void gpuvis_trace_block_begin( struct GpuvisTraceBlock* block, const char *str )
@@ -426,7 +427,7 @@ static void flush_hot_func_calls()
426427
uint64_t offset = t0 - y.second.tfirst;
427428
uint64_t duration = y.second.tlast - y.second.tfirst;
428429

429-
gpuvis_trace_printf( "%s calls:%u (lduration=%lu tid=%d offset=-%lu)\n",
430+
gpuvis_trace_printf( "%s calls:%u (lduration=%" PRIu64 " tid=%d offset=-%" PRIu64 ")\n",
430431
func, y.second.count, duration, tid, offset );
431432
}
432433
}
@@ -451,7 +452,7 @@ GPUVIS_EXTERN void gpuvis_count_hot_func_calls_internal_( const char *func )
451452
}
452453
else if ( t0 - y.tlast >= 3 * 1000000 ) // 3ms
453454
{
454-
gpuvis_trace_printf( "%s calls:%u (lduration=%lu offset=-%lu)\n",
455+
gpuvis_trace_printf( "%s calls:%u (lduration=%" PRIu64 " offset=-%" PRIu64 ")\n",
455456
func, y.count, y.tlast - y.tfirst, t0 - y.tfirst );
456457

457458
y.count = 1;

0 commit comments

Comments
 (0)