aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-09-21 12:34:00 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-22 01:06:51 +0200
commit02d9651d6a46479e9d70b72dca34e43605d06cda (patch)
treebce2deed4461c2c0b6ec582826bae42ebb6f0bf6 /memory.c
parent202fc01b05572ecb258fdf4c5bd56cf6de8140c7 (diff)
memory: trace FlatView creation and destruction
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 706c38508f..68cdf8bad0 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);
}
@@ -314,6 +316,7 @@ static bool flatview_ref(FlatView *view)
static void flatview_unref(FlatView *view)
{
if (atomic_fetch_dec(&view->ref) == 1) {
+ trace_flatview_destroy_rcu(view, view->root);
call_rcu(view, flatview_destroy, rcu);
}
}