51
51
52
52
#if !defined( GPUVIS_TRACE_UTILS_DISABLE )
53
53
54
+ #include < inttypes.h>
54
55
#include < time.h>
55
56
#include < stdint.h>
56
57
#include < stdlib.h>
@@ -218,7 +219,7 @@ static inline void gpuvis_trace_block_finalize( uint64_t m_t0, const char *str )
218
219
if ( dt > 11000 )
219
220
dt -= 11000 ;
220
221
221
- gpuvis_trace_printf ( " %s (lduration=-%lu )" , str, dt );
222
+ gpuvis_trace_printf ( " %s (lduration=-%" PRIu64 " )" , str, dt );
222
223
}
223
224
224
225
static inline void gpuvis_trace_block_begin ( struct GpuvisTraceBlock * block, const char *str )
@@ -426,7 +427,7 @@ static void flush_hot_func_calls()
426
427
uint64_t offset = t0 - y.second .tfirst ;
427
428
uint64_t duration = y.second .tlast - y.second .tfirst ;
428
429
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 " ,
430
431
func, y.second .count , duration, tid, offset );
431
432
}
432
433
}
@@ -451,7 +452,7 @@ GPUVIS_EXTERN void gpuvis_count_hot_func_calls_internal_( const char *func )
451
452
}
452
453
else if ( t0 - y.tlast >= 3 * 1000000 ) // 3ms
453
454
{
454
- gpuvis_trace_printf ( " %s calls:%u (lduration=%lu offset=-%lu )\n " ,
455
+ gpuvis_trace_printf ( " %s calls:%u (lduration=%" PRIu64 " offset=-%" PRIu64 " )\n " ,
455
456
func, y.count , y.tlast - y.tfirst , t0 - y.tfirst );
456
457
457
458
y.count = 1 ;
0 commit comments