From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: aik@ozlabs.ru
Subject: [Qemu-devel] [PATCH 1/3] memory: trace FlatView creation and destruction
Date: Thu, 21 Sep 2017 14:07:49 +0200 [thread overview]
Message-ID: <20170921120751.3027-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20170921120751.3027-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/exec/memory.h | 1 -
include/qemu/typedefs.h | 1 +
memory.c | 3 +++
trace-events | 3 +++
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 402824c6f2..5ed4042f87 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -48,7 +48,6 @@
typedef struct MemoryRegionOps MemoryRegionOps;
typedef struct MemoryRegionMmio MemoryRegionMmio;
-typedef struct FlatView FlatView;
struct MemoryRegionMmio {
CPUReadMemoryFunc *read[3];
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 163550214c..980d2b330e 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -30,6 +30,7 @@ typedef struct DisplaySurface DisplaySurface;
typedef struct DriveInfo DriveInfo;
typedef struct Error Error;
typedef struct EventNotifier EventNotifier;
+typedef struct FlatView FlatView;
typedef struct FWCfgEntry FWCfgEntry;
typedef struct FWCfgIoState FWCfgIoState;
typedef struct FWCfgMemState FWCfgMemState;
diff --git a/memory.c b/memory.c
index a26adca4d3..4952cc5d84 100644
--- a/memory.c
+++ b/memory.c
@@ -270,6 +270,7 @@ static FlatView *flatview_new(MemoryRegion *mr_root)
view->ref = 1;
view->root = mr_root;
memory_region_ref(mr_root);
+ trace_flatview_new(view, mr_root);
return view;
}
@@ -295,6 +296,7 @@ static void flatview_destroy(FlatView *view)
{
int i;
+ trace_flatview_destroy(view, view->root);
if (view->dispatch) {
address_space_dispatch_free(view->dispatch);
}
diff --git a/trace-events b/trace-events
index 1f50f56d9d..1d2eb5d3e4 100644
--- a/trace-events
+++ b/trace-events
@@ -64,6 +64,8 @@ memory_region_tb_read(int cpu_index, uint64_t addr, uint64_t value, unsigned siz
memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr 0x%"PRIx64" value 0x%"PRIx64" size %u"
memory_region_ram_device_read(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u"
memory_region_ram_device_write(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u"
+flatview_new(FlatView *view, MemoryRegion *root) "%p (root %p)"
+flatview_destroy(FlatView *view, MemoryRegion *root) "%p (root %p)"
### Guest events, keep at bottom
--
2.13.5
next prev parent reply other threads:[~2017-09-21 12:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 12:07 [Qemu-devel] [PATCH 0/3] FlatView memory savings Paolo Bonzini
2017-09-21 12:07 ` Paolo Bonzini [this message]
2017-09-21 12:07 ` [Qemu-devel] [PATCH 2/3] memory: seek FlatView sharing candidates among children subregions Paolo Bonzini
2017-09-21 13:39 ` Alexey Kardashevskiy
2017-09-21 13:57 ` Paolo Bonzini
2017-09-22 4:45 ` Alexey Kardashevskiy
2017-09-22 7:28 ` Paolo Bonzini
2017-09-21 12:07 ` [Qemu-devel] [PATCH 3/3] memory: Share special empty FlatView Paolo Bonzini
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=20170921120751.3027-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--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).