ttb.erl / observer - process_info only effective one-way
Nate Murray
nate@REDACTED
Thu Aug 13 02:05:40 CEST 2009
Hey guys, I'm just diving in to using ttb / observer.erl and I'm
having a bit of trouble using it with gen_server.
The Problem:
`from` and `to` don't match. e.g. the trace contents resolves to:
[{label, send},
{detail_level,40},
{from,<7070.77.0>},
{to,{<7070.65.0>,node2,'node@REDACTED'}},
{msg,{'$gen_cast',{etc}}}]
Note that in `to` we properly receive a tuple due to the ttb:tracer
option {process_info,true}. However in the `from` we have only a lowly
pid. This causes the messages to have two targets rather than one.
e.g. pid 7070.65.0 in the above example shows up in the logs as *both*
{<7070.65.0>,node2,'node@REDACTED'} and <7070.65.0> .
The Setup:
ttb:tracer(node(), [{file,"trace/ttb"},{process_info,true}]),
% ...
ttb:p(Pid, [call,send])
MS1 = [{'_',[],[{return_trace},{message,{caller}}]}], %
dbg:fun2ms(fun(_) -> return_trace(),message(caller()) end),
ttb:tpl(gen_server, loop, MS1),
% ...
ttb:stop(),
ttb:format("trace")
An interesting fact is that if i set {process_info,false} then the
pids *do* line up! I get the correct number of pids with no
duplicates. The downside is I get only raw pid numbers and no
registered names. Lack of registered names make it once again
difficult to determine who is calling whom.
Any thoughts on how to get process_info to work for both `from` and `to`?
Nate
More information about the erlang-questions
mailing list