[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 08/30] trace: Fix parameter types in top level
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v2 08/30] trace: Fix parameter types in top level |
Date: |
Mon, 13 Mar 2017 14:55:25 -0500 |
An upcoming patch will let the compiler warn us when we are silently
losing precision in traces; update the trace definitions to pass
through the full value at the callsite. Some of the callers use
the variable-length target_ulong, which cannot portably be mentioned
in headers that are included from target-independent code; in those
cases, use casts to force a type that will work through varargs to
match the declaration already in trace-events.
Signed-off-by: Eric Blake <address@hidden>
---
cpu-exec.c | 6 +++---
translate-all.c | 2 +-
trace-events | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index d04dd91..109f502 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -210,7 +210,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
tb_unlock();
/* execute the generated code */
- trace_exec_tb_nocache(tb, tb->pc);
+ trace_exec_tb_nocache(tb, (uintptr_t) tb->pc);
cpu_tb_exec(cpu, tb);
tb_lock();
@@ -240,7 +240,7 @@ static void cpu_exec_step(CPUState *cpu)
cc->cpu_exec_enter(cpu);
/* execute the generated code */
- trace_exec_tb_nocache(tb, pc);
+ trace_exec_tb_nocache(tb, (uintptr_t) pc);
cpu_tb_exec(cpu, tb);
cc->cpu_exec_exit(cpu);
@@ -571,7 +571,7 @@ static inline void cpu_loop_exec_tb(CPUState *cpu,
TranslationBlock *tb,
uintptr_t ret;
int32_t insns_left;
- trace_exec_tb(tb, tb->pc);
+ trace_exec_tb(tb, (uintptr_t) tb->pc);
ret = cpu_tb_exec(cpu, tb);
tb = (TranslationBlock *)(ret & ~TB_EXIT_MASK);
*tb_exit = ret & TB_EXIT_MASK;
diff --git a/translate-all.c b/translate-all.c
index 34480ae..68f31cd 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1294,7 +1294,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
gen_intermediate_code(env, tb);
tcg_ctx.cpu = NULL;
- trace_translate_block(tb, tb->pc, tb->tc_ptr);
+ trace_translate_block(tb, (uintptr_t) tb->pc, tb->tc_ptr);
/* generate machine code */
tb->jmp_reset_offset[0] = TB_JMP_RESET_OFFSET_INVALID;
diff --git a/trace-events b/trace-events
index b07a09b..4f72cf2 100644
--- a/trace-events
+++ b/trace-events
@@ -42,7 +42,7 @@ qemu_system_shutdown_request(void) ""
qemu_system_powerdown_request(void) ""
# spice-qemu-char.c
-spice_vmc_write(ssize_t out, int len) "spice wrote %zd of requested %d"
+spice_vmc_write(ssize_t out, ssize_t len) "spice wrote %zd of requested %zd"
spice_vmc_read(int bytes, int len) "spice read %d of requested %d"
spice_vmc_register_interface(void *scd) "spice vmc registered interface %p"
spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p"
--
2.9.3
- [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, (continued)
- [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Eric Blake, 2017/03/13
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Dr. David Alan Gilbert, 2017/03/13
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Eric Blake, 2017/03/13
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Dr. David Alan Gilbert, 2017/03/14
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Eric Blake, 2017/03/14
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Eric Blake, 2017/03/15
- Re: [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration, Eric Blake, 2017/03/15
[Qemu-devel] [PATCH v2 04/30] trace: Fix parameter types in block, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 07/30] trace: Fix parameter types in ui, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 08/30] trace: Fix parameter types in top level,
Eric Blake <=
[Qemu-devel] [PATCH v2 10/30] trace: Fix parameter types in hw/acpi, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 13/30] trace: Fix parameter types in hw/char, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 16/30] trace: Fix parameter types in hw/i386, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 11/30] trace: Fix parameter types in hw/audio, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 09/30] trace: Fix parameter types in linux-user, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 12/30] trace: Fix parameter types in hw/block, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 15/30] trace: Fix parameter types in hw/dma, Eric Blake, 2017/03/13
[Qemu-devel] [PATCH v2 17/30] trace: Fix parameter types in hw/input, Eric Blake, 2017/03/13