qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *t


From: Evgeny Voevodin
Subject: Re: [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx
Date: Wed, 24 Oct 2012 08:07:44 +0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1

On 10/24/2012 01:18 AM, Richard Henderson wrote:
On 2012-10-23 16:21, Evgeny Voevodin wrote:
We will use this pointer from functions where we don't have an
interface to pass tcg_ctx as a parameter.
I don't think this is worthwhile.  It'll just make the whole thing slower,
passing around unnecessary pointers.


r~


1. I didn't noticed any slow-down of kernel boot process. Maybe it's worth to make more
tests with self modifying code but I don't think so, because
2. The most intensive usage of tcg_cur_ctx is in tcg/tcg-op.h functions. If we look carefully at them then we will see that there are only few functions for which single excessive dereferencing of a pointer leads to any significant slow-down. These functions are those which make just one or two operations and exit. And we should keep in mind that there is only single dereference of
a pointer since it is stored in the register for further operations.

Of course some slow-down should present but I found it negligible (actually I didn't find it at all). If there are some common tests for TCG generation speed I can try to run them and report results.

Also we can specify tcg_cur_ctx as const and in that case I guess that dereferencing of tcg_cur_ctx
should not lead to any slow-down.

Also I can drop tcg_cur_ctx and use tcg_ctx.xxx instead as was in the first series.

What about the rest patches?

--
Kind regards,
Evgeny Voevodin,
Technical Leader,
Mobile Group,
Samsung Moscow Research Center,
e-mail: address@hidden




reply via email to

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