qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] trace: show MemoryRegion name, not address


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 2/2] trace: show MemoryRegion name, not address
Date: Fri, 13 Nov 2015 18:23:13 +0800
User-agent: Mutt/1.5.23 (2015-06-09)

On Wed, Nov 11, 2015 at 05:09:58PM -0800, Hollis Blanchard wrote:
> Recording the MemoryRegion pointers isn't helpful, especially since no trace
> data allows us to correlate those pointers to devices. Instead, record the
> MemoryRegion name.
> 
> Signed-off-by: Hollis Blanchard <address@hidden>
> ---
>  memory.c     | 12 ++++++------
>  trace-events |  4 ++--
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/memory.c b/memory.c
> index c435c88..9bd4c31 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -381,7 +381,7 @@ static MemTxResult 
> memory_region_oldmmio_read_accessor(MemoryRegion *mr,
>      uint64_t tmp;
>  
>      tmp = mr->ops->old_mmio.read[ctz32(size)](mr->opaque, addr);
> -    trace_memory_region_ops_read(mr, addr, tmp, size);
> +    trace_memory_region_ops_read(mr->name, addr, tmp, size);

mr->name may be NULL.  There is a memory_region_name() function that
always produces a real string.  Perhaps it's best to use it.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]