Em Fri, Jun 28, 2019 at 10:02:55AM +0200, Jiri Olsa escreveu:
> On Fri, Jun 28, 2019 at 05:22:57PM +0800, Jin Yao wrote:
> > In some cases small changes in hot loops can show big differences.
> > But it's difficult to identify these differences.
> > 
> > perf diff currently can only diff symbols (functions). We can also expand
> > it to diff cycles of individual programs blocks as reported by timed LBR.
> > This would allow to identify changes in specific code accurately.
> > 
> > With this patch set, for example,
> > 
> >  $ perf record -b ./div
> >  $ perf record -b ./div
> >  $ perf diff -c cycles
> > 
> >  # Event 'cycles'
> >  #
> >  # Baseline                                       [Program Block Range] 
> > Cycles Diff  Shared Object     Symbol
> >  # ........  
> > ......................................................................  
> > ................  ..................................
> >  #
> >      48.75%                                             [div.c:42 -> 
> > div.c:45]  147  div               [.] main
> >      48.75%                                             [div.c:31 -> 
> > div.c:40]    4  div               [.] main
> >      48.75%                                             [div.c:40 -> 
> > div.c:40]    0  div               [.] main
> >      48.75%                                             [div.c:42 -> 
> > div.c:42]    0  div               [.] main
> >      48.75%                                             [div.c:42 -> 
> > div.c:44]    0  div               [.] main
> >      19.02%                                 [random_r.c:357 -> 
> > random_r.c:360]    0  libc-2.23.so      [.] __random_r
 
> Reviewed-by: Jiri Olsa <jo...@kernel.org>

Looks really nice, thanks, applied.

- Arnaldo

Reply via email to