Re: [PATCH 2/2] trace-cmd: Use tracecmd_peek_next_data() in fgraph_ent_handler

From: Steven Rostedt
Date: Tue Jul 12 2016 - 08:32:20 EST


On Tue, 12 Jul 2016 09:17:25 +0900
Namhyung Kim <namhyung@xxxxxxxxxx> wrote:

> > Hmm, but what happens if the next data is just some random event on
> > another CPU. Do we want to break it up just because there's data on
> > another cpu?
>
> Yes, I think we should break. Isn't it natural to show an event in
> the middle of a function if it occurred before returning from the
> function? It would be more acccurate output IMHO. I guess most leaf
> functions are small so the end result would almost same.

OK, that sounds fine then.

>
>
> >
> > I wonder if we should grab a record from the same cpu and if it isn't
> > the return, then try another cpu?
>
> But in this case, it's a problem even if it's the return of the same
> function. The task can be migrated to another cpu during the
> function, and then can be migrated back to the original cpu while
> calling same function again. The entry of the first invocation would
> match to the exit of the Nth invocation..

I'll keep your patch as is then.

Thanks,

-- Steve