Re: [PATCH V3 3/3] perf tools: Construct LBR call chain

From: Namhyung Kim
Date: Wed Nov 19 2014 - 00:57:32 EST


Hi Kan,

On Tue, 18 Nov 2014 19:40:23 +0000, Kan Liang wrote:
>> > whole
>> > > >> stack.
>> > > >> > + */
>> > > >>
>> > > >> Andi is using some sanity checks:
>> > > >> http://marc.info/?l=linux-kernel&m=141584447819894&w=2
>> > > >> I guess this could be applied in here, once his patch gets in.
>> > > >>
>> > > >
>> > > > Are you suggesting me to remove the comments, or rebase the
>> whole
>> > > > patch to Andi's patch once it's merged?
>> > > >
>> > > > The branch history in Andi's patch is different as the call stack,
>> > > > although they are both from LBR.
>> > > > Andi's branch history recording branch records for taken branches,
>> > > > interrupts, and exceptions.
>> > > > While the LBR call stack records for the call stack.
>> > >
>> > > Right. And branch history can overlap with normal callchains so
>> > > additional check in there is to remove duplication. While LBR call
>> > > stack is separated to user only so there should be no overlap.
>> >
>> > hum, it seemed to me like the remove_loops function could be used for
>> > this one as well.. but anyway I meant that this can be introduced
>> > later after Andi's change gets in
>>
>> I see. I will apply Andi's remove_loops.
>>
>
> As Namhyung said, there is no overlap for LBR call stack. The user callchain
> is not a mix. It's from either LBR or FP. so remove_loops
> doesn't fit to the LBR call stack.

IIUC the remove_loops() is for eliminating repeated branches in a loop
in a single function (and it only checks LBRs not FP callchain). It's
needed since branch history saves all branches, but not needed for LBR
callstack as it saves CALLs only.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/