diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-03-31 21:30:31 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-06-05 12:04:29 -0700 |
commit | 747bd69d0f6d278923c50a3be6dd9b85e5dfd603 (patch) | |
tree | c1cf6d6c2bd3aa031a1ca8bf8fb124e07f3df332 /accel/tcg/perf.c | |
parent | e03291cd9a9f511a70a9164bbe8673ed1e9de360 (diff) | |
download | qemu-747bd69d0f6d278923c50a3be6dd9b85e5dfd603.zip qemu-747bd69d0f6d278923c50a3be6dd9b85e5dfd603.tar.gz qemu-747bd69d0f6d278923c50a3be6dd9b85e5dfd603.tar.bz2 |
tcg: Add insn_start_words to TCGContext
This will enable replacement of TARGET_INSN_START_WORDS in tcg.c.
Split out "tcg/insn-start-words.h" and use it in target/.
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/perf.c')
-rw-r--r-- | accel/tcg/perf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/accel/tcg/perf.c b/accel/tcg/perf.c index 65e35ea..f5a1eda 100644 --- a/accel/tcg/perf.c +++ b/accel/tcg/perf.c @@ -311,7 +311,8 @@ void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, const void *start) { struct debuginfo_query *q; - size_t insn; + size_t insn, start_words; + uint64_t *gen_insn_data; if (!perfmap && !jitdump) { return; @@ -325,9 +326,12 @@ void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, debuginfo_lock(); /* Query debuginfo for each guest instruction. */ + gen_insn_data = tcg_ctx->gen_insn_data; + start_words = tcg_ctx->insn_start_words; + for (insn = 0; insn < tb->icount; insn++) { /* FIXME: This replicates the restore_state_to_opc() logic. */ - q[insn].address = tcg_ctx->gen_insn_data[insn][0]; + q[insn].address = gen_insn_data[insn * start_words + 0]; if (tb_cflags(tb) & CF_PCREL) { q[insn].address |= (guest_pc & TARGET_PAGE_MASK); } else { |