Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/power turbostat: Print core_id and apic_id in hex

The core_id is based on a mask of the apic_id.
Print them both in hex, rather than decimal,
to make this relationship visibly clear.

Signed-off-by: Len Brown <len.brown@intel.com>

+4 -4
+4 -4
tools/power/x86/turbostat/turbostat.c
··· 3214 3214 } 3215 3215 3216 3216 if (c && is_cpu_first_thread_in_core(t, c)) { 3217 - outp += sprintf(outp, "core: %d\n", cpus[t->cpu_id].core_id); 3217 + outp += sprintf(outp, "core: 0x%x\n", cpus[t->cpu_id].core_id); 3218 3218 outp += sprintf(outp, "c3: %016llX\n", c->c3); 3219 3219 outp += sprintf(outp, "c6: %016llX\n", c->c6); 3220 3220 outp += sprintf(outp, "c7: %016llX\n", c->c7); ··· 3423 3423 } 3424 3424 if (DO_BIC(BIC_Core)) { 3425 3425 if (c) 3426 - outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), cpus[t->cpu_id].core_id); 3426 + outp += sprintf(outp, "%s0x%x", (printed++ ? delim : ""), cpus[t->cpu_id].core_id); 3427 3427 else 3428 3428 outp += sprintf(outp, "%s-", (printed++ ? delim : "")); 3429 3429 } 3430 3430 if (DO_BIC(BIC_CPU)) 3431 3431 outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), t->cpu_id); 3432 3432 if (DO_BIC(BIC_APIC)) 3433 - outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), t->apic_id); 3433 + outp += sprintf(outp, "%s0x%x", (printed++ ? delim : ""), t->apic_id); 3434 3434 if (DO_BIC(BIC_X2APIC)) 3435 - outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), t->x2apic_id); 3435 + outp += sprintf(outp, "%s0x%x", (printed++ ? delim : ""), t->x2apic_id); 3436 3436 } 3437 3437 3438 3438 if (DO_BIC(BIC_Avg_MHz))