[PATCH v4 dwarves 0/2] fixes for memory optimized BTF

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

 



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@xxxxxxxxxx/

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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux