4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
4
%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
498
498
["Tests erlang:system_monitor(Pid, [{long_gc,Time}])"];
499
499
system_monitor_long_gc_1(Config) when is_list(Config) ->
500
500
erts_debug:set_internal_state(available_internal_state, true),
502
%% Add ?LONG_GC_SLEEP ms to all gc
503
?line erts_debug:set_internal_state(test_long_gc_sleep,
510
?line long_gc(LoadFun, false)
502
case erts_debug:get_internal_state(force_heap_frags) of
504
{skip,"emulator with FORCE_HEAP_FRAGS defined"};
506
%% Add ?LONG_GC_SLEEP ms to all gc
507
?line erts_debug:set_internal_state(test_long_gc_sleep,
509
?line LoadFun = fun () ->
513
?line long_gc(LoadFun, false)
512
516
erts_debug:set_internal_state(test_long_gc_sleep, 0),
513
erts_debug:set_internal_state(available_internal_state, false)
517
erts_debug:set_internal_state(available_internal_state, false)
516
520
system_monitor_long_gc_2(suite) ->
520
524
system_monitor_long_gc_2(Config) when is_list(Config) ->
521
525
erts_debug:set_internal_state(available_internal_state, true),
523
%% Add ?LONG_GC_SLEEP ms to all gc
524
?line erts_debug:set_internal_state(test_long_gc_sleep,
526
?line Parent = self(),
534
Parent ! {Ref, self()}
536
receive {Ref, Pid} -> Pid end
538
?line long_gc(LoadFun, true),
539
?line long_gc(LoadFun, true),
540
?line long_gc(LoadFun, true)
527
case erts_debug:get_internal_state(force_heap_frags) of
529
{skip,"emulator with FORCE_HEAP_FRAGS defined"};
531
%% Add ?LONG_GC_SLEEP ms to all gc
532
?line erts_debug:set_internal_state(test_long_gc_sleep,
534
?line Parent = self(),
542
Parent ! {Ref, self()}
544
receive {Ref, Pid} -> Pid end
546
?line long_gc(LoadFun, true),
547
?line long_gc(LoadFun, true),
548
?line long_gc(LoadFun, true)
542
551
erts_debug:set_internal_state(test_long_gc_sleep, 0),
543
552
erts_debug:set_internal_state(available_internal_state, false)