diff options
author | Piotr Dorobisz <[email protected]> | 2011-03-09 13:01:34 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-08-30 15:22:17 +0200 |
commit | f5436f5c0c44e75777a7501944a166408a0702cd (patch) | |
tree | 48f1f80ec8bb7e9105d90bdc7c2dc606de9ebb35 /lib/observer/src/ttb.erl | |
parent | 034b105741df4e6d740ad1ec4b97df569eb2a6ca (diff) | |
download | otp-f5436f5c0c44e75777a7501944a166408a0702cd.tar.gz otp-f5436f5c0c44e75777a7501944a166408a0702cd.tar.bz2 otp-f5436f5c0c44e75777a7501944a166408a0702cd.zip |
One-command trace setup
Diffstat (limited to 'lib/observer/src/ttb.erl')
-rw-r--r-- | lib/observer/src/ttb.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl index 1a34e5b2fc..2498be150d 100644 --- a/lib/observer/src/ttb.erl +++ b/lib/observer/src/ttb.erl @@ -20,7 +20,7 @@ -author('[email protected]'). %% API --export([tracer/0,tracer/1,tracer/2,p/2,stop/0,stop/1]). +-export([tracer/0,tracer/1,tracer/2,p/2,stop/0,stop/1,start_trace/4]). -export([tp/2, tp/3, tp/4, ctp/0, ctp/1, ctp/2, ctp/3, tpl/2, tpl/3, tpl/4, ctpl/0, ctpl/1, ctpl/2, ctpl/3, ctpg/0, ctpg/1, ctpg/2, ctpg/3]). -export([seq_trigger_ms/0,seq_trigger_ms/1]). @@ -44,6 +44,15 @@ -endif. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Shortcut +start_trace(Nodes, Patterns, {Procs, Flags}, Options) -> + {ok, _} = tracer(Nodes, Options), + {ok, _} = p(Procs, Flags), + [{ok, _} = apply(?MODULE, tpl, tuple_to_list(Args)) || Args <- Patterns]. + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Open a trace port on all given nodes and create the meta data file tracer() -> tracer(node()). tracer(Nodes) -> tracer(Nodes,[]). |