Split displaying number of physical and logical cores.

This commit is contained in:
Jung-uk Kim 2005-10-17 15:51:28 +00:00
parent a21cbcb876
commit 42fb42a399
2 changed files with 6 additions and 4 deletions

View File

@ -357,9 +357,10 @@ printcpuinfo(void)
cpuid_count(4, 0, regs);
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
}
if (cmp > 1)
printf("\n Physical cores: %d", cmp);
if (htt > 1)
printf("\n Physical/Logical cores: %d/%d",
cmp, htt);
printf("\n Logical cores: %d", htt);
}
}
/* Avoid ugly blank lines: only print newline when we have to. */

View File

@ -847,9 +847,10 @@ printcpuinfo(void)
cpuid_count(4, 0, regs);
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
}
if (cmp > 1)
printf("\n Physical cores: %d", cmp);
if (htt > 1)
printf("\n Physical/Logical cores: %d/%d",
cmp, htt);
printf("\n Logical cores: %d", htt);
}
} else if (strcmp(cpu_vendor, "CyrixInstead") == 0) {
printf(" DIR=0x%04x", cyrix_did);