qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang


From: Stefan Weil
Subject: Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang
Date: Sat, 23 Jan 2021 11:26:22 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

Am 23.01.21 um 09:59 schrieb Wataru Ashihara:

Actually I use TCI also on macOS. Like the use case quoted by Philippe,
there're even other reasons to use TCI:

1. Learning TCG ops.
2. Debugging QEMU with gdb. e.g. diagnose codegen or stepping into
    helper functions from tci.c:tcg_qemu_tb_exec().
3. Guest instruction tracing. TCI is faster than TCG or KVM when tracing
    the guest ops [1]. I guess qira is using TCI for this reason [2].

[1]: https://twitter.com/wata_ash/status/1352899988032942080
[2]: https://github.com/geohot/qira/blob/v1.3/tracers/qemu_build.sh#L55


Yes, TCI can help a lot for debugging, especially also when porting TCG to a new host architecture.

If we had binaries which can switch from native to interpreted TCG, it could also be a reference implementation used for unit tests, comparing the results for each TCG opcode.

Using TCI with profiling like gprof is useful to count the frequency of the different TCG opcodes in practical scenarios and can be used to detect bottlenecks (and less frequent or unused opcodes) for native TCG, too.

Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]