This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to tag 2.5.4 in repository https://gitbox.apache.org/repos/asf/couchdb-recon.git
commit 59c59baafe792f0ca3b24e8260938c17f6f85b2a Author: Lukas Larsson <[email protected]> AuthorDate: Wed Aug 30 20:53:59 2023 +0200 Include erts_mmap in snapshot to help debug VM issues --- src/recon_alloc.erl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/recon_alloc.erl b/src/recon_alloc.erl index 0b758dd..0cd16e8 100644 --- a/src/recon_alloc.erl +++ b/src/recon_alloc.erl @@ -369,11 +369,13 @@ sbcs_to_mbcs(Keyword) -> allocators() -> UtilAllocators = erlang:system_info(alloc_util_allocators), Allocators = [sys_alloc,mseg_alloc|UtilAllocators], - [{{A,N}, format_alloc(A, Props)} || - A <- Allocators, - Allocs <- [erlang:system_info({allocator,A})], - Allocs =/= false, - {_,N,Props} <- Allocs]. + try [{{erts_mmap,0},erlang:system_info({allocator,erts_mmap})}] + catch error:badarg -> [] end ++ + [{{A,N}, format_alloc(A, Props)} || + A <- Allocators, + Allocs <- [erlang:system_info({allocator,A})], + Allocs =/= false, + {_,N,Props} <- Allocs]. format_alloc(Alloc, Props) -> %% {versions,_,_} is implicitly deleted in order to allow the use of the @@ -638,6 +640,8 @@ conv_mem(Mem,Factor) -> conv_alloc([{{sys_alloc,_I},_Props} = Alloc|R], Factor) -> [Alloc|conv_alloc(R,Factor)]; +conv_alloc([{{erts_mmap,_I},_Props} = Alloc|R], Factor) -> + [Alloc|conv_alloc(R,Factor)]; conv_alloc([{{mseg_alloc,_I} = AI,Props}|R], Factor) -> MemKind = orddict:fetch(memkind,Props), Status = orddict:fetch(status,MemKind),
