aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/ttb.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-09-27 10:54:10 +0200
committerSiri Hansen <[email protected]>2016-09-27 10:54:10 +0200
commitcf7220cd933a7b7efbb79c2b8458b21ff047d863 (patch)
treed32295d74e8f397f586467d9c9b6465f9f5cc40a /lib/observer/src/ttb.erl
parentcd4916b5fa531bdfea77a87bd8f37133955532f9 (diff)
parentac1a648ff518e0aa92cb14773b617829081a75d0 (diff)
downloadotp-cf7220cd933a7b7efbb79c2b8458b21ff047d863.tar.gz
otp-cf7220cd933a7b7efbb79c2b8458b21ff047d863.tar.bz2
otp-cf7220cd933a7b7efbb79c2b8458b21ff047d863.zip
Merge branch 'siri/ttb/ip-client-queue-size/OTP-13829' into maint
* siri/ttb/ip-client-queue-size/OTP-13829: [ttb] Add option <c>queue_size</c> to tracer/2
Diffstat (limited to 'lib/observer/src/ttb.erl')
-rw-r--r--lib/observer/src/ttb.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl
index ac6c4572eb..87a50e046b 100644
--- a/lib/observer/src/ttb.erl
+++ b/lib/observer/src/ttb.erl
@@ -78,6 +78,11 @@ do_tracer(Nodes0,PI,Client,Traci) ->
do_tracer(Clients,PI,Traci) ->
Shell = proplists:get_value(shell, Traci, false),
+ IpPortSpec =
+ case proplists:get_value(queue_size, Traci) of
+ undefined -> 0;
+ QS -> {0,QS}
+ end,
DefShell = fun(Trace) -> dbg:dhandler(Trace, standard_io) end,
{ClientSucc,Succ} =
lists:foldl(
@@ -98,7 +103,7 @@ do_tracer(Clients,PI,Traci) ->
[_,H] = string:tokens(atom_to_list(N),"@"),
H
end,
- case catch dbg:tracer(N,port,dbg:trace_port(ip,0)) of
+ case catch dbg:tracer(N,port,dbg:trace_port(ip,IpPortSpec)) of
{ok,N} ->
{ok,Port} = dbg:trace_port_control(N,get_listen_port),
{ok,T} = dbg:get_tracer(N),
@@ -160,6 +165,8 @@ opt([{resume,MSec}|O],{PI,Client,Traci}) ->
opt(O,{PI,Client,[{resume, {true, MSec}}|Traci]});
opt([{flush,MSec}|O],{PI,Client,Traci}) ->
opt(O,{PI,Client,[{flush, MSec}|Traci]});
+opt([{queue_size,QueueSize}|O],{PI,Client,Traci}) ->
+ opt(O,{PI,Client,[{queue_size,QueueSize}|Traci]});
opt([],Opt) ->
ensure_opt(Opt).