qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]