qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wataru Ashihara" <wataash@wataash.com>,
	qemu-devel@nongnu.org,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang
Date: Tue, 26 Jan 2021 17:08:30 +0000	[thread overview]
Message-ID: <878s8fy67l.fsf@linaro.org> (raw)
In-Reply-To: <7e423408-b0e9-2c32-b88b-eb579dd273c5@weilnetz.de>


Stefan Weil <sw@weilnetz.de> writes:

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

FWIW I had a bunch of JIT profiling changes that exposed the TCG op
counts via the JIT profiler.  I think I even enabled the op counting by
default because it was fairly lightweight to add.

IOW I think more introspection can be brought into the core TCG code
rather than relying on TCI to achieve it.

-- 
Alex Bennée


  parent reply	other threads:[~2021-01-26 17:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 16:27 [PATCH 0/2] tcg/tci: Fix Clang build Philippe Mathieu-Daudé
2021-01-10 16:27 ` [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused' Philippe Mathieu-Daudé
2021-01-10 17:51   ` Richard Henderson
2021-01-10 21:01     ` Philippe Mathieu-Daudé
2021-01-10 16:27 ` [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang Philippe Mathieu-Daudé
2021-01-21 10:08   ` Thomas Huth
2021-01-21 10:32     ` Daniel P. Berrangé
2021-01-21 11:18       ` Philippe Mathieu-Daudé
2021-01-21 11:21         ` Daniel P. Berrangé
2021-01-21 11:48           ` Philippe Mathieu-Daudé
2021-01-21 12:02             ` Daniel P. Berrangé
2021-01-21 13:27               ` Philippe Mathieu-Daudé
2021-01-23  8:59                 ` Wataru Ashihara
2021-01-23 10:26                   ` Stefan Weil
2021-01-23 13:31                     ` Philippe Mathieu-Daudé
2021-01-26 17:08                     ` Alex Bennée [this message]
2021-01-26 16:42                   ` Alex Bennée
2021-01-21 18:05     ` Wainer dos Santos Moschetta
2021-01-21 18:13       ` Daniel P. Berrangé
2021-01-21 18:28         ` Thomas Huth
2021-01-21 20:46           ` Wainer dos Santos Moschetta
2021-01-22  8:19             ` Thomas Huth
2021-01-26 13:51               ` Wainer dos Santos Moschetta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s8fy67l.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=wataash@wataash.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).