[Qemu-devel] [PATCH v2 0/7] tcg: Restart TB generation on overflow

Richard Henderson posted 7 patches 5 years ago
Test checkpatch failed
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190423153853.19790-1-richard.henderson@linaro.org
Maintainers: Claudio Fontana <claudio.fontana@huawei.com>, Richard Henderson <rth@twiddle.net>, Aleksandar Rikalo <arikalo@wavecomp.com>, Palmer Dabbelt <palmer@sifive.com>, Aurelien Jarno <aurelien@aurel32.net>, Alistair Francis <Alistair.Francis@wdc.com>, Andrzej Zaborowski <balrogg@gmail.com>
include/exec/exec-all.h       |  4 +-
include/exec/translator.h     |  3 +-
tcg/tcg.h                     | 15 +++----
accel/tcg/translate-all.c     | 53 +++++++++++++++++++----
accel/tcg/translator.c        | 15 +------
target/alpha/translate.c      |  4 +-
target/arm/translate.c        |  4 +-
target/cris/translate.c       | 10 +----
target/hppa/translate.c       |  5 +--
target/i386/translate.c       |  4 +-
target/lm32/translate.c       | 10 +----
target/m68k/translate.c       |  4 +-
target/microblaze/translate.c | 10 +----
target/mips/translate.c       |  4 +-
target/moxie/translate.c      | 11 +----
target/nios2/translate.c      | 14 +-----
target/openrisc/translate.c   |  4 +-
target/ppc/translate.c        |  4 +-
target/riscv/translate.c      |  4 +-
target/s390x/translate.c      |  4 +-
target/sh4/translate.c        |  4 +-
target/sparc/translate.c      |  4 +-
target/tilegx/translate.c     | 12 +-----
target/tricore/translate.c    | 16 +------
target/unicore32/translate.c  | 10 +----
target/xtensa/translate.c     |  4 +-
tcg/aarch64/tcg-target.inc.c  | 16 ++++---
tcg/arm/tcg-target.inc.c      | 73 ++++++++++++++-----------------
tcg/i386/tcg-target.inc.c     |  6 ++-
tcg/mips/tcg-target.inc.c     |  6 ++-
tcg/ppc/tcg-target.inc.c      | 42 +++++++++---------
tcg/riscv/tcg-target.inc.c    | 16 +++++--
tcg/s390/tcg-target.inc.c     | 20 +++++----
tcg/tcg-ldst.inc.c            | 18 ++++----
tcg/tcg-pool.inc.c            | 12 +++---
tcg/tcg.c                     | 81 ++++++++++++++++++-----------------
36 files changed, 246 insertions(+), 280 deletions(-)
[Qemu-devel] [PATCH v2 0/7] tcg: Restart TB generation on overflow
Posted by Richard Henderson 5 years ago
This is for lauchpad 1824853.  The v1 patch set fixed this for
x86 as a host.  This goes further to handle the other cases in
which a TB can become too large, resulting in overflows from
relocations.

Finally, the last two patches take advantage of this.  Since
we now have a reliable way to try again if a relocation overflows,
we can avoid adding extra nops on the off-chance we have to deal
with very large TBs.

There is possibly room for additional work in tcg/riscv, with
respect to its short conditional branches.  But that's probably
best left to someone who can test that properly.


r~


