Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read smaps in the memory profiler on Linux #4894

Merged
merged 2 commits into from Feb 24, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Switch ordering of the memory profiler's output columns.

Because _size_ is always small, but _category_ can be long, so it makes
sense to have the _size_ on the left.
  • Loading branch information
nnethercote committed Feb 23, 2015
commit 121394a121be5a2a8be491cc5c5b6ef13ca9f74d
@@ -111,16 +111,16 @@ impl MemoryProfiler {
match nbytes {
Some(nbytes) => {
let mebi = 1024f64 * 1024f64;
println!("{:24}: {:12.2}", path, (nbytes as f64) / mebi);
println!("{:12.2}: {}", (nbytes as f64) / mebi, path);
}
None => {
println!("{:24}: {:>12}", path, "???");
println!("{:>12}: {}", "???", path);
}
}
}

fn handle_print_msg(&self) {
println!("{:24}: {:12}", "_category_", "_size (MiB)_");
println!("{:12}: {}", "_size (MiB)_", "_category_");

// Virtual and physical memory usage, as reported by the OS.
MemoryProfiler::print_measurement("vsize", get_vsize());
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.