[erlang-questions] process trace triggered by sequential trace token

Dmitriy Kargapolov dmitriy.kargapolov@REDACTED
Wed Feb 2 19:14:36 CET 2011


Yes, I do know the pid. Its easy to turn tracing on for the particular pid
and set of match specs, but the problem is that the gen_server is serving
real calls and these calls must not interfere with tracing of one particular
call which I would like to trace.
Its easy to achieve that adding small code into callback (which for example
would check the presence of token and trigger process trace), but the
question is if this is possible to do the same without patching the code. I
didn't find the way.

On Wed, Feb 2, 2011 at 12:38 PM, Kaiduan Xie <kaiduanx@REDACTED> wrote:

> Dmitriy,
>
> Please correct me if my understanding is wrong.
>
> You would like to trace a particular function of a particular
> gen_server without changing the code. Do you know the pid of the
> gen_server? How you know the pid of the interested gen_server?
>
> Best regards,
>
> /Kaiduan
>
> On Wed, Feb 2, 2011 at 11:40 AM, Dmitriy Kargapolov
> <dmitriy.kargapolov@REDACTED> wrote:
> > Kaiduan,
> > I'd like to trace function calls (per match specs) in the body (callback)
> of
> > gen_server for particular call to this gen_server. I'd like to do this on
> > existing code, meaning no code alteration should be done to this
> gen_server
> > process. If this is what you were able to do, would you please share your
> > experience?
> > Thank you.
> >
> > On Wed, Feb 2, 2011 at 11:07 AM, Kaiduan Xie <kaiduanx@REDACTED> wrote:
> >>
> >> Sorry for hitting wrong key.
> >>
> >> I have successfully traced a particular call from user A to user B
> >> based on the headers in SIP message in a system that has many
> >> concurrent calls using sequential trace. I do not know if this is what
> >> you want.
> >>
> >> Best regards,
> >>
> >> /Kaiduan
> >>
> >> On Wed, Feb 2, 2011 at 11:04 AM, Kaiduan Xie <kaiduanx@REDACTED>
> wrote:
> >> > Dimitriy,
> >> >
> >> > I
> >> >
> >> > On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
> >> > <dmitriy.kargapolov@REDACTED> wrote:
> >> >> Hi All,
> >> >> I'd like to trace gen_server body execution, not for all calls, but
> for
> >> >> particular one.
> >> >> Is there a way to enable trace for the process by received (and
> >> >> matched)
> >> >> message "contaminated" by trace token? (And disable it at the end of
> >> >> message
> >> >> processing). I know there is a way to turn sequential trace by
> matching
> >> >> regular function call, but I need things to go in reverse order...
> >> >> Thanks.
> >> >>
> >> >
> >
> >
>


More information about the erlang-questions mailing list