[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/23] tracepoints: move physmem trace points
From: |
Alex Bennée |
Subject: |
[PATCH 04/23] tracepoints: move physmem trace points |
Date: |
Fri, 28 Jun 2024 13:42:39 +0100 |
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.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
system/physmem.c | 6 ++++--
system/trace-events | 6 ++++++
trace-events | 5 -----
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/system/physmem.c b/system/physmem.c
index 33d09f7571..17c9c70f97 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>
@@ -1885,7 +1885,7 @@ static void ram_block_add(RAMBlock *new_block, Error
**errp)
} else { /* list is empty */
QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next);
}
- ram_list.mru_block = NULL;
+ qatomic_rcu_set(&ram_list.mru_block, NULL);
/* Write list before version */
smp_wmb();
@@ -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 69c9044151..2ed1d59b1f 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"
diff --git a/trace-events b/trace-events
index dd318ed1af..9cb96f64c4 100644
--- a/trace-events
+++ b/trace-events
@@ -37,11 +37,6 @@ dma_complete(void *dbs, int ret, void *cb) "dbs=%p ret=%d
cb=%p"
dma_blk_cb(void *dbs, int ret) "dbs=%p ret=%d"
dma_map_wait(void *dbs) "dbs=%p"
-# exec.c
-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"
-
# job.c
job_state_transition(void *job, int ret, const char *legal, const char *s0,
const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)"
job_apply_verb(void *job, const char *state, const char *verb, const char
*legal) "job %p in state %s; applying verb %s (%s)"
--
2.39.2
- [PATCH 00/23] July maintainer updates (32bit, testing, plugins, gdbstub), Alex Bennée, 2024/06/28
- [PATCH 03/23] testing: restore some testing for i686, Alex Bennée, 2024/06/28
- [PATCH 01/23] tests/lcitool: fix debian-i686-cross toolchain prefix, Alex Bennée, 2024/06/28
- [PATCH 04/23] tracepoints: move physmem trace points,
Alex Bennée <=
- [PATCH 07/23] test/plugin: make insn plugin less noisy by default, Alex Bennée, 2024/06/28
- [PATCH 02/23] target/i386: fix gen_prepare_size_nz condition, Alex Bennée, 2024/06/28
- [PATCH 08/23] test/plugins: preserve the instruction record over translations, Alex Bennée, 2024/06/28
- [PATCH 10/23] plugins/lockstep: make mixed-mode safe, Alex Bennée, 2024/06/28
- [PATCH 17/23] target/arm: Make some MTE helpers widely available, Alex Bennée, 2024/06/28
- [PATCH 11/23] plugins/lockstep: mention the one-insn-per-tb option, Alex Bennée, 2024/06/28
- [PATCH 05/23] tests/docker: Specify --userns keep-id for Podman, Alex Bennée, 2024/06/28
- [PATCH 06/23] tests/tcg/arm: Fix fcvt result messages, Alex Bennée, 2024/06/28
- [PATCH 14/23] gdbstub: Move GdbCmdParseEntry into a new header file, Alex Bennée, 2024/06/28