Skip to content


Subversion checkout URL

You can clone with
Download ZIP
221 lines (207 sloc) 9.424 kB
<html> <head>
<code>pan:start([File [,Nodes [,Procs [,Flags [,TPs]]]]]).</code><br>
starts a pan trace.
use the empty atom '' to get the default argument.
<li><b>File</b> TC|IP|Wrap - directs output<br>
<b>TC</b> atom() - send output to regular file. TC is used to
construct the directory name - default is timestamp()<br>
<b>IP</b> ip|{ip, <b>CallBack</b>} - send trace messages to the host
over IP<br>
<b>CallBack</b> atom() - name of callback module
<b>Wrap</b> {wrap, TC}|{wrap, TC, Cnt}|{wrap, TC, Cnt, Siz} - send
output to wrap log files<br>
<b>Cnt</b> integer() - number of wrap files - default is 8<br>
<b>Siz</b> integer() - max size of wrap files (bytes) - default is 128k<br>
<li><b>Nodes</b> axd|all|Node|[Node] - nodes to run trace on - default is axd<br>
<b>axd</b> - expands to all nodes matching "axd301@cp*"<br>
<b>all</b> - expands to all known nodes<br>
<b>Node</b> atom() - erlang node name<br>
<li><b>Procs</b> all|Proc|[Proc] - processes to trace - default is all<br>
<b>all</b> - all processes<br>
<b>new</b> - all processes that are created after the start of the trace<br>
<b>existing</b> - all processes that existes at the start of the trace<br>
<b>Proc</b> RegName|Pid <br>
<b>RegName</b> atom() - registered name<br>
<b>Pid</b> pid()
<li><b>Flags</b> Flag|[Flag] - see <code>erlang:trace/3</code>
<a href="">(R9)</a>
<a href="">(R8)</a>
<a href="">(R7)</a>
for description of flags - default is [procs, set_on_spawn]<br>
Flag can also be the aliases;<br>
dbg = [set_on_spawn,timestamp,call]<br>
gc = [set_on_spawn,timestamp,call,garbage_collection]<br>
proc = [set_on_spawn,timestamp,call,garbage_collection,running,
perf = [set_on_spawn,timestamp,call,garbage_collection,running,procs]<br>
prof = [set_on_spawn,timestamp,call,garbage_collection,running,procs,
all = [set_on_spawn,timestamp,call,garbage_collection,running,procs,
<b>TPs</b> [TP] - specifies which functions are seen in a call trace
<li><b>TP</b> - Mre|{Mre, MS}|M|{M}|{M, MS}|{M,F}|{M,F,MS}|
<li><b>Mre</b> string() - Mre is a regexp that is matched
against all module names
<li><b>M</b> atom() - module
<li><b>F</b> atom() - function
<li><b>A</b> integer() - arity
<li><b>MS</b> list() - match specification, see OTP erts doc<br>
the match spec aliases<br>
<code>stack -&gt; {'_',[],[{message,{process_dump}}]}</code><br> and
<br><code>return -&gt; {'_',[],[{return_trace}]};</code><br>
can be used to get stack and return value info, respectively.
the atom <code>local</code> can be appended to all <b>TP</b>
tuples to activate tracing on non-exported functions. By
default, the traing only applies to <code>global</code>
(i.e. exported) functions.
<li> perf trace on entire system (all procs)<br>
<li> call trace on some modules in half call processes<br>
("^cc" expands to all all exported functions in modules with names
that begin with "cc")<br>
<li> profiling trace on half call processes (pretty slow)<br>
<code>pan:start(proftrc,axd,mdispServer,prof,[{'_', local}]).</code>
<li> debug (call,send,receive) trace on all exported functions
in modules starting with "cc"<br>
<li> call trace on SAAL signalling <br>
<li> call trace on erlang:now/0 with process info via the ip port<br>
<li> as above but with callback<br>
<code>pan:start({ip, cb_stack},'','','',{erlang,now,[stack]}).</code>
<li> call trace on all exported functions in the
<code>calendar</code> module with return value;
Stops the current pan trace and start a new one.<br>
The second trace will run for as long a the first one did. The
pan:?summ() functions will subtract the first from the second
The idea idea is to start a trace, run a test case, mark the
trace. This allows one to subtract out the background activities.
Stops the current pan trace.
<code>pan:scan(File [,OutFile [,Filter [,FirstMsg [,LastMsg]]]]).</code><br>
Scans a pan trc file File for trace massages, applies Filter to each
message and passes the result to Output.<br>
use the empty atom '' to get the default argument.
<li><b>File</b> string() - log file name
<li><b>OutFile</b> string() - output file name - default is the screen
<li><b>Filter</b> {cb, M}|Term - calls the function M:go([Msg, Line,
Out, State]) -&gt; NewState
or scans for messages containing Term<br>
M atom() - callback function module name<br>
Term term() - scan filter term<br>
Msg {Tag, ProcI, Data, Timestamp} - trace message<br>
Tag atom() - trace message tag (see below)<br>
ProcI {Pid, Info} - process info<br>
Pid pid()<br>
Info RegName|InitCall<br>
RegName atom() - registered name<br>
InitCall MFA - initial call <br>
MFA {Module, Function, Arity}<br>
Data term() - extra trace info (see below)<br>
Timestamp timestamp()|no_time<br>
Out fd() - file descriptor of output file<br>
State term() - callback functions state
Tag Data
'receive', Message
call, {M,F,A}
exit, Reason
return_to, {M,F,A}
spawn, Pid2
link, Pid2
unlink, Pid2
getting_linked, Pid2
in, {M,F,A}
out, {M,F,A}
gc_start, Info
gc_end, Info
send, {Pid2, Msg}
send_to_non_existing_process, {Msg, Pid2}
return_from, {{M,F,A}, ReturnValue}
<li><b>FirstMsg</b> integer() - sequence number of first message to process
<li><b>LastMsg</b> integer() - sequence number of last message to process
<li> call the callback function cb_cnt:go/1 once foreach message in
the trc file<br>
<li> print all messages that contain the atom get_cp
<code>pan:perf(File [,OutFile]).</code><br>
Summarizes a pan performance trace (processes and tables). Collapses
identical process tags. trace file should be generated by
<code>pan:start</code> with Flags set to 'perf'.
<li><b>File</b> string() - file name of the test case (typically /tmp/pan/&lt;TC&gt;)
<li><b>OutFile</b> string() - output file name - default is screen
<code>pan:prof(File [,OutFile[,Stack]]).</code><br>
Analyzes a pan profiling trace. trace file should be generated by
<code>pan:start</code> with Flags set to 'prof'.
<li><b>File</b> string() - file name of the test case
(typically /tmp/pan/&lt;TC&gt;)
<li><b>Proc</b> string()|tuple() - display profiling for the process
Proc. Proc can be an atom (a registered name), an initial call
({M,F,A}) or, if thee are more that one process with the same
initial call the tuple {{M,F,A}, N}, where the integer N is an
arbitrary index.
<li><b>Stack</b> list() - display profiling at Stack, where Stack is
a list of {M, F, A} tuples. if Stack is the empty atom '' the
most cpu expensive stack is shown.
handles a pan debugging session. this is similar to the OTP
<code>dbg</code> application, but (supposedly) less intrusive.
<li><b>TPs</b> list() - list of TP (trace patterns).
see <code>pan:start</code>
<li><b>Nodes</b> list() - list of erlang node names to trace on
<li><b>Procs</b> list() - list of process names to trace on
help (this text)
<!-- hhmts start -->
Last modified: Wed Mar 26 11:23:58 MET 2003
<!-- hhmts end -->
</body> </html>
Jump to Line
Something went wrong with that request. Please try again.