summaryrefslogtreecommitdiffstats
path: root/trace
diff options
context:
space:
mode:
authorRichard Henderson2021-07-27 01:21:38 +0200
committerRichard Henderson2021-10-06 01:53:17 +0200
commit0583f775d2740f64739febf6496d9207552399f6 (patch)
tree919f851894beda1644fededa4048371969629412 /trace
parentplugins: Reorg arguments to qemu_plugin_vcpu_mem_cb (diff)
downloadqemu-0583f775d2740f64739febf6496d9207552399f6.tar.gz
qemu-0583f775d2740f64739febf6496d9207552399f6.tar.xz
qemu-0583f775d2740f64739febf6496d9207552399f6.zip
trace: Split guest_mem_before
There is no point in encoding load/store within a bit of the memory trace info operand. Represent atomic operations as a single read-modify-write tracepoint. Use MemOpIdx instead of inventing a form specifically for traces. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'trace')
-rw-r--r--trace/mem.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/trace/mem.h b/trace/mem.h
deleted file mode 100644
index 699566c661..0000000000
--- a/trace/mem.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Helper functions for guest memory tracing
- *
- * Copyright (C) 2016 Lluís Vilanova <vilanova@ac.upc.edu>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef TRACE__MEM_H
-#define TRACE__MEM_H
-
-#include "exec/memopidx.h"
-
-#define TRACE_MEM_SZ_SHIFT_MASK 0xf /* size shift mask */
-#define TRACE_MEM_SE (1ULL << 4) /* sign extended (y/n) */
-#define TRACE_MEM_BE (1ULL << 5) /* big endian (y/n) */
-#define TRACE_MEM_ST (1ULL << 6) /* store (y/n) */
-#define TRACE_MEM_MMU_SHIFT 8 /* mmu idx */
-
-/**
- * trace_mem_get_info:
- *
- * Return a value for the 'info' argument in guest memory access traces.
- */
-static inline uint16_t trace_mem_get_info(MemOpIdx oi, bool store)
-{
- MemOp op = get_memop(oi);
- uint32_t size_shift = op & MO_SIZE;
- bool sign_extend = op & MO_SIGN;
- bool big_endian = (op & MO_BSWAP) == MO_BE;
- uint16_t res;
-
- res = size_shift & TRACE_MEM_SZ_SHIFT_MASK;
- if (sign_extend) {
- res |= TRACE_MEM_SE;
- }
- if (big_endian) {
- res |= TRACE_MEM_BE;
- }
- if (store) {
- res |= TRACE_MEM_ST;
- }
-#ifdef CONFIG_SOFTMMU
- res |= get_mmuidx(oi) << TRACE_MEM_MMU_SHIFT;
-#endif
-
- return res;
-}
-
-#endif /* TRACE__MEM_H */