st 27. 11. 2024 v 14:42 odesÃlatel <[email protected]> napsal: > > Fix the bug by omitting max/min/avg when sample count is zero, > displaying a dash instead, just like we already do for the individual > CPUs. The logic is moved into a new function called > format_summary_value, which is used for both the individual CPUs > and for the overall summary. >
Note that the code is still repeated 18 times = 3 latencies (user, thread, irq) times 3 summaries (max, min, avg) * 2 kinds (per-cpu, overall). Due to the way the storing of the values and the printing is implemented, it is not straightforward to reduce this code duplicity. There are 9 different fields: (max, min, avg) * (user, thread, irq) - of timerlat_hist_cpu, and min/max/avg are grouped together per-CPU. I will send another patch to remove the duplicity if I get an idea how to deal with it. The duplicity was there also before and is thus not in the scope of this fix. Tomas
