aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_coordinator.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-03-29 14:44:08 +0200
committerHenrik Nord <[email protected]>2012-05-21 15:31:23 +0200
commit5c52ff6b5f10c7bd9ce06cdf607e88035c16e079 (patch)
tree26c35deaaae3d2d2ed425f0580d0b6d6f5d258f2 /lib/dialyzer/src/dialyzer_coordinator.erl
parent720b65deff021ddb17aaa125046f97ff13ade883 (diff)
downloadotp-5c52ff6b5f10c7bd9ce06cdf607e88035c16e079.tar.gz
otp-5c52ff6b5f10c7bd9ce06cdf607e88035c16e079.tar.bz2
otp-5c52ff6b5f10c7bd9ce06cdf607e88035c16e079.zip
Anonymous time server
Diffstat (limited to 'lib/dialyzer/src/dialyzer_coordinator.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_coordinator.erl23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/dialyzer/src/dialyzer_coordinator.erl b/lib/dialyzer/src/dialyzer_coordinator.erl
index e81da5c456..b91fc95959 100644
--- a/lib/dialyzer/src/dialyzer_coordinator.erl
+++ b/lib/dialyzer/src/dialyzer_coordinator.erl
@@ -26,7 +26,7 @@
-module(dialyzer_coordinator).
%%% Export for dialyzer main process
--export([parallel_job/3]).
+-export([parallel_job/4]).
%%% Exports for all possible workers
-export([wait_activation/0, job_done/3]).
@@ -44,6 +44,7 @@
-define(MAP, dialyzer_coordinator_map).
-type coordinator() :: {pid(), pid()}. %%opaque
+-type timing() :: dialyzer_timing:timing_server().
-type scc() :: [mfa_or_funlbl()].
-type mode() :: 'typesig' | 'dataflow' | 'compile' | 'warnings'.
@@ -85,20 +86,20 @@
%%--------------------------------------------------------------------
--spec parallel_job('compile', compile_jobs(), compile_init_data()) ->
+-spec parallel_job('compile', compile_jobs(), compile_init_data(), timing()) ->
{compile_result(), integer()};
- ('typesig', typesig_jobs(), typesig_init_data()) ->
+ ('typesig', typesig_jobs(), typesig_init_data(), timing()) ->
typesig_result();
- ('dataflow', dataflow_jobs(), dataflow_init_data()) ->
- dataflow_result();
- ('warnings', warnings_jobs(), warnings_init_data()) ->
- warnings_result().
+ ('dataflow', dataflow_jobs(), dataflow_init_data(),
+ timing()) -> dataflow_result();
+ ('warnings', warnings_jobs(), warnings_init_data(),
+ timing()) -> warnings_result().
-parallel_job(Mode, Jobs, InitData) ->
- State = spawn_jobs(Mode, Jobs, InitData),
+parallel_job(Mode, Jobs, InitData, Timing) ->
+ State = spawn_jobs(Mode, Jobs, InitData, Timing),
collect_result(State).
-spawn_jobs(Mode, Jobs, InitData) ->
+spawn_jobs(Mode, Jobs, InitData, Timing) ->
Collector = self(),
Regulator = spawn_regulator(),
Coordinator = {Collector, Regulator},
@@ -123,7 +124,7 @@ spawn_jobs(Mode, Jobs, InitData) ->
'typesig' -> "SCCs";
_ -> "modules"
end,
- dialyzer_timing:send_size_info(JobCount, Unit),
+ dialyzer_timing:send_size_info(Timing, JobCount, Unit),
InitResult =
case Mode of
'compile' -> dialyzer_analysis_callgraph:compile_init_result();