mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
memory: trace FlatView creation and destruction
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
202fc01b05
commit
02d9651d6a
4 changed files with 7 additions and 1 deletions
3
memory.c
3
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue