public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: acme@kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, eddyz87@gmail.com, haoluo@google.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	sinquersw@gmail.com, martin.lau@kernel.org,
	songliubraving@fb.com, sdf@google.com, timo@incline.eu,
	yhs@fb.com, bpf@vger.kernel.org
Subject: Re: [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic
Date: Thu, 23 Feb 2023 23:10:07 +0100	[thread overview]
Message-ID: <Y/fj28OdEdKJBLcy@krava> (raw)
In-Reply-To: <1676994522-1557-1-git-send-email-alan.maguire@oracle.com>

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@macbook-pro-6.dhcp.thefacebook.com/
> [2] https://lore.kernel.org/bpf/1676675433-10583-1-git-send-email-alan.maguire@oracle.com/
> 
> 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@kernel.org>

jirka

> 
>  dwarf_loader.c | 30 ++++++++++++++++++------------
>  1 file changed, 18 insertions(+), 12 deletions(-)
> 
> -- 
> 2.31.1
> 

  parent reply	other threads:[~2023-02-23 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 15:48 [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic Alan Maguire
2023-02-21 15:48 ` [RFC dwarves 1/3] dwarf_loader: fix detection of struct parameters Alan Maguire
2023-02-21 15:48 ` [RFC dwarves 2/3] dwarf_loader: fix parameter location retrieval for location lists Alan Maguire
2023-02-21 15:48 ` [RFC dwarves 3/3] dwarf_loader: only mark parameter as using an unexpected register when it does Alan Maguire
2023-02-23 22:10 ` Jiri Olsa [this message]
2023-02-28 15:57   ` [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y/fj28OdEdKJBLcy@krava \
    --to=olsajiri@gmail.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kpsingh@chromium.org \
    --cc=martin.lau@kernel.org \
    --cc=sdf@google.com \
    --cc=sinquersw@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=timo@incline.eu \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox