On 2025/6/16 22:44, Markus Armbruster wrote:
Chao Liu <chao....@yeah.net> writes:

On 2025/6/16 13:55, Markus Armbruster wrote:
Chao Liu <lc00...@tecorigin.com> writes:

From: Chao Liu <chao....@yeah.net>

Hi, all:

After several rounds of discussion, I think that adding a -t option to the
`info mtree` command, which enables the display of tree-like node characters
(e.g., +--, |--), is a better approach.

As BALATON Zoltan pointed out, retaining space-based indentation for displaying
memory region (mr) nodes helps ensure that the output remains easily parseable
by other programs. This also provides better compatibility with existing tools
and scripts.

If people really feed the output of HMP info mtree to parsers, we should
probably provide the information via QMP.

Thank you for your helpful advice. I think the next step is to try implementing 
"info mtree" via QMP first, and then have it called by HMP.

I’ve added it to my to-do list, and I’ll try to implement it using QMP in the 
next phase.

First question before you actually do that: use cases for feeding the
information to programs?  You might have answers already; I'm not on top
of prior conversations.

[...]

The main purpose of this patch is not to make the memory-region tree output easier for programs to parse.

Instead, it's to make the output clearer when there are many memory regions in the machine.

Right now, we use spaces for indentation, which makes it hard to see the hierarchy clearly — I want similar to how the tree command works.

During discussions with multiple threads, we also looked into more details, like avoiding the use of special characters.



Reply via email to