analyse() ->
{AllCallCount :: integer() >= 0,
ModAnalysisList :: mod_analysis_list()}
analyse() ->
{AllCallCount :: integer() >= 0,
ModAnalysisList :: mod_analysis_list()} analyse(Limit) ->
{AllCallCount :: integer() >= 0,
ModAnalysisList :: mod_analysis_list()}
analyse(Limit) ->
{AllCallCount :: integer() >= 0,
ModAnalysisList :: mod_analysis_list()} analyse(Mod) -> ModAnalysis :: mod_analysis()
analyse(Mod, Limit) -> ModAnalysis :: mod_analysis()
Types
Mod = module()Limit = integer() >= 0mod_analysis_list() = [mod_analysis()]mod_analysis() =
{Mod :: module(),
ModCallCount :: integer() >= 0,
FuncAnalysisList :: func_analysis_list()}
func_analysis_list() =
[{mfa(), FuncCallCount :: integer() >= 0}]
Collects and analyses the call counters presently in the node for either module Mod, or for all modules (except cprof itself), and returns:
FuncAnalysisList- A list of tuples, one for each function in a module, in decreasing
FuncCallCountorder. ModCallCount- The sum of
FuncCallCountvalues for all functions in moduleMod. AllCallCount- The sum of
ModCallCountvalues for all modules concerned inModAnalysisList. ModAnalysisList- A list of tuples, one for each module except
cprof, in decreasingModCallCountorder.
If call counters are still running while analyse/0..2 is executing, you might get an inconsistent result. This happens if the process executing analyse/0..2 gets scheduled out so some other process can increment the counters that are being analysed, Calling pause() before analysing takes care of the problem.
If the Mod argument is given, the result contains a ModAnalysis tuple for module Mod only, otherwise the result contains one ModAnalysis tuple for all modules returned from code:all_loaded() except cprof itself.
All functions with a FuncCallCount lower than Limit are excluded from FuncAnalysisList. They are still included in ModCallCount, though. The default value for Limit is 1.