[Top][All Lists]
[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
- [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up, Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 7/7] TCG: Remove unused global variables, Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 1/7] tcg/tcg.h: Duplicate global TCG variables in TCGContext, Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx, Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 6/7] TCG: Use gen_opparam_buf from context instead of global variable., Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 4/7] TCG: Use gen_opparam_ptr from context instead of global variable., Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 5/7] TCG: Use gen_opc_buf from context instead of global variable., Evgeny Voevodin, 2012/10/23
- [Qemu-devel] [PATCH v2 3/7] TCG: Use gen_opc_ptr from context instead of global variable., Evgeny Voevodin, 2012/10/23
- Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up, Evgeny Voevodin, 2012/10/23
- Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up, Evgeny Voevodin, 2012/10/24
- Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up, Evgeny Voevodin, 2012/10/25