Re: [PATCH] trace-cmd: Do not use instance from trace context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Jul 29, 2022 at 4:51 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Fri, 29 Jul 2022 07:01:16 +0300
> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:
>
> > When trace-cmd initiates a connection to a trace agent over the network,
> > the logic in connect_to_agent() function incorrectly uses the last
> > instance saved in the trace context, instead of the actual instance
> > which is passed as input argument. This works if the remote agent is
> > set last on the command line, but causes a problem if there is more than
> > one agent or if there is a local buffer after the agent on the command
> > line.
> >
> > Reported-by: Alexander Aring <aahringo@xxxxxxxxxx>
> > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx>
> > ---
> >  tracecmd/trace-record.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
> > index 2406489a..50039dad 100644
> > --- a/tracecmd/trace-record.c
> > +++ b/tracecmd/trace-record.c
> > @@ -3934,15 +3934,15 @@ static void connect_to_agent(struct common_record_context *ctx,
> >               use_fifos = nr_fifos > 0;
> >       }
> >
> > -     if (ctx->instance->result) {
> > +     if (instance->result) {
>
> Bah, I kept getting confused by when to use instance vs ctx->instance,
> and I guess I messed this one up.

I tested it and it seems to fix the problem..., so if it's not to late:

Tested-by: Alexander Aring <aahringo@xxxxxxxxxx>

I am not sure what I should expect from the PTP time synchronization
over IP capable interfaces (it never worked for me) but I need to say
it is significantly slower than kvm time synchronization with vsock
and I am using only virtual interfaces. On the agents I get a couple
of:

CPU 1: 787 events lost
CPU 5: 3059 events lost
...

the result looks to me like garbage too, my lock states do not make
any sense...(maybe related due the events lost?)

However I think we should move this discussion to bugzilla?

- Alex




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux