From 96175f1ebfd109f1268898d68a735ec5a16e9933 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Wed, 20 Apr 2016 11:43:08 +0200
Subject: [ttb] Set trace patterns on messages
Functions ttb:tpe/2 and ttb:ctpe/1 are added.
---
lib/observer/doc/src/ttb.xml | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
(limited to 'lib/observer/doc/src/ttb.xml')
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml
index 2b637551db..76bbc777e8 100644
--- a/lib/observer/doc/src/ttb.xml
+++ b/lib/observer/doc/src/ttb.xml
@@ -257,17 +257,23 @@ ttb:p(all, call).
- tp, tpl, ctp, ctpl, ctpg
+ tp, tpl, tpe, ctp, ctpl, ctpg, ctpe
Set and clear trace patterns.
- These functions are to be used with
- trace flag call for setting and clearing trace
- patterns. When trace flag call is set on a process,
+
These functions are to be used with trace
+ flag call, send, and 'receive' for
+ setting and clearing trace patterns.
+ When trace flag call 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
- ERTS User's Guide.
+ pattern is set for the called function.
+ The send and 'receive' flags enable tracing
+ of all messages sent and received by the process. Trace
+ patterns set with tpe may limit traced messages based
+ on the message content, the sender, and/or the receiver.
+ Trace patterns specify how to trace a function or a message
+ by using match specifications. Match specifications are
+ described in the
+ ERTS User's Guide.
These functions are equivalent to the corresponding
functions in module
@@ -284,6 +290,8 @@ ttb:p(all, call).
Sets trace patterns on global function calls.
tpl
Sets trace patterns on local and global function calls.
+ tpe
+ Sets trace patterns on messages.
ctp
Clears trace patterns on local and global function
calls.
@@ -291,13 +299,15 @@ ttb:p(all, call).
Clears trace patterns on local function calls.
ctpg
Clears trace patterns on global function calls.
+ ctpe
+ Clears trace patterns on messages.
With tp and tpl, one of the match specification shortcuts
can be used (for example, ttb:tp(foo_module, caller)).
The shortcuts are as follows:
- return - for [{'_',[],[{return_trace}]}]
- (report the return value)
+ (report the return value from a traced function)
- caller - for [{'_',[],[{message,{caller}}]}]
(report the calling function)
- {codestr, Str} - for dbg:fun2ms/1 arguments
--
cgit v1.2.3
From 90989e58d9e7f7c6fc3c4b52e4191d66d8ff2a96 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Thu, 28 Apr 2016 09:52:48 +0200
Subject: [ttb] Allow setting trace flags on ports
---
lib/observer/doc/src/ttb.xml | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
(limited to 'lib/observer/doc/src/ttb.xml')
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml
index 76bbc777e8..94ecef24b4 100644
--- a/lib/observer/doc/src/ttb.xml
+++ b/lib/observer/doc/src/ttb.xml
@@ -229,27 +229,33 @@ ttb:p(all, call).
- p(Procs,Flags) -> Return
- Set the specified trace flags on the specified processes.
+ p(Item,Flags) -> Return
+ Set the specified trace flags on the specified processes or ports.
- Return = {ok,[{Procs,MatchDesc}]}
- Procs = Process | [Process] | all | new | existing
- Process = pid() | atom() | {global,atom()}
+ Return = {ok,[{Item,MatchDesc}]}
+ Items = Item | [Item]
+ Item = pid() | port() | RegName | {global,GlobalRegName} |
+ all | processes | ports |
+ existing | existing_processes | existing_ports |
+ new | new_processes | new_ports
+ RegName = atom()
+ GlobalRegName = term()
Flags = Flag | [Flag]
- Sets the specified trace flags on the specified
- processes. Flag timestamp is always turned on.
+
Sets the specified trace flags on the specified processes
+ or ports. Flag timestamp is always turned on.
See the Reference Manual for module
dbg
- and the possible trace flags. Parameter
+ for the possible trace flags. Parameter
MatchDesc is the same as returned from
dbg:p/2.
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.
+ 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.
Issuing this command starts the timer for this trace if option
timer is specified with tracer/2.
@@ -267,7 +273,7 @@ ttb:p(all, call).
function calls are traced on that process if a trace
pattern is set for the called function.
The send and 'receive' flags enable tracing
- of all messages sent and received by the process. Trace
+ of all messages sent and received by the process/port. Trace
patterns set with tpe may limit traced messages based
on the message content, the sender, and/or the receiver.
Trace patterns specify how to trace a function or a message
--
cgit v1.2.3