Silent call trace

Mats Cronqvist mats.cronqvist@REDACTED
Thu Mar 2 09:30:28 CET 2006


   one has to wonder if this has ever been used by anyone (i know i've never 
used it)...

   the documentation seems more reasonable than the implementation to me.

   mats

Raimo Niskanen wrote:
> I just discovered a queer behaviour in the call trace.
> The man page says, concerning erlang:trace/3, trace flags:
> 
>             silent:
>                 Used in conjunction with  the  call  trace  flag.
>                 Call  tracing  is active and match specs are exe-
>                 cuted as normal, but no call trace  messages  are
>                 generated.
> 
>                 Silent   mode   is   inhibited    by    executing
>                 erlang:trace/3  without  the silent flag, or by a
>                 match spec executing the  {silent,  false}  func-
>                 tion.
> 
> It seems the actual implementation is that a regular call
> trace is not affected by the 'silent' flag. It is only when
> there is a match spec on the trace point that the trace
> message gets silenced. I.e an empty match spec list to
> erlang:trace_pattern/3 cause trace messages to ignore
> the 'silent' flag.
> 
> This could either be regarded as a bug in the documentation
> because one might argue that the 'silent' flag has always
> been intended to co-operate with match specs and should
> therefore only affect match spec trace points,
> or,
> it could be regarded as a bug in the implementation that
> behaves differently if there is a match spec vs an empty one.
> 
> Opinions?
> 
> Has anyone built an application needing the existing behaviour?
> 
> 
> [ The second paragraph in the quote above from 
>   the manual is also incorrect: you have to use
>   e.g erlang:trace(Pid, false, [silent])
>   to disable the 'silent' flag.                 ]
> 



More information about the erlang-questions mailing list