diff options
author | Björn Gustavsson <[email protected]> | 2017-02-03 13:27:09 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-02-03 13:31:24 +0100 |
commit | 5f7f86be7bc7ec7a1c9b0042ff08254dca063d76 (patch) | |
tree | d69acb9beded0e43b760222f90719f260029118b /lib/kernel/test/error_logger_SUITE.erl | |
parent | ea530357b27635278ae8a3260e735ea39df5c283 (diff) | |
download | otp-5f7f86be7bc7ec7a1c9b0042ff08254dca063d76.tar.gz otp-5f7f86be7bc7ec7a1c9b0042ff08254dca063d76.tar.bz2 otp-5f7f86be7bc7ec7a1c9b0042ff08254dca063d76.zip |
Store messages for 'rex' and 'error_logger' off heap
Performance for processes that receive huge amounts of
messages can be increased by storing the incoming messages
outside the heap (that avoids copying the message in a
garbage collection).
Two OTP processes that are known to receive many messages
are 'rex' (used by 'rpc') and 'error_logger'.
Diffstat (limited to 'lib/kernel/test/error_logger_SUITE.erl')
-rw-r--r-- | lib/kernel/test/error_logger_SUITE.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/kernel/test/error_logger_SUITE.erl b/lib/kernel/test/error_logger_SUITE.erl index b6e7551741..bb01c2384d 100644 --- a/lib/kernel/test/error_logger_SUITE.erl +++ b/lib/kernel/test/error_logger_SUITE.erl @@ -30,6 +30,7 @@ -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, + off_heap/1, error_report/1, info_report/1, error/1, info/1, emulator/1, tty/1, logfile/1, add/1, delete/1]). @@ -45,7 +46,7 @@ suite() -> {timetrap,{minutes,1}}]. all() -> - [error_report, info_report, error, info, emulator, tty, + [off_heap, error_report, info_report, error, info, emulator, tty, logfile, add, delete]. groups() -> @@ -66,6 +67,16 @@ end_per_group(_GroupName, Config) -> %%----------------------------------------------------------------- +off_heap(_Config) -> + %% The error_logger process may receive a huge amount of + %% messages. Make sure that they are stored off heap to + %% avoid exessive GCs. + MQD = message_queue_data, + {MQD,off_heap} = process_info(whereis(error_logger), MQD), + ok. + +%%----------------------------------------------------------------- + error_report(Config) when is_list(Config) -> error_logger:add_report_handler(?MODULE, self()), Rep1 = [{tag1,"data1"},{tag2,data2},{tag3,3}], |