Pierrick Bouvier <pierrick.bouv...@linaro.org> writes: > On 2/29/24 6:21 PM, Alex Bennée wrote: >> Pierrick Bouvier <pierrick.bouv...@linaro.org> writes: >> >>> Signed-off-by: Pierrick Bouvier <pierrick.bouv...@linaro.org> >> I did notice there is a discrepancy between what libisns and libb >> report. The libb looks like an overcount so I wonder if there are some >> instructions we are not picking up but I can't see where that would be. >> ➜ ./qemu-hppa -plugin ./tests/plugin/libinsn.so -plugin >> ./tests/plugin/libbb.so,inline=true -d plugin >> ./tests/tcg/hppa-linux-user/sha512 >> 1..10 >> ok 1 - do_test(&tests[i]) >> ok 2 - do_test(&tests[i]) >> ok 3 - do_test(&tests[i]) >> ok 4 - do_test(&tests[i]) >> ok 5 - do_test(&tests[i]) >> ok 6 - do_test(&tests[i]) >> ok 7 - do_test(&tests[i]) >> ok 8 - do_test(&tests[i]) >> ok 9 - do_test(&tests[i]) >> ok 10 - do_test(&tests[i]) >> CPU0: bb's: 54282, insns: 775697 >> Total: bb's: 54282, insns: 775697 >> cpu 0 insns: 774827 >> total insns: 774827 >> Although weirdly maybe only an hppa thing. Richard? >> > > Do you observe the exact same number if you run only one of the plugin? > > bb count number of instructions in an executed block, while insn > effectively count every instructions ran. > Maybe there is hppa specifity that makes some tb exit in the middle, > thus executing less instructions than expected from bb count.
Almost certainly - I just wasn't sure what would do that on straight line code. Probably some funky aspect of HPPA I'm not aware off ;-) > > I don't know how to reproduce this test. Did you run it from a > specific docker env? If you have docker enabled the "make check-tcg" will build and use a container to build the test cases. If you are on debian you just need: apt install gcc-hppa-linux-gnu libc6-dev-hppa-cross and re-run configure. > >> ➜ ./qemu-aarch64 -plugin ./tests/plugin/libinsn.so -plugin >> ./tests/plugin/libbb.so,inline=true -d plugin >> ./tests/tcg/aarch64-linux-user/sha512 >> 1..10 >> ok 1 - do_test(&tests[i]) >> ok 2 - do_test(&tests[i]) >> ok 3 - do_test(&tests[i]) >> ok 4 - do_test(&tests[i]) >> ok 5 - do_test(&tests[i]) >> ok 6 - do_test(&tests[i]) >> ok 7 - do_test(&tests[i]) >> ok 8 - do_test(&tests[i]) >> ok 9 - do_test(&tests[i]) >> ok 10 - do_test(&tests[i]) >> CPU0: bb's: 41513, insns: 302671 >> Total: bb's: 41513, insns: 302671 >> cpu 0 insns: 302671 >> total insns: 302671 >> Anyway: >> Reviewed-by: Alex Bennée <alex.ben...@linaro.org> >> -- Alex Bennée Virtualisation Tech Lead @ Linaro