Permalink
Browse files

Restructured system.memory to make way for object counts

  • Loading branch information...
1 parent ef9898c commit 3340130fadc040adf7aa33535ce4ad5452b01130 @ileitch ileitch committed Jun 4, 2010
Showing with 20 additions and 10 deletions.
  1. +5 −5 lib/bin/console.rb
  2. +15 −5 vm/agent_components.cpp
View
@@ -133,27 +133,27 @@ def show_pid
end
def show_memory
- code, val = get "system.memory.young"
+ code, val = get "system.memory.young.bytes"
puts " Young: #{val}"
total = val
- code, val = get "system.memory.mature"
+ code, val = get "system.memory.mature.bytes"
puts " Mature: #{val}"
total += val
- code, val = get "system.memory.large"
+ code, val = get "system.memory.large.bytes"
puts " Large: #{val}"
total += val
- code, val = get "system.memory.code"
+ code, val = get "system.memory.code.bytes"
puts " Code: #{val}"
total += val
- code, val = get "system.memory.symbols"
+ code, val = get "system.memory.symbols.bytes"
puts "Symbols: #{val}"
total += val
View
@@ -332,11 +332,21 @@ namespace agent {
system_->add(new Backtrace(state, ss, "backtrace"));
Tree* mem = system_->get_tree("memory");
- mem->add(new StaticInteger<int>("young", ss.config.gc_bytes * 2));
- mem->add(new ReadInteger<size_t>("mature", &state->om->immix_usage()));
- mem->add(new ReadInteger<size_t>("large", &state->om->loe_usage()));
- mem->add(new ReadInteger<size_t>("code", &state->om->code_usage()));
- mem->add(new ReadInteger<size_t>("symbols", &ss.symbols.bytes_used()));
+
+ Tree* young = mem->get_tree("young");
+ young->add(new StaticInteger<int>("bytes", ss.config.gc_bytes * 2));
+
+ Tree* mature = mem->get_tree("mature");
+ mature->add(new ReadInteger<size_t>("bytes", &state->om->immix_usage()));
+
+ Tree* large = mem->get_tree("large");
+ large->add(new ReadInteger<size_t>("bytes", &state->om->loe_usage()));
+
+ Tree* code = mem->get_tree("code");
+ code->add(new ReadInteger<size_t>("bytes", &state->om->code_usage()));
+
+ Tree* symbols = mem->get_tree("symbols");
+ symbols->add(new ReadInteger<size_t>("bytes", &ss.symbols.bytes_used()));
Tree* jit = system_->get_tree("jit");
jit->add(new ReadInteger<size_t>("methods", &ss.stats.jitted_methods));

0 comments on commit 3340130

Please sign in to comment.