On 13 June 2018 at 15:10, yt zhang <zyt510998...@gmail.com> wrote: > Dear technicians, > Good day. > I encountered some difficulties in learning about the TCI part of QEMU. > When I use the following configuration command to enable TCI: > > "configure --enable-tcg-interpreter" > > Run the command as: > > "qemu-x86_64 hello-one" (hello-one is my own executable file). > > Then I counted the number of times TB was interpreted in the > "tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)" function in the > tcg/tci.c file.However, I found that running the above command several > times on the same host computer [Intel(R) Pentium(R) CPU G3250 @ 3.20GHz], > the number of TB counts may sometimes be different (as shown below).
I think that's expected. We don't try to be purely deterministic by default. You may find that suitable use of the -icount option will give you more deterministic behaviour (though if your guest program works with timers or signals or multiple threads it will likely still not be deterministic.) thanks -- PMM