aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mseg.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-12-03 18:31:02 +0100
committerBjörn-Egil Dahlberg <[email protected]>2012-12-14 15:12:59 +0100
commite976eb64736435b4c79bb53947a77d8bc04a0481 (patch)
tree9fddd5c95bf6136907bb7505b114b86d9e064647 /erts/emulator/sys/common/erl_mseg.c
parent4c4149e3ec93a2c501f1ca4bdeb3a70940df5b27 (diff)
downloadotp-e976eb64736435b4c79bb53947a77d8bc04a0481.tar.gz
otp-e976eb64736435b4c79bb53947a77d8bc04a0481.tar.bz2
otp-e976eb64736435b4c79bb53947a77d8bc04a0481.zip
erts: Reintroduce mseg options amcbf and rmcbf
Used with new sbc cache
Diffstat (limited to 'erts/emulator/sys/common/erl_mseg.c')
-rw-r--r--erts/emulator/sys/common/erl_mseg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c
index 7d03116daa..c8dd50bf7a 100644
--- a/erts/emulator/sys/common/erl_mseg.c
+++ b/erts/emulator/sys/common/erl_mseg.c
@@ -229,6 +229,9 @@ struct ErtsMsegAllctr_t_ {
#endif
Uint max_cache_size;
+ Uint abs_max_cache_bad_fit;
+ Uint rel_max_cache_bad_fit;
+
ErtsMsegCalls calls;
#if CAN_PARTLY_DESTROY
@@ -924,6 +927,8 @@ static struct {
Eterm version;
Eterm options;
+ Eterm amcbf;
+ Eterm rmcbf;
Eterm mcs;
Eterm memkind;
@@ -982,6 +987,8 @@ init_atoms(ErtsMsegAllctr_t *ma)
AM_INIT(name);
AM_INIT(options);
+ AM_INIT(amcbf);
+ AM_INIT(rmcbf);
AM_INIT(mcs);
AM_INIT(status);
@@ -1079,6 +1086,8 @@ info_options(ErtsMsegAllctr_t *ma,
if (print_to_p) {
int to = *print_to_p;
void *arg = print_to_arg;
+ erts_print(to, arg, "%samcbf: %beu\n", prefix, ma->abs_max_cache_bad_fit);
+ erts_print(to, arg, "%srmcbf: %beu\n", prefix, ma->rel_max_cache_bad_fit);
erts_print(to, arg, "%smcs: %beu\n", prefix, ma->max_cache_size);
}
@@ -1091,6 +1100,13 @@ info_options(ErtsMsegAllctr_t *ma,
add_2tup(hpp, szp, &res,
am.mcs,
bld_uint(hpp, szp, ma->max_cache_size));
+ add_2tup(hpp, szp, &res,
+ am.rmcbf,
+ bld_uint(hpp, szp, ma->rel_max_cache_bad_fit));
+ add_2tup(hpp, szp, &res,
+ am.amcbf,
+ bld_uint(hpp, szp, ma->abs_max_cache_bad_fit));
+
}
return res;
@@ -1519,6 +1535,8 @@ erts_mseg_init(ErtsMsegInit_t *init)
/* Options ... */
+ ma->abs_max_cache_bad_fit = init->amcbf;
+ ma->rel_max_cache_bad_fit = init->rmcbf;
ma->max_cache_size = init->mcs;
if (ma->max_cache_size > MAX_CACHE_SIZE)