mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
Output beautification
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@6 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
parent
2d453e612c
commit
ce0bb2b2f0
1 changed files with 20 additions and 20 deletions
|
@ -15,26 +15,26 @@ int main(void)
|
|||
if (cpu_identify(&raw, &data) < 0)
|
||||
printf("Error identifying the CPU: %s\n", cpuid_error());
|
||||
printf("CPU Info:\n------------------\n");
|
||||
printf(" vendor_str: `%s'\n", data.vendor_str);
|
||||
printf(" vendor id : %d\n", (int) data.vendor);
|
||||
printf(" brand_str : `%s'\n", data.brand_str);
|
||||
printf(" family : %d\n", data.family);
|
||||
printf(" model : %d\n", data.model);
|
||||
printf(" stepping : %d\n", data.stepping);
|
||||
printf(" ext_family: %d\n", data.ext_family);
|
||||
printf(" ext_model : %d\n", data.ext_model);
|
||||
printf(" num_cores : %d\n", data.num_cores);
|
||||
printf(" num_logcpu: %d\n", data.num_logical_cpus);
|
||||
printf(" total_cpus: %d\n", data.total_cpus);
|
||||
printf(" L1 D cache: %d KB\n", data.l1_data_cache);
|
||||
printf(" L1 I cache: %d KB\n", data.l1_instruction_cache);
|
||||
printf(" L2 cache : %d KB\n", data.l2_cache);
|
||||
printf(" L3 cache : %d KB\n", data.l3_cache);
|
||||
printf(" L1 assoc. : %d-way\n", data.l1_assoc);
|
||||
printf(" L2 assoc. : %d-way\n", data.l2_assoc);
|
||||
printf(" L3 assoc. : %d-way\n", data.l3_assoc);
|
||||
printf(" code name : `%s'\n", data.cpu_codename);
|
||||
printf(" flags:");
|
||||
printf(" vendor_str : `%s'\n", data.vendor_str);
|
||||
printf(" vendor id : %d\n", (int) data.vendor);
|
||||
printf(" brand_str : `%s'\n", data.brand_str);
|
||||
printf(" family : %d\n", data.family);
|
||||
printf(" model : %d\n", data.model);
|
||||
printf(" stepping : %d\n", data.stepping);
|
||||
printf(" ext_family : %d\n", data.ext_family);
|
||||
printf(" ext_model : %d\n", data.ext_model);
|
||||
printf(" num_cores : %d\n", data.num_cores);
|
||||
printf(" num_logical: %d\n", data.num_logical_cpus);
|
||||
printf(" total_cpus : %d\n", data.total_cpus);
|
||||
printf(" L1 D cache : %d KB\n", data.l1_data_cache);
|
||||
printf(" L1 I cache : %d KB\n", data.l1_instruction_cache);
|
||||
printf(" L2 cache : %d KB\n", data.l2_cache);
|
||||
printf(" L3 cache : %d KB\n", data.l3_cache);
|
||||
printf(" L1 assoc. : %d-way\n", data.l1_assoc);
|
||||
printf(" L2 assoc. : %d-way\n", data.l2_assoc);
|
||||
printf(" L3 assoc. : %d-way\n", data.l3_assoc);
|
||||
printf(" code name : `%s'\n", data.cpu_codename);
|
||||
printf(" features :");
|
||||
int i;
|
||||
for (i = 0; i < CPU_FEATURE_END; i++)
|
||||
if (data.flags[i])
|
||||
|
|
Loading…
Reference in a new issue