[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] memory: Make 'info mtree' not display disabled regions by de
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] memory: Make 'info mtree' not display disabled regions by default |
Date: |
Fri, 29 May 2020 16:46:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 29/05/20 16:34, Peter Xu wrote:
> On Fri, May 29, 2020 at 02:53:25PM +0200, Philippe Mathieu-Daudé wrote:
>> @@ -2920,35 +2916,46 @@ static void mtree_print_mr(const MemoryRegion *mr,
>> unsigned int level,
>> ml->mr = mr->alias;
>> QTAILQ_INSERT_TAIL(alias_print_queue, ml, mrqueue);
>> }
>> - qemu_printf(TARGET_FMT_plx "-" TARGET_FMT_plx
>> - " (prio %d, %s%s): alias %s @%s " TARGET_FMT_plx
>> - "-" TARGET_FMT_plx "%s",
>> - cur_start, cur_end,
>> - mr->priority,
>> - mr->nonvolatile ? "nv-" : "",
>> - memory_region_type((MemoryRegion *)mr),
>> - memory_region_name(mr),
>> - memory_region_name(mr->alias),
>> - mr->alias_offset,
>> - mr->alias_offset + MR_SIZE(mr->size),
>> - mr->enabled ? "" : " [disabled]");
>> - if (owner) {
>> - mtree_print_mr_owner(mr);
>> + if (mr->enabled || display_disabled) {
>> + for (i = 0; i < level; i++) {
>> + qemu_printf(MTREE_INDENT);
>> + }
>> + qemu_printf(TARGET_FMT_plx "-" TARGET_FMT_plx
>> + " (prio %d, %s%s): alias %s @%s " TARGET_FMT_plx
>> + "-" TARGET_FMT_plx "%s",
>> + cur_start, cur_end,
>> + mr->priority,
>> + mr->nonvolatile ? "nv-" : "",
>> + memory_region_type((MemoryRegion *)mr),
>> + memory_region_name(mr),
>> + memory_region_name(mr->alias),
>> + mr->alias_offset,
>> + mr->alias_offset + MR_SIZE(mr->size),
>> + mr->enabled ? "" : " [disabled]");
>> + if (owner) {
>> + mtree_print_mr_owner(mr);
>> + }
>
> It'll not only change the default output for "info mtree", but also "-o" too
> because disabled regions won't be dumped any more. Not sure whether it's
> expected - just raise this question up, because I mostly only use "-f"..
I think it's the right behavior. Queued, thanks.
Paolo