From: Chao Liu <lc00631@tecorigin.com>
To: pbonzini@redhat.com, peterx@redhat.com, david@redhat.com,
philmd@linaro.org
Cc: zhangtj@tecorigin.com, zqz00548@tecorigin.com,
lc00631@tecorigin.com, qemu-devel@nongnu.org
Subject: [PATCH v1 0/1] Optimizing the print format of the QEMU monitor info mtree
Date: Wed, 30 Apr 2025 12:02:22 +0800 [thread overview]
Message-ID: <cover.1745894489.git.lc00631@tecorigin.com> (raw)
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
next reply other threads:[~2025-04-30 4:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 4:02 Chao Liu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1745894489.git.lc00631@tecorigin.com \
--to=lc00631@tecorigin.com \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=zhangtj@tecorigin.com \
--cc=zqz00548@tecorigin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.