[erlang-questions] Erlang tracing

Lukas Larsson lukas@REDACTED
Mon Sep 21 19:58:48 CEST 2015


On Mon, Sep 21, 2015 at 7:47 PM, Fred Hebert <mononcqc@REDACTED> wrote:

> On 09/21, Lukas Larsson wrote:
>
>>
>> Do you mean something like what is possible today with {message,{caller}}
>> and/or {message,{process_dump}}? i.e. dbg:tracer(),dbg:p(all,c),
>> dbg:tp(lists,map, [{'_',[],[{message,{caller}}]}]).
>>
>
> I used mostly the trace BIFs directly. I'm guessing this would be the
> 'meta' specs if it exists?
>

No, it uses the message part of the match spec syntax:
http://www.erlang.org/doc/apps/erts/match_spec.html

The match spec is just handed to erlang:trace_pattern, so
erlang:trace_pattern({lists,map,'_'}, [{'_',[],[{message,{caller}}]}], [])
gives the caller (not the entire call chain).

I'm not really sure when the meta stuff is used outside of {return_trace}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150921/fe2a7f50/attachment.htm>


More information about the erlang-questions mailing list