Pierrick Bouvier <pierrick.bouv...@linaro.org> writes:

> The goal here is to be able to scale temporally execution of qemu-user/system,
> using a given number of instructions per second.
>
> We define a virtual clock, that can be late or in advance compared to real 
> time.
> When we are in advance, we slow execution (by sleeping) until catching real
> time.
>
> Finally, we should be able to cleanup icount=auto mode completely, and keep
> icount usage for determistic purposes only.
>
> It is built upon new TCG Plugins inline ops (store + conditional callbacks), 
> now
> merged on master.
>
> Example in user-mode:
>
> - Retrieve number of instructions to execute /bin/true
> $ ./build/qemu-x86_64 -plugin ./build/tests/plugin/libinsn.so -d plugin 
> /bin/true
> cpu 0 insns: 120546
> total insns: 120546
> - Slow execution to match 5 seconds
> $ time ./build/qemu-x86_64 -plugin 
> ./build/contrib/plugins/libips,ips=$((120546/5)) /bin/true
> real    0m4.985s
>
> Tested in system mode by booting a full debian system, and using:
> $ sysbench cpu run
> Performance decrease linearly with the given number of ips.

Queued to plugins/next, thanks.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to