[Qemu-devel] [PATCH v3 0/3] block nodes graph visualization

Vladimir Sementsov-Ogievskiy posted 3 patches 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180823154655.40188-1-vsementsov@virtuozzo.com
Test docker-clang@ubuntu failed
Test checkpatch passed
There is a newer version of this series
qapi/block-core.json           |  91 +++++++++++++++++++++++
include/block/block.h          |   1 +
include/sysemu/block-backend.h |   2 +
block.c                        | 129 +++++++++++++++++++++++++++++++++
block/block-backend.c          |   5 ++
blockdev.c                     |   5 ++
scripts/render_block_graph.py  | 120 ++++++++++++++++++++++++++++++
tests/qemu-iotests/222         |   2 +
8 files changed, 355 insertions(+)
create mode 100755 scripts/render_block_graph.py
[Qemu-devel] [PATCH v3 0/3] block nodes graph visualization
Posted by Vladimir Sementsov-Ogievskiy 7 years, 2 months ago
Hi all!

On the way of backup schemes development (and in general any complicated
developments in Qemu block layer) it would be good to have an ability to print
out graph of block nodes with their permissions. Just look at attached picture.

v3: again, major rework, after long discussion with Max:
   - start creating graph looping through blk's and block jobs, don't use opaque
   - don't export pointers, generate ids instead
   (graphical representation didn't significantly changed, you can look at the
    picture, attached to v2 cover-letter)

v2: major rework: Identifying non-bds nodes by their description was a bad idea,
descriptions are not guaranteed to be different for different nodes. So, the only
way is use pointer to identify them. And to be unique, let's use pointers to
identify all the nodes in the graph. As additional benefit, we have pointers for
each node, which is good for debugging (imagine a gdb session).

Vladimir Sementsov-Ogievskiy (3):
  qapi: add x-debug-query-block-graph
  scripts: add render_block_graph function for QEMUMachine
  not-for-commit: example of new command usage for debugging

 qapi/block-core.json           |  91 +++++++++++++++++++++++
 include/block/block.h          |   1 +
 include/sysemu/block-backend.h |   2 +
 block.c                        | 129 +++++++++++++++++++++++++++++++++
 block/block-backend.c          |   5 ++
 blockdev.c                     |   5 ++
 scripts/render_block_graph.py  | 120 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/222         |   2 +
 8 files changed, 355 insertions(+)
 create mode 100755 scripts/render_block_graph.py

-- 
2.18.0