Re: [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic

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

 



Em Thu, Feb 23, 2023 at 11:10:07PM +0100, Jiri Olsa escreveu:
> On Tue, Feb 21, 2023 at 03:48:39PM +0000, Alan Maguire wrote:
> > As discussed in [1], there are a few issues with how we determine
> > whether to skip functions for BTF encoding:
> > 
> > - when detecting unexpected registers, functions which have
> >   struct parameters need to be skipped as they can use
> >   multiple registers to pass the struct, and as a result
> >   later parameters use unexpected registers.  However,
> >   struct detection does not always work; it needs to be fixed for
> >   const struct parameters and cases where a parameter references
> >   the original parameter (which has the type info) via abstract
> >   origin (patch 1)
> > - when looking for unexpected registers, location lists are not
> >   supported.  Fix that by using dwarf_getlocations() (patch 2).
> > - when marking parameters as using unexpected registers, we should
> >   stick to the case where we expect register x and register y is
> >   used; other cases such as optimized-out parameters are no
> >   guarantee that we were not _passed_ the correct parameters
> >   (patch 3).
> > 
> > This series can be applied on top of the dwarves "next" branch,
> > as a follow-on to [2]
> > 
> > [1] https://lore.kernel.org/bpf/20230220190335.bk6jzayfqivsh7rv@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> > [2] https://lore.kernel.org/bpf/1676675433-10583-1-git-send-email-alan.maguire@xxxxxxxxxx/
> > 
> > Alan Maguire (3):
> >   dwarf_loader: fix detection of struct parameters
> >   dwarf_loader: fix parameter location retrieval for location lists
> >   dwarf_loader: only mark parameter as using an unexpected register when
> >     it does
> 
> I'm getting more functions in with this patchset
> 
>   1666 for gcc   (with 61678, without 60012)
>   9390 for clang (with 62128, without 52738)
> 
> but no duplicates and selftests are passing
> 
> Tested-by: Jiri Olsa <jolsa@xxxxxxxxxx>

Oh, I saw this and your comment about not using the branch 'next' and
thought these were already there :-\

I reviewed the patches now and I'm testing them, soon will push to the
'next' branch for some testing on the libbpf CI.

- Arnaldo



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux