From: Richard Henderson <richard.henderson@linaro.org>
To: "David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Gerd Hoffmann <kraxel@redhat.com>, Peter Xu <peterx@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v4 2/3] memory: Extract mtree_info_as() from mtree_info()
Date: Sat, 4 Sep 2021 11:23:59 +0200 [thread overview]
Message-ID: <1c4735d0-3b33-2829-719c-d365d11d99e5@linaro.org> (raw)
In-Reply-To: <6623ad05-5e50-cadf-7486-22bfc41ff13e@redhat.com>
On 9/1/21 7:11 PM, David Hildenbrand wrote:
> On 01.09.21 18:19, Philippe Mathieu-Daudé wrote:
>> While mtree_info() handles both ASes and flatviews cases,
>> the two cases share basically no code. Split mtree_info_as()
>> out of mtree_info() to simplify.
>>
>> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> softmmu/memory.c | 17 ++++++++++-------
>> 1 file changed, 10 insertions(+), 7 deletions(-)
>>
>> diff --git a/softmmu/memory.c b/softmmu/memory.c
>> index 3eb6f52de67..5be7d5e7412 100644
>> --- a/softmmu/memory.c
>> +++ b/softmmu/memory.c
>> @@ -3284,18 +3284,12 @@ static void mtree_info_flatview(bool dispatch_tree, bool owner)
>> g_hash_table_unref(views);
>> }
>> -void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
>> +static void mtree_info_as(bool dispatch_tree, bool owner, bool disabled)
>> {
>> MemoryRegionListHead ml_head;
>> MemoryRegionList *ml, *ml2;
>> AddressSpace *as;
>> - if (flatview) {
>> - mtree_info_flatview(dispatch_tree, owner);
>> -
>> - return;
>> - }
>> -
>> QTAILQ_INIT(&ml_head);
>> QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
>> @@ -3316,6 +3310,15 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner,
>> bool disabled)
>> }
>> }
>> +void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
>> +{
>> + if (flatview) {
>> + mtree_info_flatview(dispatch_tree, owner);
>> + } else {
>> + mtree_info_as(dispatch_tree, owner, disabled);
>> + }
>> +}
>> +
>> void memory_region_init_ram(MemoryRegion *mr,
>> Object *owner,
>> const char *name,
>>
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
> I'd just have squashed that into #1.
Agreed, it seems like all part of one change. Anyway,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2021-09-04 9:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 16:19 [PATCH v4 0/3] memory: Have 'info mtree' remove duplicated Address Space information Philippe Mathieu-Daudé
2021-09-01 16:19 ` [PATCH v4 1/3] memory: Extract mtree_info_flatview() from mtree_info() Philippe Mathieu-Daudé
2021-09-01 16:23 ` Philippe Mathieu-Daudé
2021-09-01 17:10 ` David Hildenbrand
2021-09-04 9:23 ` Richard Henderson
2021-09-01 16:19 ` [PATCH v4 2/3] memory: Extract mtree_info_as() " Philippe Mathieu-Daudé
2021-09-01 17:11 ` David Hildenbrand
2021-09-04 9:23 ` Richard Henderson [this message]
2021-09-01 16:19 ` [PATCH v4 3/3] memory: Have 'info mtree' remove duplicated Address Space information Philippe Mathieu-Daudé
2021-09-01 17:12 ` David Hildenbrand
2021-09-04 9:27 ` Richard Henderson
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=1c4735d0-3b33-2829-719c-d365d11d99e5@linaro.org \
--to=richard.henderson@linaro.org \
--cc=david@redhat.com \
--cc=kraxel@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).