diff options
author | Lukas Larsson <[email protected]> | 2016-03-22 17:49:52 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-04-15 15:08:52 +0200 |
commit | b4e236a15bb5065facc3b1dee6da936cea5b8ac9 (patch) | |
tree | 90baf57c83962026bfba65e3d0ec6657762ea515 /erts/emulator/test | |
parent | 8e2ec999394c77741241ef1a12728b11195961c8 (diff) | |
download | otp-b4e236a15bb5065facc3b1dee6da936cea5b8ac9.tar.gz otp-b4e236a15bb5065facc3b1dee6da936cea5b8ac9.tar.bz2 otp-b4e236a15bb5065facc3b1dee6da936cea5b8ac9.zip |
erts: Optimize tracer reload test
Without off_heap message queue the GC of the tracer could take
very long and thus delay the code:purge which would in turn allow
the trace generator to generate a lot of more messages which would
make the tracer GC for even longer etc etc. The time taken for the
testcase could go up to as large as 10 seconds and use lots of memory.
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/tracer_SUITE.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/erts/emulator/test/tracer_SUITE.erl b/erts/emulator/test/tracer_SUITE.erl index c62512e6ba..812e834562 100644 --- a/erts/emulator/test/tracer_SUITE.erl +++ b/erts/emulator/test/tracer_SUITE.erl @@ -143,9 +143,10 @@ unload(_Config) -> %% segfaults when reloading the current nifs. reload(_Config) -> - Tracer = spawn_link(fun F() -> receive _M -> F() end end), - Tracee = spawn_link(fun F() -> ?MODULE:all(), F() end), - + Tracer = spawn_opt(fun F() -> receive _M -> F() end end, + [{message_queue_data, off_heap}]), + erlang:link(Tracer), + Tracee = spawn_link(fun reload_loop/0), [begin Ref = make_ref(), @@ -171,6 +172,10 @@ reload(_Config) -> ok. +reload_loop() -> + ?MODULE:all(), + reload_loop(). + invalid_tracers(_Config) -> FailTrace = fun(A) -> try erlang:trace(self(), true, A) of |