All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: richard.henderson@linaro.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	cota@braap.org, "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org
Subject: [RFC PATCH  4/5] include/exec: lightly re-arrange TranslationBlock
Date: Wed, 24 Feb 2021 16:58:10 +0000	[thread overview]
Message-ID: <20210224165811.11567-5-alex.bennee@linaro.org> (raw)
In-Reply-To: <20210224165811.11567-1-alex.bennee@linaro.org>

Lets make sure all the flags we compare when looking up blocks are
together in the same place.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/exec/exec-all.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index acf66ab692..75f8c3981a 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -448,9 +448,6 @@ struct TranslationBlock {
     target_ulong pc;   /* simulated PC corresponding to this block (EIP + CS base) */
     target_ulong cs_base; /* CS base for this block */
     uint32_t flags; /* flags defining in which context the code was generated */
-    uint16_t size;      /* size of target code for this block (1 <=
-                           size <= TARGET_PAGE_SIZE) */
-    uint16_t icount;
     uint32_t cflags;    /* compile flags */
 #define CF_COUNT_MASK  0x00007fff
 #define CF_LAST_IO     0x00008000 /* Last insn may be an IO access.  */
@@ -464,6 +461,11 @@ struct TranslationBlock {
     /* Per-vCPU dynamic tracing state used to generate this TB */
     uint32_t trace_vcpu_dstate;
 
+    /* Above fields used for comparing */
+    uint16_t size;      /* size of target code for this block (1 <=
+                           size <= TARGET_PAGE_SIZE) */
+    uint16_t icount;
+
     struct tb_tc tc;
 
     /* first and second physical page containing code. The lower bit
-- 
2.20.1



  parent reply	other threads:[~2021-02-24 17:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 16:58 [RFC PATCH 0/5] Experimenting with tb-lookup tweaks Alex Bennée
2021-02-24 16:58 ` [RFC PATCH 1/5] accel/tcg: rename tb_lookup__cpu_state and hoist state extraction Alex Bennée
2021-02-24 16:58 ` [RFC PATCH 2/5] accel/tcg: move CF_CLUSTER calculation to curr_cflags Alex Bennée
2021-02-24 16:58 ` [RFC PATCH 3/5] accel/tcg: drop the use of CF_HASH_MASK and rename params Alex Bennée
2021-02-24 16:58 ` Alex Bennée [this message]
2021-02-24 16:58 ` [RFC PATCH 5/5] include/exec/tb-lookup: try and reduce branch prediction issues Alex Bennée
2021-02-25  0:28 ` [RFC PATCH 0/5] Experimenting with tb-lookup tweaks Richard Henderson
2021-02-25 10:15   ` Alex Bennée
2021-02-25 15:45 ` no-reply

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=20210224165811.11567-5-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.