qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add function to dump block layer for debugging
@ 2020-11-19 13:16 Vladimir Sementsov-Ogievskiy
  2020-11-19 13:16 ` [PATCH 1/4] block: bdrv_get_xdbg_block_graph() drop unused errp argument Vladimir Sementsov-Ogievskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2020-11-19 13:16 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, crosa, ehabkost, vsementsov, eblake, jsnow, armbru,
	mreitz, kwolf, den, andrey.shinkevich

Hi all!

Here is a new function dbg_dump_block_layer() to help with block layer
code debugging.

Usage:

1. Add dbg_dump_block_layer("/path/to/dump.json") call in some place
were you are trying to understand the relations in block graph and run
your test. Or just call dbg_dump_block_layer("/path/to/dump.json") from
gdb session if attached to running Qemu.

2. Convert json to png image:

 .scripts/render_block_graph.py --json /path/to/dump.json /path/to/out

And get your /path/to/out dot file and /path/to/out.png image.

Vladimir Sementsov-Ogievskiy (4):
  block: bdrv_get_xdbg_block_graph() drop unused errp argument
  blockjob: add block_jobs_info_list()
  block: add dbg_dump_block_layer()
  scripts/render_block_graph.py: add ability to parse json files

 qapi/block-core.json          | 13 +++++++++
 include/block/block.h         |  5 +++-
 include/block/blockjob.h      |  7 +++++
 block.c                       | 53 +++++++++++++++++++++++++++++++++--
 blockdev.c                    | 28 ++----------------
 blockjob.c                    | 29 +++++++++++++++++++
 MAINTAINERS                   |  5 ++++
 scripts/render_block_graph.py | 53 ++++++++++++++++++++++-------------
 8 files changed, 145 insertions(+), 48 deletions(-)

-- 
2.21.3



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

end of thread, other threads:[~2020-11-19 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 13:16 [PATCH 0/4] Add function to dump block layer for debugging Vladimir Sementsov-Ogievskiy
2020-11-19 13:16 ` [PATCH 1/4] block: bdrv_get_xdbg_block_graph() drop unused errp argument Vladimir Sementsov-Ogievskiy
2020-11-19 13:16 ` [PATCH 2/4] blockjob: add block_jobs_info_list() Vladimir Sementsov-Ogievskiy
2020-11-19 13:16 ` [PATCH 3/4] block: add dbg_dump_block_layer() Vladimir Sementsov-Ogievskiy
2020-11-19 17:02   ` Eric Blake
2020-11-19 13:16 ` [PATCH 4/4] scripts/render_block_graph.py: add ability to parse json files Vladimir Sementsov-Ogievskiy

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