MINOR: cpu-topo: refine cpu dump output to better show kept/dropped CPUs

It's becoming difficult to see which CPUs are going to be kept/dropped.
Let's just skip all offline CPUs, and indicate "keep" in front of those
that are going to be used, and "----" in front of the excluded ones. It
is way more readable this way.

Also let's just drop the array entry number, since it's always the same
as the CPU number and is only an internal representation anyway.
This commit is contained in:
Willy Tarreau 2025-02-27 11:22:58 +01:00
parent f1210ee7c6
commit 322c28cc19

View file

@ -189,9 +189,9 @@ void cpu_dump_topology(const struct ha_cpu_topo *topo)
if (ha_cpu_topo[cpu].st & HA_CPU_F_OFFLINE)
continue;
printf("%3d: cpu=%3d excl=%d pk=%02d no=%02d cl=%03d(%03d)",
cpu, ha_cpu_topo[cpu].idx,
(ha_cpu_topo[cpu].st & HA_CPU_F_EXCL_MASK),
printf("[%s] cpu=%3d pk=%02d no=%02d cl=%03d(%03d)",
(ha_cpu_topo[cpu].st & HA_CPU_F_EXCL_MASK) ? "----" : "keep",
ha_cpu_topo[cpu].idx,
ha_cpu_topo[cpu].pk_id,
ha_cpu_topo[cpu].no_id,
ha_cpu_topo[cpu].cl_gid,