[PATCH 0/4] Add function to dump block layer for debugging

Vladimir Sementsov-Ogievskiy posted 4 patches 5 days, 19 hours ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201119131634.14009-1-vsementsov@virtuozzo.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>, John Snow <jsnow@redhat.com>, Markus Armbruster <armbru@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
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(-)

[PATCH 0/4] Add function to dump block layer for debugging

Posted by Vladimir Sementsov-Ogievskiy 5 days, 19 hours ago
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