[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 57/66] accel/tcg/user-exec: Convert DEBUG_SIGNAL to tracepoint
From: |
Richard Henderson |
Subject: |
[PATCH v3 57/66] accel/tcg/user-exec: Convert DEBUG_SIGNAL to tracepoint |
Date: |
Wed, 18 Aug 2021 09:19:11 -1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/user-exec.c | 9 +++------
accel/tcg/trace-events | 3 +++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 6a3fec3002..1c9486c76d 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -27,6 +27,7 @@
#include "exec/helper-proto.h"
#include "qemu/atomic128.h"
#include "trace/trace-root.h"
+#include "trace.h"
#include "tcg/tcg-ldst.h"
#include "internal.h"
@@ -45,8 +46,6 @@
__thread uintptr_t helper_retaddr;
-//#define DEBUG_SIGNAL
-
/* exit the current TB from a signal handler. The host registers are
restored in a state compatible with the CPU emulator
*/
@@ -133,10 +132,8 @@ static inline int handle_cpu_signal(uintptr_t pc,
siginfo_t *info,
abort();
}
-#if defined(DEBUG_SIGNAL)
- printf("qemu: SIGSEGV pc=0x%08lx address=%08lx w=%d oldset=0x%08lx\n",
- pc, address, is_write, *(unsigned long *)old_set);
-#endif
+ trace_sigsegv(pc, address, is_write, *(unsigned long *)old_set);
+
/* XXX: locking issue */
/* Note that it is important that we don't call page_unprotect() unless
* this is really a "write to nonwriteable page" fault, because
diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events
index 59eab96f26..d54416f2ee 100644
--- a/accel/tcg/trace-events
+++ b/accel/tcg/trace-events
@@ -8,3 +8,6 @@ exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p
flags=0x%x"
# translate-all.c
translate_block(void *tb, uintptr_t pc, const void *tb_code) "tb:%p,
pc:0x%"PRIxPTR", tb_code:%p"
+
+# user-exec.c
+sigsegv(uintptr_t pc, uintptr_t addr, int is_write, unsigned long old_set)
"pc:0x%"PRIxPTR", addr:0x%"PRIxPTR", w:%d, oldset:0x%lx"
--
2.25.1
- Re: [PATCH v3 52/66] target/alpha: Reorg fp memory operations, (continued)
- [PATCH v3 53/66] target/alpha: Reorg integer memory operations, Richard Henderson, 2021/08/18
- [PATCH v3 51/66] hw/core/cpu: Add prctl-unalign-sigbus property for user-only, Richard Henderson, 2021/08/18
- [PATCH v3 50/66] hw/core/cpu: Move cpu properties to cpu-sysemu.c, Richard Henderson, 2021/08/18
- [PATCH v3 54/66] target/alpha: Implement prctl_unalign_sigbus, Richard Henderson, 2021/08/18
- [PATCH v3 56/66] target/sh4: Implement prctl_unalign_sigbus, Richard Henderson, 2021/08/18
- [PATCH v3 55/66] target/hppa: Implement prctl_unalign_sigbus, Richard Henderson, 2021/08/18
- [PATCH v3 57/66] accel/tcg/user-exec: Convert DEBUG_SIGNAL to tracepoint,
Richard Henderson <=
- [PATCH v3 58/66] include/exec: Move cpu_signal_handler declaration, Richard Henderson, 2021/08/18
- [PATCH v3 59/66] accel/tcg: Handle SIGBUS in handle_cpu_signal, Richard Henderson, 2021/08/18
- [PATCH v3 60/66] tcg/aarch64: Support raising sigbus for user-only, Richard Henderson, 2021/08/18
- [PATCH v3 62/66] tcg/s390: Support raising sigbus for user-only, Richard Henderson, 2021/08/18