On Mon, Sep 30, 2024 at 12:40:32PM -0700, Steve Sistare wrote: > diff --git a/system/trace-events b/system/trace-events > index 074d001..4669411 100644 > --- a/system/trace-events > +++ b/system/trace-events > @@ -47,3 +47,6 @@ dirtylimit_vcpu_execute(int cpu_index, int64_t > sleep_time_us) "CPU[%d] sleep %"P > > # cpu-throttle.c > cpu_throttle_set(int new_throttle_pct) "set guest CPU throttled by %d%%" > + > +#physmem.c > +ram_block_add(const char *name, uint32_t flags, int fd, size_t used_length, > size_t max_length) "%s, flags %u, fd %d, len %lu, maxlen %lu"
This breaks 32bit build: ../system/trace-events: In function ‘_nocheck__trace_ram_block_add’: ../system/trace-events:52:22: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] 52 | ram_block_add(const char *name, uint32_t flags, int fd, size_t used_length, size_t max_length) "%s, flags %u, fd %d, len %lu, maxlen %lu" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... ../system/trace-events:52:22: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] 52 | ram_block_add(const char *name, uint32_t flags, int fd, size_t used_length, size_t max_length) "%s, flags %u, fd %d, len %lu, maxlen %lu" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... ../system/trace-events:52:22: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] 52 | ram_block_add(const char *name, uint32_t flags, int fd, size_t used_length, size_t max_length) "%s, flags %u, fd %d, len %lu, maxlen %lu" | ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~ | | | size_t {aka unsigned int} ../system/trace-events:52:22: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] 52 | ram_block_add(const char *name, uint32_t flags, int fd, size_t used_length, size_t max_length) "%s, flags %u, fd %d, len %lu, maxlen %lu" | ^~~~~~~~~~~~~~~~ ~~~~~~~~~~ | | | size_t {aka unsigned int} Probably need to switch to %zu for size_t's. -- Peter Xu