diff options
author | Siri Hansen <[email protected]> | 2013-05-22 11:46:03 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-05-23 09:44:47 +0200 |
commit | 6a1c4daa036cd5e26bfe1995b004621ba6984d60 (patch) | |
tree | ab02206884e1128396e8c99a481ec0108bb16644 /lib/runtime_tools | |
parent | f2f29ac19a18b4870bc4b8b5eaa5e04ecabbcdb5 (diff) | |
download | otp-6a1c4daa036cd5e26bfe1995b004621ba6984d60.tar.gz otp-6a1c4daa036cd5e26bfe1995b004621ba6984d60.tar.bz2 otp-6a1c4daa036cd5e26bfe1995b004621ba6984d60.zip |
observer: Add allocator info to gui
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r-- | lib/runtime_tools/src/observer_backend.erl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl index d1d291d5cb..25ed093d45 100644 --- a/lib/runtime_tools/src/observer_backend.erl +++ b/lib/runtime_tools/src/observer_backend.erl @@ -49,6 +49,10 @@ vsn() -> %% observer backend %% sys_info() -> + MemInfo = try erlang:memory() of + Mem -> Mem + catch _:_ -> [] + end, {{_,Input},{_,Output}} = erlang:statistics(io), [{process_count, erlang:system_info(process_count)}, {process_limit, erlang:system_info(process_limit)}, @@ -68,9 +72,16 @@ sys_info() -> {threads, erlang:system_info(threads)}, {thread_pool_size, erlang:system_info(thread_pool_size)}, {wordsize_internal, erlang:system_info({wordsize, internal})}, - {wordsize_external, erlang:system_info({wordsize, external})} | - erlang:memory() - ]. + {wordsize_external, erlang:system_info({wordsize, external})}, + {alloc_info, alloc_info()} + | MemInfo]. + +alloc_info() -> + {_,_,AllocTypes,_} = erlang:system_info(allocator), + try erlang:system_info({allocator_sizes,AllocTypes}) of + Allocators -> Allocators + catch _:_ -> [] + end. get_table(Parent, Table, Module) -> spawn(fun() -> |