diff options
author | Siri Hansen <[email protected]> | 2016-05-26 15:29:03 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-05-26 15:29:03 +0200 |
commit | e5f436615f0649a4d19b03762c016e91e0dce0eb (patch) | |
tree | d6095deb384ed356c775bff0c923152a27b677ab /lib/observer/doc/src/ttb.xml | |
parent | 89adc0eec23c1a3ac552650004863de4cf82422e (diff) | |
parent | ab22fe599d0e6918cea46d620acaf7f8e16d36b6 (diff) | |
download | otp-e5f436615f0649a4d19b03762c016e91e0dce0eb.tar.gz otp-e5f436615f0649a4d19b03762c016e91e0dce0eb.tar.bz2 otp-e5f436615f0649a4d19b03762c016e91e0dce0eb.zip |
Merge branch 'siri/observer/improve-trace/OTP-13481'
* siri/observer/improve-trace/OTP-13481:
[observer] Update user guide
[observer] Automatically add active node
[observer] Allow more trace flags on procs/ports from GUI
[runtime_tools] Don't trace the trace client port
[runtime_tools] Allow setting trace flag 'exiting' with dbg
[observer] Add more default match specs for messages
[observer] Add test of new Ports tab
[observer] Improve appearance in Trace tab
[observer] Allow multiple select in Ports tab
[observer] Make right click menu act on the "expected pid"
[observer] In Trace tab, show procs/ports for selected node only
[observer] Add right click menu in Table tab
[observer] Add menu option to set default MS for send/receive
[observer] Add tracing of ports
[ttb] Allow setting trace flags on ports
[observer] Set correct parent in Label dialog
[observer] Add Ports tab in GUI
[observer] Add functionality in GUI for trace pattern on messages
[ttb] Set trace patterns on messages
Conflicts:
lib/observer/src/observer_wx.erl
Diffstat (limited to 'lib/observer/doc/src/ttb.xml')
-rw-r--r-- | lib/observer/doc/src/ttb.xml | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml index 2b637551db..94ecef24b4 100644 --- a/lib/observer/doc/src/ttb.xml +++ b/lib/observer/doc/src/ttb.xml @@ -229,27 +229,33 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>p(Procs,Flags) -> Return</name> - <fsummary>Set the specified trace flags on the specified processes.</fsummary> + <name>p(Item,Flags) -> Return</name> + <fsummary>Set the specified trace flags on the specified processes or ports.</fsummary> <type> - <v>Return = {ok,[{Procs,MatchDesc}]}</v> - <v>Procs = Process | [Process] | all | new | existing</v> - <v>Process = pid() | atom() | {global,atom()}</v> + <v>Return = {ok,[{Item,MatchDesc}]}</v> + <v>Items = Item | [Item]</v> + <v>Item = pid() | port() | RegName | {global,GlobalRegName} | + all | processes | ports | + existing | existing_processes | existing_ports | + new | new_processes | new_ports</v> + <v>RegName = atom()</v> + <v>GlobalRegName = term()</v> <v>Flags = Flag | [Flag]</v> </type> <desc> - <p>Sets the specified trace flags on the specified - processes. Flag <c>timestamp</c> is always turned on. + <p>Sets the specified trace flags on the specified processes + or ports. Flag <c>timestamp</c> is always turned on. </p> <p>See the Reference Manual for module <seealso marker="runtime_tools:dbg"><c>dbg</c></seealso> - and the possible trace flags. Parameter + for the possible trace flags. Parameter <c>MatchDesc</c> is the same as returned from <c>dbg:p/2</c>.</p> <p>Processes can be specified as registered names, globally - registered names, or process identifiers. If a registered name - is specified, the flags are set on processes with this name on all - active nodes.</p> + registered names, or process identifiers. Ports can be + specified as registered names or port identifiers. If a + registered name is specified, the flags are set on + processes/ports with this name on all active nodes.</p> <p>Issuing this command starts the timer for this trace if option <c>timer</c> is specified with <c>tracer/2</c>. </p> @@ -257,17 +263,23 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tp, tpl, ctp, ctpl, ctpg</name> + <name>tp, tpl, tpe, ctp, ctpl, ctpg, ctpe</name> <fsummary>Set and clear trace patterns.</fsummary> <desc> - <p>These functions are to be used with - trace flag <c>call</c> for setting and clearing trace - patterns. When trace flag <c>call</c> is set on a process, + <p>These functions are to be used with trace + flag <c>call</c>, <c>send</c>, and <c>'receive'</c> for + setting and clearing trace patterns.</p> + <p>When trace flag <c>call</c> is set on a process, function calls are traced on that process if a trace - pattern is set for the called function. Trace patterns - specify how to trace a function by using match - specifications. Match specifications are described in the - <seealso marker="erts:users_guide"><c>ERTS User's Guide</c></seealso>. + pattern is set for the called function.</p> + <p>The <c>send</c> and <c>'receive'</c> flags enable tracing + of all messages sent and received by the process/port. Trace + patterns set with <c>tpe</c> may limit traced messages based + on the message content, the sender, and/or the receiver.</p> + <p>Trace patterns specify how to trace a function or a message + by using match specifications. Match specifications are + described in the + <seealso marker="erts:match_spec"><c>ERTS User's Guide</c></seealso>. </p> <p>These functions are equivalent to the corresponding functions in module @@ -284,6 +296,8 @@ ttb:p(all, call).</input></pre> <item><p>Sets trace patterns on global function calls.</p></item> <tag><c>tpl</c></tag> <item><p>Sets trace patterns on local and global function calls.</p></item> + <tag><c>tpe</c></tag> + <item><p>Sets trace patterns on messages.</p></item> <tag><c>ctp</c></tag> <item><p>Clears trace patterns on local and global function calls.</p></item> @@ -291,13 +305,15 @@ ttb:p(all, call).</input></pre> <item><p>Clears trace patterns on local function calls.</p></item> <tag><c>ctpg</c></tag> <item><p>Clears trace patterns on global function calls.</p></item> + <tag><c>ctpe</c></tag> + <item><p>Clears trace patterns on messages.</p></item> </taglist> <p>With <c>tp</c> and <c>tpl</c>, one of the match specification shortcuts can be used (for example, <c>ttb:tp(foo_module, caller)</c>).</p> <p>The shortcuts are as follows:</p> <list type="bulleted"> <item><c>return</c> - for <c>[{'_',[],[{return_trace}]}]</c> - (report the return value)</item> + (report the return value from a traced function)</item> <item><c>caller</c> - for <c>[{'_',[],[{message,{caller}}]}]</c> (report the calling function)</item> <item><c>{codestr, Str}</c> - for <c>dbg:fun2ms/1</c> arguments |