diff mbox series

[v3,57/66] accel/tcg/user-exec: Convert DEBUG_SIGNAL to tracepoint

Message ID 20210818191920.390759-58-richard.henderson@linaro.org
State New
Headers show
Series Unaligned access for user-only | expand

Commit Message

Richard Henderson Aug. 18, 2021, 7:19 p.m. UTC
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(-)

-- 
2.25.1

Comments

Philippe Mathieu-Daudé Aug. 18, 2021, 9:22 p.m. UTC | #1
On 8/18/21 9:19 PM, Richard Henderson wrote:
> 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(-)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

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"