All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Optimizing the print format of the QEMU monitor info mtree
@ 2025-04-30  4:02 Chao Liu
  2025-04-30  4:02 ` [PATCH v1 1/1] system: optimizing info mtree printing for monitors Chao Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Liu @ 2025-04-30  4:02 UTC (permalink / raw)
  To: pbonzini, peterx, david, philmd; +Cc: zhangtj, zqz00548, lc00631, qemu-devel

Hi, all:

Currently info mtre prints the memory-region hierarchy using two spaces as
indentation, which is not very clear when there are too many nodes.

```
(qemu) info mtree

memory-region: system
  0000000000000000-ffffffffffffffff (prio 0, i/o): system
    0000000000001000-000000000000ffff (prio 0, rom): riscv_virt_board.mrom
    0000000003000000-000000000300ffff (prio 0, i/o): gpex_ioport_window
      0000000003000000-000000000300ffff (prio 0, i/o): gpex_ioport
...
    0000000040000000-000000007fffffff (prio 0, i/o): alias ...
    0000000080000000-0000000087ffffff (prio 0, ram): riscv_virt_board.ram
    0000000400000000-00000007ffffffff (prio 0, i/o): alias ...
```

Therefore, I optimized the print format of this command to be similar to the
tree command, so that it can better distinguish multi-level memory-region nodes.

```
(qemu) info mtree

memory-region: system
│  ├── 0000000000000000-ffffffffffffffff (prio 0, i/o): system
│  │   ├── 0000000000001000-000000000000ffff (prio 0, rom): riscv_virt_board.mrom
│  │   ├── 0000000003000000-000000000300ffff (prio 0, i/o): gpex_ioport_window
│  │   │   └── 0000000003000000-000000000300ffff (prio 0, i/o): gpex_ioport
...
│  │   ├── 0000000040000000-000000007fffffff (prio 0, i/o): alias ...
│  │   ├── 0000000080000000-0000000087ffffff (prio 0, ram): riscv_virt_board.ram
│  │   └── 0000000400000000-00000007ffffffff (prio 0, i/o): alias ...
```
--
Regards,
Chao

Chao Liu (1):
  system: optimizing info mtree printing for monitors

 system/memory.c | 34 +++++++++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 7 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2025-04-30  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  4:02 [PATCH v1 0/1] Optimizing the print format of the QEMU monitor info mtree Chao Liu
2025-04-30  4:02 ` [PATCH v1 1/1] system: optimizing info mtree printing for monitors Chao Liu
2025-04-30  8:01   ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.