qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] dump: Cleanup and consolidation
@ 2022-03-30 12:35 Janosch Frank
  2022-03-30 12:35 ` [PATCH v3 1/9] dump: Use ERRP_GUARD() Janosch Frank
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Janosch Frank @ 2022-03-30 12:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau, richard.henderson, pbonzini

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(-)

-- 
2.32.0



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

end of thread, other threads:[~2022-04-07  9:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 12:35 [PATCH v3 0/9] dump: Cleanup and consolidation Janosch Frank
2022-03-30 12:35 ` [PATCH v3 1/9] dump: Use ERRP_GUARD() Janosch Frank
2022-03-31  8:59   ` Marc-André Lureau
2022-03-31  9:48     ` Janosch Frank
2022-03-31 10:11       ` Marc-André Lureau
2022-03-30 12:35 ` [PATCH v3 2/9] dump: Remove the sh_info variable Janosch Frank
2022-03-31  8:58   ` Marc-André Lureau
2022-03-31  9:47     ` Janosch Frank
2022-03-31 13:49       ` Marc-André Lureau
2022-04-07  9:48         ` [PATCH v4] " Janosch Frank
2022-03-30 12:35 ` [PATCH v3 3/9] dump: Introduce shdr_num to decrease complexity Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau
2022-03-30 12:35 ` [PATCH v3 4/9] dump: Remove the section if when calculating the memory offset Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau
2022-03-30 12:35 ` [PATCH v3 5/9] dump: Add more offset variables Janosch Frank
2022-03-30 12:36 ` [PATCH v3 6/9] dump: Introduce dump_is_64bit() helper function Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau
2022-03-30 12:36 ` [PATCH v3 7/9] dump: Consolidate phdr note writes Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau
2022-03-30 12:36 ` [PATCH v3 8/9] dump: Cleanup dump_begin write functions Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau
2022-03-30 12:36 ` [PATCH v3 9/9] dump: Consolidate elf note function Janosch Frank
2022-03-31  8:56   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).