Quantcast

process trace triggered by sequential trace token

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

process trace triggered by sequential trace token

Dmitriy Kargapolov-3
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Kaiduan Xie-2
Dimitriy,

I

On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
<[hidden email]> 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.
>

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Kaiduan Xie-2
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 <[hidden email]> wrote:

> Dimitriy,
>
> I
>
> On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
> <[hidden email]> 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.
>>
>

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Dmitriy Kargapolov-3
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 <[hidden email]> 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 <[hidden email]> wrote:
> > Dimitriy,
> >
> > I
> >
> > On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
> > <[hidden email]> 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.
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Kaiduan Xie-2
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
<[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>> > Dimitriy,
>> >
>> > I
>> >
>> > On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
>> > <[hidden email]> 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.
>> >>
>> >
>
>

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Dmitriy Kargapolov-3
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 <[hidden email]> 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
> <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> wrote:
> >> > Dimitriy,
> >> >
> >> > I
> >> >
> >> > On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov
> >> > <[hidden email]> 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.
> >> >>
> >> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: process trace triggered by sequential trace token

Dmitriy Kargapolov-3
In reply to this post by Dmitriy Kargapolov-3
On Wed, Feb 2, 2011 at 10:04 AM, Dmitriy Kargapolov <
[hidden email]> 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.
>

Just want to let everybody know that this can be achieved by using
is_seq_trace as a guard in match specification. It could be used to allow
function trace only when trace token is set, or, to trigger silent mode to
allow/disable further trace messages. See
http://www.erlang.org/doc/apps/erts/match_spec.html for details.
Loading...