[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] memory: Have 'info mtree' remove duplicated Address Space
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
Re: [PATCH v2] memory: Have 'info mtree' remove duplicated Address Space information |
|
Date: |
Mon, 23 Aug 2021 10:55:34 +0200 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/23/21 10:53 AM, Philippe Mathieu-Daudé wrote:
> Per Peter Maydell [*]:
>
> 'info mtree' monitor command was designed on the assumption that
> there's really only one or two interesting address spaces, and
> with more recent developments that's just not the case any more.
>
> Similarly about how the FlatView are sorted using a GHashTable,
> sort the AddressSpace objects to remove the duplications (AS
> using the same root MemoryRegion).
>
> This drastically reduce 'info mtree' on some boards.
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: List AS similarly to 'info mtree -f' (peterx)
> ---
> softmmu/memory.c | 65 +++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 61 insertions(+), 4 deletions(-)
>
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index bfedaf9c4df..ebc58964415 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -3246,11 +3246,56 @@ static gboolean mtree_info_flatview_free(gpointer
> key, gpointer value,
> return true;
> }
>
> +struct AddressSpaceInfo {
> + MemoryRegionListHead *ml_head;
> + int counter;
v3 coming...
> + bool owner;
> + bool disabled;
> +};