Richard Henderson (7):
  tcg: Hoist max_insns computation to tb_gen_code
  tcg: Restart after TB code generation overflow
  tcg: Restart TB generation after relocation overflow
  tcg: Restart TB generation after constant pool overflow
  tcg: Restart TB generation after out-of-line ldst overflow
  tcg/ppc: Allow the constant pool to overflow at 32k
  tcg/arm: Restrict constant pool displacement to 12 bits

 include/exec/exec-all.h       |  4 +-
 include/exec/translator.h     |  3 +-
 tcg/tcg.h                     | 15 +++----
 accel/tcg/translate-all.c     | 53 +++++++++++++++++++----
 accel/tcg/translator.c        | 15 +------
 target/alpha/translate.c      |  4 +-
 target/arm/translate.c        |  4 +-
 target/cris/translate.c       | 10 +----
 target/hppa/translate.c       |  5 +--
 target/i386/translate.c       |  4 +-
 target/lm32/translate.c       | 10 +----
 target/m68k/translate.c       |  4 +-
 target/microblaze/translate.c | 10 +----
 target/mips/translate.c       |  4 +-
 target/moxie/translate.c      | 11 +----
 target/nios2/translate.c      | 14 +-----
 target/openrisc/translate.c   |  4 +-
 target/ppc/translate.c        |  4 +-
 target/riscv/translate.c      |  4 +-
 target/s390x/translate.c      |  4 +-
 target/sh4/translate.c        |  4 +-
 target/sparc/translate.c      |  4 +-
 target/tilegx/translate.c     | 12 +-----
 target/tricore/translate.c    | 16 +------
 target/unicore32/translate.c  | 10 +----
 target/xtensa/translate.c     |  4 +-
 tcg/aarch64/tcg-target.inc.c  | 16 ++++---
 tcg/arm/tcg-target.inc.c      | 73 ++++++++++++++-----------------
 tcg/i386/tcg-target.inc.c     |  6 ++-
 tcg/mips/tcg-target.inc.c     |  6 ++-
 tcg/ppc/tcg-target.inc.c      | 42 +++++++++---------
 tcg/riscv/tcg-target.inc.c    | 16 +++++--
 tcg/s390/tcg-target.inc.c     | 20 +++++----
 tcg/tcg-ldst.inc.c            | 18 ++++----
 tcg/tcg-pool.inc.c            | 12 +++---
 tcg/tcg.c                     | 81 ++++++++++++++++++-----------------
 36 files changed, 246 insertions(+), 280 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH v2 0/7] tcg: Restart TB generation on overflow
Posted by no-reply@patchew.org 5 years ago
Patchew URL: https://patchew.org/QEMU/20190423153853.19790-1-richard.henderson@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20190423153853.19790-1-richard.henderson@linaro.org
Subject: [Qemu-devel] [PATCH v2 0/7] tcg: Restart TB generation on overflow

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20190423153853.19790-1-richard.henderson@linaro.org -> patchew/20190423153853.19790-1-richard.henderson@linaro.org
Switched to a new branch 'test'
c3b499ac54 tcg/arm: Restrict constant pool displacement to 12 bits
504fe92c1a tcg/ppc: Allow the constant pool to overflow at 32k
6397f31dbe tcg: Restart TB generation after out-of-line ldst overflow
3a1b33b3fc tcg: Restart TB generation after constant pool overflow
fa2eeb08ba tcg: Restart TB generation after relocation overflow
4ab494c442 tcg: Restart after TB code generation overflow
d7de180b25 tcg: Hoist max_insns computation to tb_gen_code

=== OUTPUT BEGIN ===
1/7 Checking commit d7de180b256d (tcg: Hoist max_insns computation to tb_gen_code)
2/7 Checking commit 4ab494c44253 (tcg: Restart after TB code generation overflow)
3/7 Checking commit fa2eeb08baae (tcg: Restart TB generation after relocation overflow)
ERROR: trailing whitespace
#142: FILE: tcg/tcg.h:246:
+}; $

total: 1 errors, 0 warnings, 140 lines checked

Patch 3/7 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/7 Checking commit 3a1b33b3fc70 (tcg: Restart TB generation after constant pool overflow)
5/7 Checking commit 6397f31dbe0e (tcg: Restart TB generation after out-of-line ldst overflow)
6/7 Checking commit 504fe92c1ae8 (tcg/ppc: Allow the constant pool to overflow at 32k)
7/7 Checking commit c3b499ac5483 (tcg/arm: Restrict constant pool displacement to 12 bits)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190423153853.19790-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com