aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_trace_wx.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-05-12 09:49:25 +0200
committerSiri Hansen <[email protected]>2016-05-20 09:40:55 +0200
commitd70f97d61f632b92b3e29e133487a082d2de04fc (patch)
tree99a5a056c1e6ddb5ed8976ad81a34a85630c3f38 /lib/observer/src/observer_trace_wx.erl
parentc17d02df4184e2e1425827b2e469936c686049ed (diff)
downloadotp-d70f97d61f632b92b3e29e133487a082d2de04fc.tar.gz
otp-d70f97d61f632b92b3e29e133487a082d2de04fc.tar.bz2
otp-d70f97d61f632b92b3e29e133487a082d2de04fc.zip
[observer] Add more default match specs for messages
Diffstat (limited to 'lib/observer/src/observer_trace_wx.erl')
-rw-r--r--lib/observer/src/observer_trace_wx.erl22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl
index 5c34961fc1..f104f5bb19 100644
--- a/lib/observer/src/observer_trace_wx.erl
+++ b/lib/observer/src/observer_trace_wx.erl
@@ -143,16 +143,24 @@ default_matchspecs(Key) ->
[make_ms(Name,Term,FunStr) || {Name,Term,FunStr} <- Ms].
get_default_matchspecs(funcs) ->
- [{"Skeleton", [{'$1', [], [true]}], "fun(Args) -> true end"},
- {"Return Trace", [{'_', [], [{return_trace}]}],
+ [{"Return Trace", [{'_', [], [{return_trace}]}],
"fun(_) -> return_trace() end"},
- {"Exception Trace", [{'_', [], [{exception_trace}]}], "fun(_) -> exception_trace() end"},
- {"Message Caller", [{'_', [], [{message,{caller}}]}], "fun(_) -> message(caller()) end"},
- {"Message Dump", [{'_', [], [{message,{process_dump}}]}], "fun(_) -> message(process_dump()) end"}];
+ {"Exception Trace", [{'_', [], [{exception_trace}]}],
+ "fun(_) -> exception_trace() end"},
+ {"Message Caller", [{'_', [], [{message,{caller}}]}],
+ "fun(_) -> message(caller()) end"},
+ {"Message Dump", [{'_', [], [{message,{process_dump}}]}],
+ "fun(_) -> message(process_dump()) end"}];
get_default_matchspecs(send) ->
- [{"Skeleton", [{['$1','$2'], [], [true]}], "fun([Pid,Msg]) -> true end"}];
+ [{"To local node", [{['$1','_'], [{'==',{node,'$1'},{node}}], []}],
+ "fun([Pid,_]) when node(Pid)==node() ->\n true\nend"},
+ {"To remote node", [{['$1','_'], [{'=/=',{node,'$1'},{node}}], []}],
+ "fun([Pid,_]) when node(Pid)=/=node() ->\n true\nend"}];
get_default_matchspecs('receive') ->
- [{"Skeleton", [{['$1','$2','$3'], [], [true]}], "fun([Node,Pid,Msg]) -> true end"}].
+ [{"From local node", [{['$1','_','_'], [{'==','$1',{node}}], []}],
+ "fun([Node,_,_]) when Node==node() ->\n true\nend"},
+ {"From remote node", [{['$1','_','_'], [{'=/=','$1',{node}}], []}],
+ "fun([Node,_,_]) when Node=/=node() ->\n true\nend"}].
create_proc_port_view(Parent) ->