RE: [PATCH V3 2/3] perf tool: Move cpumode resolve code to add_callchain_ip

From: Liang, Kan
Date: Fri Nov 21 2014 - 10:06:31 EST




> -----Original Message-----
> From: Jiri Olsa [mailto:jolsa@xxxxxxxxxx]
> Sent: Tuesday, November 18, 2014 3:25 AM
> To: Liang, Kan
> Cc: acme@xxxxxxxxxx; a.p.zijlstra@xxxxxxxxx; eranian@xxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; mingo@xxxxxxxxxx; paulus@xxxxxxxxx;
> ak@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH V3 2/3] perf tool: Move cpumode resolve code to
> add_callchain_ip
>
> On Fri, Nov 14, 2014 at 08:44:11AM -0500, kan.liang@xxxxxxxxx wrote:
> > From: Kan Liang <kan.liang@xxxxxxxxx>
> >
> > Move the cpumode resolve code to add_callchain_ip function.
> > No change in behavior.
> >
> > Signed-off-by: Kan Liang <kan.liang@xxxxxxxxx>
> > ---
> > tools/perf/util/machine.c | 62
> > ++++++++++++++++++++++-------------------------
> > 1 file changed, 29 insertions(+), 33 deletions(-)
> >
> > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> > index d97309c..dd8496a 100644
> > --- a/tools/perf/util/machine.c
> > +++ b/tools/perf/util/machine.c
> > @@ -1384,11 +1384,35 @@ struct mem_info
> *sample__resolve_mem(struct
> > perf_sample *sample, static int add_callchain_ip(struct thread *thread,
> > struct symbol **parent,
> > struct addr_location *root_al,
> > - int cpumode,
> > + u8 cpumode,
>
> Andi's patch got in:
> b3340a5 perf callchain: Support handling complete branch stacks as
> histograms
>
> and it uses the cpumode check for -1, so it needs to stay int, otherwise
> there's a compilation failure:
>
> CC util/machine.o
> util/machine.c: In function âadd_callchain_ipâ:
> util/machine.c:1419:14: error: comparison is always false due to limited
> range of data type [-Werror=type-limits]
> if (cpumode == -1)
> ^
>

Hi Arnaldo and Jirka,

According to recent feedback, the LBR call stack V4 patch only need to do small
change. However, it looks the patch "b3340a5 perf callchain: Support handling
complete branch stacks as histograms" has been removed from perf/core.

Should I wait for the patch to merge again and submit the V5 patch then, OR
Should I rebase the V5 to the latest perf/core and submit it today?

Thanks,
Kan


>
> jirka
N‹§²æ¸›yú²X¬¶ÇvØ–)Þ{.nlj·¥Š{±‘êX§¶›¡Ü}©ž²ÆzÚj:+v‰¨¾«‘êZ+€Êzf£¢·hšˆ§~†­†Ûÿû®w¥¢¸?™¨è&¢)ßf”ùy§m…á«a¶Úÿ 0¶ìå