diff options
author | Peter Xu <peterx@redhat.com> | 2021-08-16 21:37:06 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-09-30 15:30:24 +0200 |
commit | fcb3ab341accb8ed897f148238cae0324ed89d2c (patch) | |
tree | ebe4e256168bf72f272e4d502fe649383be5bef9 /softmmu/memory.c | |
parent | 142518bda515c132a46ce5826e73fbd2a5b154d9 (diff) |
memory: Add tracepoint for dirty sync
Trace at memory_region_sync_dirty_bitmap() for log_sync() or global_log_sync()
on memory regions. One trace line should suffice when it finishes, so as to
estimate the time used for each log sync process.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210817013706.30986-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu/memory.c')
-rw-r--r-- | softmmu/memory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/softmmu/memory.c b/softmmu/memory.c index 54cd0e9824..db182e5d3d 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -2154,6 +2154,7 @@ static void memory_region_sync_dirty_bitmap(MemoryRegion *mr) } } flatview_unref(view); + trace_memory_region_sync_dirty(mr ? mr->name : "(all)", listener->name, 0); } else if (listener->log_sync_global) { /* * No matter whether MR is specified, what we can do here @@ -2161,6 +2162,7 @@ static void memory_region_sync_dirty_bitmap(MemoryRegion *mr) * sync in a finer granularity. */ listener->log_sync_global(listener); + trace_memory_region_sync_dirty(mr ? mr->name : "(all)", listener->name, 1); } } } |