aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer
diff options
context:
space:
mode:
authorPiotr Dorobisz <piotr.dorobisz@erlang-solutions.com>2011-03-09 13:01:34 +0100
committerHenrik Nord <henrik@erlang.org>2011-08-30 15:22:17 +0200
commitf5436f5c0c44e75777a7501944a166408a0702cd (patch)
tree48f1f80ec8bb7e9105d90bdc7c2dc606de9ebb35 /lib/observer
parent034b105741df4e6d740ad1ec4b97df569eb2a6ca (diff)
downloadotp-f5436f5c0c44e75777a7501944a166408a0702cd.tar.gz
otp-f5436f5c0c44e75777a7501944a166408a0702cd.tar.bz2
otp-f5436f5c0c44e75777a7501944a166408a0702cd.zip
One-command trace setup
Diffstat (limited to 'lib/observer')
-rw-r--r--lib/observer/src/ttb.erl11
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('siri@erix.ericsson.se').
%% 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,[]).