aboutsummaryrefslogblamecommitdiffstats
path: root/lib/inviso/doc/src/inviso_rt.xml
blob: 1579c873a3be1152b37e811fb1ea509149983f39 (plain) (tree)





















































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2006</year>
      <year>2007</year>
      <holder>Ericsson AB, All Rights Reserved</holder>
    </copyright>
    <legalnotice>
  The contents of this file are subject to the Erlang Public License,
  Version 1.1, (the "License"); you may not use this file except in
  compliance with the License. You should have received a copy of the
  Erlang Public License along with this software. If not, it can be
  retrieved online at http://www.erlang.org/.

  Software distributed under the License is distributed on an "AS IS"
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  the License for the specific language governing rights and limitations
  under the License.

  The Initial Developer of the Original Code is Ericsson AB.
    </legalnotice>

    <title>inviso_rt</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
  </header>
  <module>inviso_rt</module>
  <modulesummary>Direct API to the Inviso Runtime Component</modulesummary>
  <description>
    <p>The <c>inviso_rt</c> API is normally only used when programming autostart scripts or similar mechanisms. The reason is that the runtime component is part of the Runtime_tools application and will therefore always be available. But the regular inviso API is part of the Inviso application not necessarily available on the node doing an autostart. It is of course possible to runt a "lean" tracer only using the runtime component manually (i.e not through autostart). The runtime component shall otherwise be controlled through the control component, which is accessed with the <c>inviso</c> API.</p>
  </description>
  <funcs>
    <func>
      <name>init_tracing(TracerData) -> NodeResult | {error,Reason}</name>
      <fsummary>Initiate tracing</fsummary>
      <desc>
        <p>See <seealso marker="inviso#init_tracing/2">inviso:init_tracing/2</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>tp(Mod,Func,Arity,MatchSpec,Opts) -></name>
      <name>tp(Mod,Func,Arity,MatchSpec) -> NodeResult | {error,Reason}</name>
      <name>tp(PatternList) -> NodeResult | {error,Reason}</name>
      <fsummary>Set global trace patterns</fsummary>
      <type>
        <v>Mod,Func = atom() | '_' | ModRegExp | {DirRegExp,ModRegExp}</v>
        <v>&nbsp;ModRegExp = regexp_string()</v>
        <v>&nbsp;DirRegExp = regexp_string()</v>
        <v>Arity = int() | '_'</v>
        <v>MatchSpec = true | false | [] | matchspec()</v>
        <v>PatternList = [Pattern],</v>
        <v>&nbsp;Pattern = {Mod,Func,Arity,MatchSpec,Opts}</v>
        <v>Opts = [Opt]</v>
        <v>&nbsp;Opt = only_loaded</v>
        <v>NodeResult = {ok,[Ans]} | {error,Reason}</v>
        <v>&nbsp;&nbsp;Ans = int() | {error,Reason}</v>
      </type>
      <desc>
        <p>Set global trace patterns. The integer replied if the call was successfull describes the number of matched functions. Using wildcards follows the rules for wildcards of <c>erlang:trace_pattern</c>. It is for instance illegal to specify <c>M=='_'</c> while <c>F</c> is not <c>'_'</c>.</p>
        <p>Modules can also be specified using Erlang regular expressions as described in the <c>regexp</c> module. If <c>{DirRegExp,ModRegExp}</c> is used, module selection will further be restricted by that the module must be loaded from a location containing <c>DirRegExp</c> somewhere in the path. This can be used to for instance trace on all modules belonging to a certain application.</p>
      </desc>
    </func>
    <func>
      <name>tpl(Mod,Func,Arity,MatchSpec) -></name>
      <name>tpl(Mod,Func,Arity,MatchSpec,Opts) -> NodeResult | {error,Reason}</name>
      <name>tpl(PatternList) -> NodeResult | {error,Reason}</name>
      <fsummary>Set local trace patterns</fsummary>
      <desc>
        <p>See <seealso marker="#tp/5">tp/N</seealso> function above for details on arguments and return values.</p>
        <p>Set local trace pattern on specified functions.</p>
      </desc>
    </func>
    <func>
      <name>ctp(Mod,Func,Arity) -> NodeResult | {error,Reason}</name>
      <fsummary>Clear global trace patterns</fsummary>
      <desc>
        <p>See <seealso marker="#tp/5">tp/N</seealso> for argument descriptions.</p>
        <p>Clear global trace patterns.</p>
      </desc>
    </func>
    <func>
      <name>ctpl(Mod,Func,Arity) -> NodeResult | {error,Reason}</name>
      <fsummary>Clear local trace patterns</fsummary>
      <desc>
        <p>See <seealso marker="#tp/5">tp/N</seealso> for argument description.</p>
        <p>Clear local trace patterns.</p>
      </desc>
    </func>
    <func>
      <name>tf(PidSpec,FlagList) -> NodeResult | {error,Reason}</name>
      <name>tf(TraceConfList) -> NodeResult | {error,Reason}</name>
      <fsummary>Set process trace flags</fsummary>
      <type>
        <v>TraceConfList = [{PidSpec,FlagList}]</v>
        <v>FlagList = [Flag]</v>
        <v>PidSpec = all | new| existing | pid() | locally_registered_name()</v>
        <v>Flag =  all process trace flags allowed.</v>
        <v>NodeResult = {ok,[Ans]} | {error,Reason}</v>
        <v>Ans = int() | {error,Reason}</v>
      </type>
      <desc>
        <p>Set process trace flags. The integer returned if the call was successful describes the matched number of processes.</p>
      </desc>
    </func>
    <func>
      <name>ctf(PidSpec,FlagList) -> NodeResult | {error,Reason}</name>
      <name>ctf(TraceConfList) -> NodeResult | {error,Reason}</name>
      <fsummary>Clear process trace flags</fsummary>
      <desc>
        <p>See <seealso marker="#tf/2">tf/1,2</seealso> for arguments and return value description.</p>
        <p>Clear process trace flags.</p>
      </desc>
    </func>
    <func>
      <name>init_tpm(Mod,Func,Arity,CallFunc) -> NodeResult | {error,Reason}</name>
      <name>init_tpm(Mod,Func,Arity,InitFunc,CallFunc,ReturnFunc,RemoveFunc) -> NodeResult | {error,Reason}</name>
      <fsummary>Initialize meta tracing</fsummary>
      <type>
        <v>Mod = Func = atom()</v>
        <v>Arity = int()</v>
        <v>NodeResult = ok | {error,Reason}</v>
        <v>InitFunc = RemoveFunc = {Module,Function} | function()/4 | void</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#init_tpm/4">inviso:init_tpm/5,7</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>tpm(Mod,Func,Arity,MS) -> NodeResult | {error,Reason}</name>
      <name>tpm(Mod,Func,Arity,MS,CallFunc) -> NodeResults | {error,Reason}</name>
      <name>tpm(Mod,Func,Arity,MS,InitFunc,CallFunc,ReturnFunc,RemoveFunc) -> NodeResults | {error,Reason}</name>
      <fsummary>Activate meta tracing</fsummary>
      <type>
        <v>Mod = Func = atom() =/= '_'</v>
        <v>Arity = int()</v>
        <v>MS = match_spec()</v>
        <v>InitFunc = CallFunc = ReturnFunc = RemoveFunc = {Module,Function} | function()</v>
        <v>NodeResult = {ok,1} | {ok,0} | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#tpm/4">inviso:tpm/4,5,8</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>tpm_tracer(Mod,Func,Arity,MS) -> NodeResult | {error,Reason}</name>
      <name>tpm_tracer(Mod,Func,Arity,MS,CallFunc) -> NodeResults | {error,Reason}</name>
      <name>tpm_tracer(Mod,Func,Arity,MS,InitFunc,CallFunc,ReturnFunc,RemoveFunc) -> NodeResults | {error,Reason}</name>
      <fsummary>Activate meta tracing</fsummary>
      <desc>
        <p>See inviso:tpm_tracer/4,5,8 for details.</p>
      </desc>
    </func>
    <func>
      <name>tpm_ms(Mod,Func,Arity,MSname,MS) ->d NodeResult | {error,Reason}</name>
      <fsummary>Add match specifications</fsummary>
      <type>
        <v>Mod = Func = atom()</v>
        <v>Arity = int()</v>
        <v>MSname = term()</v>
        <v>MatchSpec = [match_spec()]</v>
        <v>NodeResult = {ok,1} | {ok,0} | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#tpm_ms/5">inviso:tpm_ms/5</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>tpm_ms_tracer(Mod,Func,Arity,MSname,MS) ->d NodeResult | {error,Reason}</name>
      <fsummary>Add match specifications</fsummary>
      <desc>
        <p>See inviso:tpm_ms_tracer/5 for details.</p>
      </desc>
    </func>
    <func>
      <name>ctpm_ms(Mod,Func,Arity,MSname) -> NodeResult | {error,Reason}</name>
      <fsummary>Remove a match specification</fsummary>
      <type>
        <v>NodeResult = ok | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#ctpm_ms/4">inviso:ctpm_ms/4</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>ctpm(Mod,Func,Arity) -> {ok,NodeResults} | NodeResult | {error,Reason}</name>
      <fsummary>Remove a meta trace pattern</fsummary>
      <type>
        <v>NodeResults = [{Node,NodeResult}]</v>
        <v>NodeResult = ok | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#ctpm/3">inviso:ctpm/3</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>local_register() ->NodeResult | {error,Reason}</name>
      <fsummary>Set meta trace pattern on <c>register/2</c></fsummary>
      <type>
        <v>NodeResult = {R1,R2}</v>
        <v>R1 = R2 = {ok,0} | {ok,1} | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#tpm_localnames/0">inviso:tpm_localnames/0</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>remove_local_register() ->NodeResult | {error,Reason}</name>
      <fsummary>Clear meta trace pattern on <c>register/2</c></fsummary>
      <type>
        <v>NodeResult = {R1,R2} | {error,Reason}</v>
        <v>R1 = R2 = ok | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#ctpm_localnames/0">inviso:ctpm_localnames/0</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>global_register() ->NodeResult | {error,Reason}</name>
      <fsummary>Set meta trace pattern on <c>global:register_name/2</c></fsummary>
      <type>
        <v>NodeResult = {R1,R2} | {error,Reason}</v>
        <v>R1 = R2 = {ok,0} | {ok,1} | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#tpm_globalnames/0">inviso:tpm_globalnames/0</seealso> for details.</p>
      </desc>
    </func>
    <func>
      <name>remove_global_register() ->NodeResult | {error,Reason}</name>
      <fsummary>Clear meta trace pattern on <c>global:register_name/2</c></fsummary>
      <type>
        <v>NodeResult = {R1,R2} | {error,Reason}</v>
        <v>R1 = R2 = ok | {error,Reason}</v>
      </type>
      <desc>
        <p>See <seealso marker="inviso#ctpm_globalnames/0">inviso:ctpm_globalnames/0</seealso> for details.</p>
      </desc>
    </func>
  </funcs>
</erlref>