[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/33] memory: Add tracepoint for dirty sync
From: |
Paolo Bonzini |
Subject: |
[PULL 31/33] memory: Add tracepoint for dirty sync |
Date: |
Tue, 28 Sep 2021 14:51:14 +0200 |
From: Peter Xu <peterx@redhat.com>
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>
---
softmmu/memory.c | 2 ++
softmmu/trace-events | 1 +
2 files changed, 3 insertions(+)
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);
}
}
}
diff --git a/softmmu/trace-events b/softmmu/trace-events
index 7b278590a0..bf1469990e 100644
--- a/softmmu/trace-events
+++ b/softmmu/trace-events
@@ -15,6 +15,7 @@ memory_region_subpage_read(int cpu_index, void *mr, uint64_t
offset, uint64_t va
memory_region_subpage_write(int cpu_index, void *mr, uint64_t offset, uint64_t
value, unsigned size) "cpu %d mr %p offset 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"
+memory_region_sync_dirty(const char *mr, const char *listener, int global) "mr
'%s' listener '%s' synced (global=%d)"
flatview_new(void *view, void *root) "%p (root %p)"
flatview_destroy(void *view, void *root) "%p (root %p)"
flatview_destroy_rcu(void *view, void *root) "%p (root %p)"
--
2.31.1
- [PULL 01/33] memory: Add RAM_PROTECTED flag to skip IOMMU mappings, (continued)
- [PULL 01/33] memory: Add RAM_PROTECTED flag to skip IOMMU mappings, Paolo Bonzini, 2021/09/28
- [PULL 09/33] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EBX, Paolo Bonzini, 2021/09/28
- [PULL 14/33] i386: kvm: Add support for exposing PROVISIONKEY to guest, Paolo Bonzini, 2021/09/28
- [PULL 10/33] i386: Add SGX CPUID leaf FEAT_SGX_12_1_EAX, Paolo Bonzini, 2021/09/28
- [PULL 12/33] i386: Add feature control MSR dependency when SGX is enabled, Paolo Bonzini, 2021/09/28
- [PULL 13/33] i386: Update SGX CPUID info according to hardware/KVM/user input, Paolo Bonzini, 2021/09/28
- [PULL 11/33] i386: Add get/set/migrate support for SGX_LEPUBKEYHASH MSRs, Paolo Bonzini, 2021/09/28
- [PULL 16/33] Adjust min CPUID level to 0x12 when SGX is enabled, Paolo Bonzini, 2021/09/28
- [PULL 22/33] i440fx: Add support for SGX EPC, Paolo Bonzini, 2021/09/28
- [PULL 26/33] target/i386: Add the query-sgx-capabilities QMP command, Paolo Bonzini, 2021/09/28
- [PULL 31/33] memory: Add tracepoint for dirty sync,
Paolo Bonzini <=
- [PULL 28/33] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs, Paolo Bonzini, 2021/09/28
- [PULL 33/33] meson_options.txt: Switch the default value for the vnc option to 'auto', Paolo Bonzini, 2021/09/28
- [PULL 02/33] Kconfig: Add CONFIG_SGX support, Paolo Bonzini, 2021/09/28
- [PULL 05/33] i386: Add 'sgx-epc' device to expose EPC sections to guest, Paolo Bonzini, 2021/09/28
- [PULL 15/33] i386: Propagate SGX CPUID sub-leafs to KVM, Paolo Bonzini, 2021/09/28
- [PULL 18/33] hw/i386/pc: Account for SGX EPC sections when calculating device memory, Paolo Bonzini, 2021/09/28
- [PULL 17/33] hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly, Paolo Bonzini, 2021/09/28
- [PULL 20/33] i386: acpi: Add SGX EPC entry to ACPI tables, Paolo Bonzini, 2021/09/28
- [PULL 19/33] i386/pc: Add e820 entry for SGX EPC section(s), Paolo Bonzini, 2021/09/28
- [PULL 29/33] target/i386: Fix memory leak in sev_read_file_base64(), Paolo Bonzini, 2021/09/28