diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-28 14:57:22 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-29 10:37:10 -0500 |
commit | 55d5d04884305e17b24f378a9ec616bf7354c1ca (patch) | |
tree | 3ac7611c3e1153f2aebc42c1e6ef1d48594f8960 /memory.c | |
parent | 8cdd2e0abbf593a38a146d8dfc998754cefbc27a (diff) |
memory: add tracepoints for MMIO reads/writes
This is quite handy to debug softmmu targets.
Reviewed-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1375016242-32651-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include "qemu/bitops.h" #include "qom/object.h" #include "sysemu/kvm.h" +#include "trace.h" #include <assert.h> #include "exec/memory-internal.h" @@ -388,6 +389,7 @@ static void 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); *value |= (tmp & mask) << shift; } @@ -404,6 +406,7 @@ static void memory_region_read_accessor(MemoryRegion *mr, qemu_flush_coalesced_mmio_buffer(); } tmp = mr->ops->read(mr->opaque, addr, size); + trace_memory_region_ops_read(mr, addr, tmp, size); *value |= (tmp & mask) << shift; } @@ -417,6 +420,7 @@ static void memory_region_oldmmio_write_accessor(MemoryRegion *mr, uint64_t tmp; tmp = (*value >> shift) & mask; + trace_memory_region_ops_write(mr, addr, tmp, size); mr->ops->old_mmio.write[ctz32(size)](mr->opaque, addr, tmp); } @@ -433,6 +437,7 @@ static void memory_region_write_accessor(MemoryRegion *mr, qemu_flush_coalesced_mmio_buffer(); } tmp = (*value >> shift) & mask; + trace_memory_region_ops_write(mr, addr, tmp, size); mr->ops->write(mr->opaque, addr, tmp, size); } |