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: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang
Date: Sat, 23 Jan 2021 14:31:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/23/21 11:26 AM, Stefan Weil wrote:
> 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.

Indeed, Alistair used it to boostrap RISCV:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg552643.html

Worth citing a comment Peter mentioned at the end of this thread:
"the interpreter [...] only works with a subset of host OS calling
convention ABIs".
https://www.mail-archive.com/qemu-devel@nongnu.org/msg553077.html

> 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]