aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-09-26 22:36:34 +0200
committerSverker Eriksson <[email protected]>2013-09-30 17:45:47 +0200
commit059d8b76011f960cc5938501a33002b051b0bca2 (patch)
treebe0900966bbc9186356a59cf8e675ff0da49991f /erts/emulator/beam/erl_alloc.c
parent8d5b9a53a1fd5e2264d705911af23cd484ccead0 (diff)
downloadotp-059d8b76011f960cc5938501a33002b051b0bca2.tar.gz
otp-059d8b76011f960cc5938501a33002b051b0bca2.tar.bz2
otp-059d8b76011f960cc5938501a33002b051b0bca2.zip
erts: Add erts_mmap stats
As part of erlang:system_info({allocator,mseg_alloc}) and erl_crash.dump
Diffstat (limited to 'erts/emulator/beam/erl_alloc.c')
-rw-r--r--erts/emulator/beam/erl_alloc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index ad1020d7d6..d8da616d05 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -2712,6 +2712,7 @@ erts_allocator_info(int to, void *arg)
#if HAVE_ERTS_MSEG
{
+ struct erts_mmap_info_struct emis;
#ifdef ERTS_SMP
int max = (int) erts_no_schedulers;
#else
@@ -2722,6 +2723,8 @@ erts_allocator_info(int to, void *arg)
erts_print(to, arg, "=allocator:mseg_alloc[%d]\n", i);
erts_mseg_info(i, &to, arg, 0, NULL, NULL);
}
+ erts_print(to, arg, "=allocator:mseg_alloc.erts_mmap\n");
+ erts_mmap_info(&to, arg, NULL, NULL, &emis);
}
#endif
@@ -2948,6 +2951,7 @@ reply_alloc_info(void *vair)
Uint sz, *szp;
ErlOffHeap *ohp = NULL;
ErlHeapFragment *bp = NULL;
+ struct erts_mmap_info_struct emis;
int i;
Eterm (*info_func)(Allctr_t *,
int,
@@ -3064,11 +3068,19 @@ reply_alloc_info(void *vair)
alloc_atom,
make_small(0),
ainfo);
+
+ ai_list = erts_bld_cons(hpp, szp,
+ ainfo, ai_list);
+ ainfo = (air->only_sz ? NIL : erts_mmap_info(NULL, NULL, hpp, szp, &emis));
+ ainfo = erts_bld_tuple3(hpp, szp,
+ alloc_atom,
+ erts_bld_atom(hpp,szp,"erts_mmap"),
+ ainfo);
#else
ainfo = erts_bld_tuple2(hpp, szp, alloc_atom,
am_false);
#endif
- break;
+ break;
default:
alloc_atom = erts_bld_atom(hpp, szp,
(char *) ERTS_ALC_A2AD(ai));