* [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated.
@ 2021-05-07 22:48 Nathan Ringo
2021-05-07 23:24 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Ringo @ 2021-05-07 22:48 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: Nathan Ringo
Signed-off-by: Nathan Ringo <nathan@remexre.xyz>
---
accel/tcg/trace-events | 2 +-
accel/tcg/translate-all.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events
index 6eefb37f5d..c227e56248 100644
--- a/accel/tcg/trace-events
+++ b/accel/tcg/trace-events
@@ -7,4 +7,4 @@ exec_tb_nocache(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
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"
+translate_block(void *tb, uintptr_t pc, int num_insns, const void *tb_code) "tb:%p, pc:0x%"PRIxPTR", num_insns:%d, tb_code:%p"
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index b12d0898d0..2c70eec777 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1916,7 +1916,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
tcg_ctx->cpu = NULL;
max_insns = tb->icount;
- trace_translate_block(tb, tb->pc, tb->tc.ptr);
+ trace_translate_block(tb, tb->pc, (int)tb->icount, tb->tc.ptr);
/* generate machine code */
tb->jmp_reset_offset[0] = TB_JMP_RESET_OFFSET_INVALID;
--
2.26.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated.
2021-05-07 22:48 [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated Nathan Ringo
@ 2021-05-07 23:24 ` Richard Henderson
2021-05-09 1:57 ` Nathan Ringo
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2021-05-07 23:24 UTC (permalink / raw)
To: Nathan Ringo, qemu-devel, qemu-trivial
On 5/7/21 3:48 PM, Nathan Ringo wrote:
> - trace_translate_block(tb, tb->pc, tb->tc.ptr);
> + trace_translate_block(tb, tb->pc, (int)tb->icount, tb->tc.ptr);
What target are you looking at, because for the variable-length isa's,
instruction count may not really help. Perhaps tb->size instead?
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated.
2021-05-07 23:24 ` Richard Henderson
@ 2021-05-09 1:57 ` Nathan Ringo
2021-05-09 18:15 ` Alex Bennée
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Ringo @ 2021-05-09 1:57 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
I'm mostly looking at AArch64, so they're the same there :) I'm using
this to collect code coverage information, so I have the disassembly,
and it's slightly easier to report it that way; if you think it'd be
more useful on other architectures to report the byte range instead,
it'd be an easy change to my scripts.
Also, noticed I accidentally deleted the first line of the commit
message when I updated the patch... I can fix that if you want me to
switch the size metric.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated.
2021-05-09 1:57 ` Nathan Ringo
@ 2021-05-09 18:15 ` Alex Bennée
0 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2021-05-09 18:15 UTC (permalink / raw)
To: Nathan Ringo; +Cc: qemu-trivial@nongnu.org, Richard Henderson, qemu-devel
Nathan Ringo <nathan@remexre.xyz> writes:
> I'm mostly looking at AArch64, so they're the same there :) I'm using
> this to collect code coverage information, so I have the disassembly,
> and it's slightly easier to report it that way;
Have you considered collecting this information with TCG plugins? That
way you can instrument what was actually instrumented directly.
> if you think it'd be
> more useful on other architectures to report the byte range instead,
> it'd be an easy change to my scripts.
>
> Also, noticed I accidentally deleted the first line of the commit
> message when I updated the patch... I can fix that if you want me to
> switch the size metric.
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-09 18:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-07 22:48 [PATCH v2] This makes it easier to figure out whether a particular instruction was actually translated Nathan Ringo
2021-05-07 23:24 ` Richard Henderson
2021-05-09 1:57 ` Nathan Ringo
2021-05-09 18:15 ` Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).