public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 dwarves 0/2] fixes for memory optimized BTF
@ 2024-09-30  8:17 Alan Maguire
  2024-09-30  8:17 ` [PATCH v4 dwarves 1/2] btf_encoder: fix strncpy issues, other issues identified in code review Alan Maguire
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alan Maguire @ 2024-09-30  8:17 UTC (permalink / raw)
  To: acme
  Cc: dwarves, eddyz87, olsajiri, shung-hsi.yu, jirislaby, sedat.dilek,
	w, Alan Maguire

This series is identical in effect to [1], it is simply applied
on top of the "next" branch which now includes v2 of the series.

Patch 1 fixes issues identified in code review around use of
func->state, strncpy issues.

Patch 2 speeds up the btf_functions.sh test by reducing the
number of greps/pipes, shaving ~1 minute off execution time.

[1] https://lore.kernel.org/dwarves/20240925091734.1943742-1-alan.maguire@oracle.com/

Changes since v2:

- fixed checks of func->state since it is always non-NULL and removed
  now-unneeded fields from dwarves.h; added assertions that either
  ELF or DWARF data is present for func encoding (Jiri, patch 1)
- fixed strncpy() issues, improved equality comparions between types
  (Eduard, patch 1)
- reworked btf_functions test to minimize overheads (patch 2)

Changes since RFC:

- fixed free issues (Jiri, patch 1)
- embed func state into struct elf_function as each function
  has state, and we can use the stack for state comparison
  avoiding the cost of additional allocations (patch 1)
- fix an intermittent coredump that resulted from using
  btf__str_by_offset() string in adding function prototype;
  needing more space could sometimes result in strset memory
  movement which would in turn invalidate the char * string,
  so copy it to a char array for param name/tag value encoding
  (patch 1)
- improve logging of decision to skip functions so that we can
  gather that info more easily for testing in patch 3
- added new option to pfunct to show all instances of a function
  prototype and - if no function is specified - use the stealer
  to dump out all prototypes more rapidly to aid quicker testing
- added test covering BTF function generation, checking that
  DWARF/BTF are consistent and that for skipped functions the
  skip rationale was valid (Jiri, patch 3)

Alan Maguire (2):
  btf_encoder: fix strncpy issues, other issues identified in code
    review
  tests: improve btf_functions.sh by reducing greps/pipes

 btf_encoder.c          | 68 ++++++++++++++++++++++++++++--------------
 tests/btf_functions.sh | 22 +++++---------
 2 files changed, 54 insertions(+), 36 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2024-09-30 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30  8:17 [PATCH v4 dwarves 0/2] fixes for memory optimized BTF Alan Maguire
2024-09-30  8:17 ` [PATCH v4 dwarves 1/2] btf_encoder: fix strncpy issues, other issues identified in code review Alan Maguire
2024-09-30  8:17 ` [PATCH v4 dwarves 2/2] tests: improve btf_functions.sh by reducing greps/pipes Alan Maguire
2024-09-30 11:20 ` [PATCH v4 dwarves 0/2] fixes for memory optimized BTF Jiri Olsa
2024-09-30 14:34   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox