diff options
author | Stavros Aronis <[email protected]> | 2012-02-24 18:31:31 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-05-21 15:31:20 +0200 |
commit | 0ecc1f181062da8b019f226ae2c567078ee2e860 (patch) | |
tree | 00c1eba159f7471375c362d93c9906826468ad2b /lib/dialyzer/src/dialyzer_worker.erl | |
parent | 8f56878ce7b2d9a4f2118663838287c6d2fa9502 (diff) | |
download | otp-0ecc1f181062da8b019f226ae2c567078ee2e860.tar.gz otp-0ecc1f181062da8b019f226ae2c567078ee2e860.tar.bz2 otp-0ecc1f181062da8b019f226ae2c567078ee2e860.zip |
Ticket-based regulation of memory consumption
Diffstat (limited to 'lib/dialyzer/src/dialyzer_worker.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_worker.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_worker.erl b/lib/dialyzer/src/dialyzer_worker.erl index 37ca6854b1..6392854101 100644 --- a/lib/dialyzer/src/dialyzer_worker.erl +++ b/lib/dialyzer/src/dialyzer_worker.erl @@ -84,6 +84,7 @@ loop(waiting, State) -> NewState = wait_for_success_typings(State), loop(updating, NewState); loop(running, #state{mode = 'compile'} = State) -> + dialyzer_coordinator:wait_activation(), ?debug("Compile: ~s\n",[State#state.job]), Result = case start_compilation(State) of @@ -95,16 +96,22 @@ loop(running, #state{mode = 'compile'} = State) -> end, report_to_coordinator(Result, State); loop(running, #state{mode = 'warnings'} = State) -> + dialyzer_coordinator:wait_activation(), ?debug("Warning: ~s\n",[State#state.job]), Result = collect_warnings(State), report_to_coordinator(Result, State); loop(running, #state{mode = Mode} = State) when Mode =:= 'typesig'; Mode =:= 'dataflow' -> + request_activation(State), + dialyzer_coordinator:wait_activation(), ?debug("Run: ~p\n",[State#state.job]), NotFixpoint = do_work(State), ok = broadcast_done(State), report_to_coordinator(NotFixpoint, State). +request_activation(#state{coordinator = Coordinator}) -> + dialyzer_coordinator:request_activation(Coordinator). + waits_more_success_typings(#state{depends_on = Depends}) -> case Depends of [] -> false; |