Skip to content

Commit ea185a5

Browse files
committed
tests/plugin: Remove duplicate insn log from libinsn.so
This is a perfectly natural occurrence for x86 "rep movb", where the "rep" prefix forms a counted loop of the one insn. During the tests/tcg/multiarch/memory test, this logging is triggered over 350000 times. Within the context of cross-i386-tci build, which is already slow by nature, the logging is sufficient to push the test into timeout. Signed-off-by: Richard Henderson <[email protected]>
1 parent 1d3daf9 commit ea185a5

File tree

4 files changed

+1
-32
lines changed

4 files changed

+1
-32
lines changed

tests/plugin/insn.c

+1-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
1919
#define MAX_CPUS 8 /* lets not go nuts */
2020

2121
typedef struct {
22-
uint64_t last_pc;
2322
uint64_t insn_count;
2423
} InstructionCount;
2524

@@ -51,13 +50,7 @@ static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata)
5150
{
5251
unsigned int i = cpu_index % MAX_CPUS;
5352
InstructionCount *c = &counts[i];
54-
uint64_t this_pc = GPOINTER_TO_UINT(udata);
55-
if (this_pc == c->last_pc) {
56-
g_autofree gchar *out = g_strdup_printf("detected repeat execution @ 0x%"
57-
PRIx64 "\n", this_pc);
58-
qemu_plugin_outs(out);
59-
}
60-
c->last_pc = this_pc;
53+
6154
c->insn_count++;
6255
}
6356

tests/tcg/i386/Makefile.softmmu-target

-9
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,5 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS)
3333

3434
memory: CFLAGS+=-DCHECK_UNALIGNED=1
3535

36-
# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so
37-
run-plugin-%-with-libinsn.so:
38-
$(call run-test, $@, \
39-
$(QEMU) -monitor none -display none \
40-
-chardev file$(COMMA)[email protected]$(COMMA)id=output \
41-
-plugin ../../plugin/libinsn.so$(COMMA)inline=on \
42-
-d plugin -D $*-with-libinsn.so.pout \
43-
$(QEMU_OPTS) $*)
44-
4536
# Running
4637
QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel

tests/tcg/i386/Makefile.target

-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ else
6363
SKIP_I386_TESTS+=test-i386-fprem
6464
endif
6565

66-
# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so
67-
run-plugin-%-with-libinsn.so:
68-
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
69-
-plugin ../../plugin/libinsn.so$(COMMA)inline=on \
70-
-d plugin -D $*-with-libinsn.so.pout $*)
71-
7266
# Update TESTS
7367
I386_TESTS:=$(filter-out $(SKIP_I386_TESTS), $(ALL_X86_TESTS))
7468
TESTS=$(MULTIARCH_TESTS) $(I386_TESTS)

tests/tcg/x86_64/Makefile.softmmu-target

-9
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,5 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS)
3333

3434
memory: CFLAGS+=-DCHECK_UNALIGNED=1
3535

36-
# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so
37-
run-plugin-%-with-libinsn.so:
38-
$(call run-test, $@, \
39-
$(QEMU) -monitor none -display none \
40-
-chardev file$(COMMA)[email protected]$(COMMA)id=output \
41-
-plugin ../../plugin/libinsn.so$(COMMA)inline=on \
42-
-d plugin -D $*-with-libinsn.so.pout \
43-
$(QEMU_OPTS) $*)
44-
4536
# Running
4637
QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel

0 commit comments

Comments
 (0)