aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inviso/doc/src/inviso_rt.xml
blob: 1579c873a3be1152b37e811fb1ea509149983f39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<?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>