Skip to content

Commit

Permalink
Fix cache and TLB leaf.
Browse files Browse the repository at this point in the history
  • Loading branch information
gz committed Jul 31, 2021
1 parent 55f9147 commit 676dbd1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/bin/cpuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,16 @@ fn main() {
}

if let Some(info) = cpuid.get_cache_info() {
println!("Cache");
println!("{:?}", info);
print_title("Cache and TLB information (0x02):");
let attrs: Vec<(&str, String)> = info
.map(|cache| {
RowGen::tuple(
string_to_static_str(format!("{:#x}", cache.num)),
cache.desc().to_string(),
)
})
.collect();
table2(&attrs);
}

if let Some(info) = cpuid.get_processor_serial() {
Expand Down

0 comments on commit 676dbd1

Please sign in to comment.