diff options
author | Sverker Eriksson <[email protected]> | 2018-02-13 12:00:29 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-02-13 12:00:29 +0100 |
commit | a7f6ce5e2d66f0f3425f38994e6f5256006c3984 (patch) | |
tree | d64439dfc4b0967a7952529188eb4ac50b690e6e /lib | |
parent | 65d3d0080c58a8830e9ba95658802820a94ae308 (diff) | |
parent | 7d390f2dd10f7a746a45a8c5b82af55f86e41f52 (diff) | |
download | otp-a7f6ce5e2d66f0f3425f38994e6f5256006c3984.tar.gz otp-a7f6ce5e2d66f0f3425f38994e6f5256006c3984.tar.bz2 otp-a7f6ce5e2d66f0f3425f38994e6f5256006c3984.zip |
Merge branch 'sverker/master/alloc-n-migration/ERIERL-88'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/runtime_tools/src/erts_alloc_config.erl | 8 | ||||
-rw-r--r-- | lib/stdlib/test/ets_SUITE.erl | 26 |
2 files changed, 27 insertions, 7 deletions
diff --git a/lib/runtime_tools/src/erts_alloc_config.erl b/lib/runtime_tools/src/erts_alloc_config.erl index 342363d08d..6c1a945484 100644 --- a/lib/runtime_tools/src/erts_alloc_config.erl +++ b/lib/runtime_tools/src/erts_alloc_config.erl @@ -265,7 +265,13 @@ strategy_str(aoff) -> strategy_str(aoffcbf) -> "Address order first fit carrier best fit"; strategy_str(aoffcaobf) -> - "Address order first fit carrier adress order best fit". + "Address order first fit carrier adress order best fit"; +strategy_str(ageffcaoff) -> + "Age order first fit carrier address order first fit"; +strategy_str(ageffcbf) -> + "Age order first fit carrier best fit"; +strategy_str(ageffcaobf) -> + "Age order first fit carrier adress order best fit". default_acul(A, S) -> case carrier_migration_support(S) of diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index 07c8b60cbd..0cfb1b5516 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -6023,17 +6023,23 @@ etsmem() -> end}, {Mem,AllTabs}. -verify_etsmem({MemInfo,AllTabs}) -> + +verify_etsmem(MI) -> wait_for_test_procs(), + verify_etsmem(MI, 1). + +verify_etsmem({MemInfo,AllTabs}, Try) -> case etsmem() of {MemInfo,_} -> io:format("Ets mem info: ~p", [MemInfo]), - case MemInfo of - {ErlMem,EtsAlloc} when ErlMem == notsup; EtsAlloc == undefined -> + case {MemInfo, Try} of + {{ErlMem,EtsAlloc},_} when ErlMem == notsup; EtsAlloc == undefined -> %% Use 'erl +Mea max' to do more complete memory leak testing. {comment,"Incomplete or no mem leak testing"}; - _ -> - ok + {_, 1} -> + ok; + _ -> + {comment, "Transient memory discrepancy"} end; {MemInfo2, AllTabs2} -> @@ -6041,7 +6047,15 @@ verify_etsmem({MemInfo,AllTabs}) -> io:format("Actual: ~p", [MemInfo2]), io:format("Changed tables before: ~p\n",[AllTabs -- AllTabs2]), io:format("Changed tables after: ~p\n", [AllTabs2 -- AllTabs]), - ct:fail("Failed memory check") + case Try < 2 of + true -> + io:format("\nThis discrepancy could be caused by an " + "inconsistent memory \"snapshot\"" + "\nTry again...\n", []), + verify_etsmem({MemInfo, AllTabs}, Try+1); + false -> + ct:fail("Failed memory check") + end end. |