aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2024-07-05 09:40:10 +0100
committerAlex Bennée <alex.bennee@linaro.org>2024-07-05 12:33:37 +0100
commitd44fe13b2b8631956b4e4ea72c5b39d8c9f194e2 (patch)
treec27cf427d9fafb5f2f66f2bdd8cddbe8e6e2f6d4 /system
parent4d17cc5a7811316d5c6ff09a33af0f1dd6a16d10 (diff)
downloadqemu-d44fe13b2b8631956b4e4ea72c5b39d8c9f194e2.zip
qemu-d44fe13b2b8631956b4e4ea72c5b39d8c9f194e2.tar.gz
qemu-d44fe13b2b8631956b4e4ea72c5b39d8c9f194e2.tar.bz2
tracepoints: move physmem trace points
They don't need to be in the global trace-events file and can have a local trace header. Also add address_space_map tracepoint for tracking mapping behaviour. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240705084047.857176-4-alex.bennee@linaro.org>
Diffstat (limited to 'system')
-rw-r--r--system/physmem.c4
-rw-r--r--system/trace-events6
2 files changed, 9 insertions, 1 deletions
diff --git a/system/physmem.c b/system/physmem.c
index 261196c..14aa025 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -53,7 +53,7 @@
#include "sysemu/hostmem.h"
#include "sysemu/hw_accel.h"
#include "sysemu/xen-mapcache.h"
-#include "trace/trace-root.h"
+#include "trace.h"
#ifdef CONFIG_FALLOCATE_PUNCH_HOLE
#include <linux/falloc.h>
@@ -3193,6 +3193,8 @@ void *address_space_map(AddressSpace *as,
MemoryRegion *mr;
FlatView *fv;
+ trace_address_space_map(as, addr, len, is_write, *(uint32_t *) &attrs);
+
if (len == 0) {
return NULL;
}
diff --git a/system/trace-events b/system/trace-events
index 69c9044..2ed1d59 100644
--- a/system/trace-events
+++ b/system/trace-events
@@ -21,6 +21,12 @@ flatview_destroy(void *view, void *root) "%p (root %p)"
flatview_destroy_rcu(void *view, void *root) "%p (root %p)"
global_dirty_changed(unsigned int bitmask) "bitmask 0x%"PRIx32
+# physmem.c
+address_space_map(void *as, uint64_t addr, uint64_t len, bool is_write, uint32_t attrs) "as:%p addr 0x%"PRIx64":%"PRIx64" write:%d attrs:0x%x"
+find_ram_offset(uint64_t size, uint64_t offset) "size: 0x%" PRIx64 " @ 0x%" PRIx64
+find_ram_offset_loop(uint64_t size, uint64_t candidate, uint64_t offset, uint64_t next, uint64_t mingap) "trying size: 0x%" PRIx64 " @ 0x%" PRIx64 ", offset: 0x%" PRIx64" next: 0x%" PRIx64 " mingap: 0x%" PRIx64
+ram_block_discard_range(const char *rbname, void *hva, size_t length, bool need_madvise, bool need_fallocate, int ret) "%s@%p + 0x%zx: madvise: %d fallocate: %d ret: %d"
+
# cpus.c
vm_stop_flush_all(int ret) "ret %d"