Skip to content

dump: Cleanup and consolidation

Janosch Frank qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 12 repliesIn review
  2. v29 patches 9 repliesSuperseded
  3. v17 patches 9 repliesSuperseded

Changes in v3 from the cover letter

* Rebased
* Moved 64 bit tests to positive checks
* Removed unneeded code
* Added review-bys

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dump: Use ERRP_GUARD()dump/dump.c+61 -833 replies
2/9dump: Remove the sh_info variabledump/dump.c include/sysemu/dump.h+15 -224 replies
3/9dump: Introduce shdr_num to decrease complexitydump/dump.c include/sysemu/dump.h+13 -131 reply
4/9dump: Remove the section if when calculating the memory offsetdump/dump.c+8 -161 reply
5/9dump: Add more offset variablesdump/dump.c include/sysemu/dump.h+19 -200 replies
6/9dump: Introduce dump_is_64bit() helper functiondump/dump.c+15 -101 reply
7/9dump: Consolidate phdr note writesdump/dump.c+48 -461 reply
8/9dump: Cleanup dump_begin write functionsdump/dump.c+11 -311 reply
9/9dump: Consolidate elf note functiondump/dump.c+11 -71 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonMarc-André Lureau
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] dump: Cleanup and consolidation

The dump/dump.c file has lots of duplicated code for handling 64 and 32 bit elf files. Additionally there are many instances where code can be improved by adding a variable to avoid having to specify the same calculation or check over and over.

This series is the cleanup step onto which my series that adds custom section support and finally the series that introduces PV dump support are based on.

Personal comments:
It's taken me quite a while to understand how the code works and I expect that this patch might improve that but it won't fix every issue. Going forward it might make sense to split kdump and elf dump code into separate files and also cleanup the kdump code.

v3:
* Rebased
* Moved 64 bit tests to positive checks
* Removed unneeded code
* Added review-bys

v2:
* Added the ERRP_GUARD() patch which converts dump.c to the new error handling methods
* Switched patches #2 and #3 around
* Added a patch that removes the section if/else
* Moved dump_is_64bit() to dump.c

Janosch Frank (9):
dump: Use ERRP_GUARD()
dump: Remove the sh_info variable
dump: Introduce shdr_num to decrease complexity
dump: Remove the section if when calculating the memory offset
dump: Add more offset variables
dump: Introduce dump_is_64bit() helper function
dump: Consolidate phdr note writes
dump: Cleanup dump_begin write functions
dump: Consolidate elf note function

 dump/dump.c           | 362 ++++++++++++++++++------------------------
 include/sysemu/dump.h |   9 +-
 2 files changed, 162 insertions(+), 209 deletions(-)
Signature · 1 line
2.32.0