From 1d25013cce3473051b9b8982fc331400f6bf0b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 3 May 2013 19:23:46 +0200 Subject: tools: Document new eprof options --- lib/tools/doc/src/eprof.xml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'lib/tools/doc/src') diff --git a/lib/tools/doc/src/eprof.xml b/lib/tools/doc/src/eprof.xml index 82eb8dd284..8397204a43 100644 --- a/lib/tools/doc/src/eprof.xml +++ b/lib/tools/doc/src/eprof.xml @@ -52,12 +52,14 @@ start_profiling(Rootset) -> profiling | {error, Reason} start_profiling(Rootset,Pattern) -> profiling | {error, Reason} + start_profiling(Rootset,Pattern,Options) -> profiling | {error, Reason} Start profiling. Rootset = [atom() | pid()] - Pattern = {Module, Function, Arity} - Module = Function = atom() - Arity = integer() + Pattern = {Module, Function, Arity} + Module = Function = atom() + Arity = integer() + Options = [set_on_spawn] Reason = term() @@ -70,6 +72,9 @@

A pattern can be selected to narrow the profiling. For instance a specific module can be selected, and only the code executed in that module will be profiled.

+

The set_on_spawn option will active call time tracing for + all processes spawned by processes in the rootset. This is + the default behaviour.

@@ -82,19 +87,22 @@ profile(Fun) -> profiling | {error, Reason} + profile(Fun, Options) -> profiling | {error, Reason} profile(Rootset) -> profiling | {error, Reason} profile(Rootset,Fun) -> {ok, Value} | {error,Reason} profile(Rootset,Fun,Pattern) -> {ok, Value} | {error, Reason} profile(Rootset,Module,Function,Args) -> {ok, Value} | {error, Reason} profile(Rootset,Module,Function,Args,Pattern) -> {ok, Value} | {error, Reason} + profile(Rootset,Module,Function,Args,Pattern,Options) -> {ok, Value} | {error, Reason} Start profiling. Rootset = [atom() | pid()] - Fun = fun() -> term() - Pattern = {Module, Function, Arity} + Fun = fun() -> term() end + Pattern = {Module, Function, Arity} Module = Function = atom() Args = [term()] - Arity = integer() + Arity = integer() + Options = [set_on_spawn] Value = Reason = term() @@ -108,8 +116,11 @@ Rootset, the function returns {ok,Value} when Fun()/apply returns with the value Value, or {error,Reason} if Fun()/apply fails with - exit reason Reason. Otherwise it returns {error, Reason} + exit reason Reason. Otherwise it returns {error, Reason} immediately.

+

The set_on_spawn option will active call time tracing for + all processes spawned by processes in the rootset. This is + the default behaviour.

The programmer must ensure that the function given as argument is truly synchronous and that no work continues after the function has returned a value.

-- cgit v1.2.3