[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PULL 14/46] cpu-exec: drop dead assignm
From: |
Peter Maydell |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PULL 14/46] cpu-exec: drop dead assignment |
Date: |
Tue, 10 Feb 2015 09:15:46 +0000 |
On 10 February 2015 at 06:34, Michael Tokarev <address@hidden> wrote:
> From: Paolo Bonzini <address@hidden>
>
> All uses of TB inside cpu_exec are dominated by "tb = tb_find_fast(env)",
> and there are no uses after the switch statement. So the assignment
> is dead, as reported by Coverity.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Michael Tokarev <address@hidden>
> ---
> cpu-exec.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/cpu-exec.c b/cpu-exec.c
> index fa506e6..4ff1b23 100644
> --- a/cpu-exec.c
> +++ b/cpu-exec.c
> @@ -494,7 +494,6 @@ int cpu_exec(CPUArchState *env)
> * interrupt_request) which we will handle
> * next time around the loop.
> */
> - tb = (TranslationBlock *)(next_tb & ~TB_EXIT_MASK);
> next_tb = 0;
> break;
> case TB_EXIT_ICOUNT_EXPIRED:
True, I guess, but presumably this means we're doing unnecessary
work in the next time round the loop re-finding the tb which we
already had...
(Also, why do we have a variable 'next_tb' which holds the
address of the *previous* TB? :-) I think the documentation
of the return value of tcg_qemu_tb_exec() is wrong too. Or
I've misunderstood the code.)
-- PMM
- [Qemu-trivial] [PULL 32/46] rtl8139: g_malloc() can't fail, bury dead error handling, (continued)
- [Qemu-trivial] [PULL 32/46] rtl8139: g_malloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 19/46] qemu-sockets: Fix buffer overflow in inet_parse(), Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 30/46] Fix name error in migration stream analyzation script, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 28/46] util/uri: URI member path can be null, compare more carfully, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 13/46] qemu-log: Correct help text of 'log cpu_reset', Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 39/46] migration: Fix warning caused by missing declaration of vmstate_dummy, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 31/46] onenand: g_malloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 27/46] util/uri: realloc2n() can't fail, drop dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 21/46] libcacard: stop linking against every single 3rd party library, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 14/46] cpu-exec: drop dead assignment, Michael Tokarev, 2015/02/10
- Re: [Qemu-trivial] [Qemu-devel] [PULL 14/46] cpu-exec: drop dead assignment,
Peter Maydell <=
- [Qemu-trivial] [PULL 40/46] migration: Fix warnings caused by missing 'static' attribute, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 46/46] virtio: Fix warning caused by missing 'static' attribute, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 05/46] Add/convert trace calls in pcnet-pci.c., Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 23/46] qemu-option: Pair g_malloc() with g_free(), not free(), Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 20/46] linux-user: wrong TARGET_SI_PAD_SIZE value for some targets., Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 33/46] kvm: g_malloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 15/46] cpu-exec: simplify icount code, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 35/46] vnc: g_realloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-trivial] [PULL 16/46] qemu-sockets: improve error reporting in unix_listen_opts, Michael Tokarev, 2015/02/10