All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic
@ 2023-02-21 15:48 Alan Maguire
  2023-02-21 15:48 ` [RFC dwarves 1/3] dwarf_loader: fix detection of struct parameters Alan Maguire
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alan Maguire @ 2023-02-21 15:48 UTC (permalink / raw)
  To: acme
  Cc: ast, andrii, daniel, eddyz87, haoluo, jolsa, john.fastabend,
	kpsingh, sinquersw, martin.lau, songliubraving, sdf, timo, yhs,
	bpf, Alan Maguire

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

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

-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-28 15:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC dwarves 0/3] dwarves: improvements/fixes to BTF function skip logic Jiri Olsa
2023-02-28 15:57   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.