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.mayd...@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@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;
> +};


Reply via email to