aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_instrument.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-05-22 01:26:06 +0200
committerRickard Green <[email protected]>2011-07-08 16:08:37 +0200
commit1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50 (patch)
tree04267b5e56237c9f2bee3e4a5e02873a4b95fcc5 /erts/emulator/beam/erl_instrument.c
parent4a5a75811e2cd590b5c94f71864a5245fd511ccf (diff)
downloadotp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.tar.gz
otp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.tar.bz2
otp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.zip
Use separate memory carriers for small blocks
Diffstat (limited to 'erts/emulator/beam/erl_instrument.c')
-rw-r--r--erts/emulator/beam/erl_instrument.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_instrument.c b/erts/emulator/beam/erl_instrument.c
index f3f3c22933..c5615818f2 100644
--- a/erts/emulator/beam/erl_instrument.c
+++ b/erts/emulator/beam/erl_instrument.c
@@ -1152,6 +1152,14 @@ erts_instr_get_type_info(Process *proc)
return res;
}
+#if HALFWORD_HEAP
+#define ERTS_IS_SBMBC_ALLOCATOR_NO__(NO) \
+ ((NO) == ERTS_ALC_A_SBMBC || (NO) == ERTS_ALC_A_SBMBC_LOW)
+#else
+#define ERTS_IS_SBMBC_ALLOCATOR_NO__(NO) \
+ ((NO) == ERTS_ALC_A_SBMBC)
+#endif
+
Uint
erts_instr_init(int stat, int map_stat)
{
@@ -1186,6 +1194,8 @@ erts_instr_init(int stat, int map_stat)
sys_memzero((void *) stats->n, sizeof(Stat_t)*(ERTS_ALC_N_MAX+1));
for (i = ERTS_ALC_A_MIN; i <= ERTS_ALC_A_MAX; i++) {
+ if (ERTS_IS_SBMBC_ALLOCATOR_NO__(i))
+ continue;
if (erts_allctrs_info[i].enabled)
stats->ap[i] = &stats->a[i];
else
@@ -1199,6 +1209,8 @@ erts_instr_init(int stat, int map_stat)
erts_instr_memory_map = 1;
erts_instr_stat = 1;
for (i = ERTS_ALC_A_MIN; i <= ERTS_ALC_A_MAX; i++) {
+ if (ERTS_IS_SBMBC_ALLOCATOR_NO__(i))
+ continue;
erts_allctrs[i].alloc = map_stat_alloc;
erts_allctrs[i].realloc = map_stat_realloc;
erts_allctrs[i].free = map_stat_free;
@@ -1209,6 +1221,8 @@ erts_instr_init(int stat, int map_stat)
else {
erts_instr_stat = 1;
for (i = ERTS_ALC_A_MIN; i <= ERTS_ALC_A_MAX; i++) {
+ if (ERTS_IS_SBMBC_ALLOCATOR_NO__(i))
+ continue;
erts_allctrs[i].alloc = stat_alloc;
erts_allctrs[i].realloc = stat_realloc;
erts_allctrs[i].free = stat_free;