On 20 June 2018 at 16:56, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 12 June 2018 at 09:08, Eric Auger <eric.au...@redhat.com> wrote: >> +smmuv3_config_cache_hit(uint32_t sid, uint32_t hits, uint32_t misses, float >> perc) "Config cache HIT for sid %d (hits=%d, misses=%d, hit rate=%.1f)" >> +smmuv3_config_cache_miss(uint32_t sid, uint32_t hits, uint32_t misses, >> float perc) "Config cache MISS for sid %d (hits=%d, misses=%d, hit >> rate=%.1f)" > > Does our tracing infrastructure really support floats? There > is no other use of it in the tree. There is one instance of > 'double', though, so maybe we do. > > In general I think we should prefer 'double' over 'float' anyway, > though.
I asked Stefan on IRC and the systemtap backend doesn't support float or double, so we need to use an integer type here. Lazy approach is to just round the % to an integer; if you think the extra precision is useful then you can have %d.%d and calculate the 10th-of-a-percent digit or something. thanks -- PMM