From nobody Tue Feb 10 13:16:58 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1662458904; cv=none; d=zohomail.com; s=zohoarc; b=RVkC9g7JiR1cXy3B7e2v61EavmLrthm+NWLyznacJJGS8z7kHCmYuGlhtbF0V9TVyiU/yPkg51SrECbGRQso/FL92fQquP8AH2t+vpnyP/DHVfZ0OXT48UotUpnxPmAwE7WTxudnXoZUKLcJBVwrJo64+OaeBEOGDfj1PJB8vKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662458904; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SRY4FrKihbAdLBlGm0zlu+Vf4IcbXDY8j/QZi/7lz70=; b=RyN15Tr4zs2yiqlBAASPiFO/fVb31w1SyfrEoMggCua6oOOZCFwBIWWunRNplKBv7cpBnRi5DQ38GFHaerPvsYDUPpLdI7vBtyRCVWn1GEtH3OWzyiKFVC9Vn8LB+rGyKkCTUlZ1KR/QWcwtNubqVlzHUeZwkbMUrLn+NZX0ppQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166245890467787.09072697159581; Tue, 6 Sep 2022 03:08:24 -0700 (PDT) Received: from localhost ([::1]:59932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVVVG-0006ZH-Mx for importer@patchew.org; Tue, 06 Sep 2022 06:08:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVUcS-0007WR-8p for qemu-devel@nongnu.org; Tue, 06 Sep 2022 05:11:47 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:36738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVUcQ-0002fY-2s for qemu-devel@nongnu.org; Tue, 06 Sep 2022 05:11:43 -0400 Received: by mail-wr1-x42f.google.com with SMTP id b17so1088409wrq.3 for ; Tue, 06 Sep 2022 02:11:41 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:a5c0:5a80:ba98:3a71:8524:e0b1]) by smtp.gmail.com with ESMTPSA id m64-20020a1c2643000000b003a5ee64cc98sm20094193wmm.33.2022.09.06.02.11.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 02:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date; bh=SRY4FrKihbAdLBlGm0zlu+Vf4IcbXDY8j/QZi/7lz70=; b=djKDvi0Q/VlAIx+Ie8ym7XGIi+yRkXCP4TAaBn7aSQQEloD2E7viUk22y8w6h6JCyc Zd7HQcRFe0qBV2Ry/AQVopRy023CHuB6BPbIoK2VhDsIBCYfyuYeQ63bHi3w86FsKCfU RG/IvVClEEfS6VBrvbPYpTgzpCuwwYMBXAfuklqstEsj4+PkEJlreWayjmRZX2X5fu+m xBlbTrvrSNTTvub1fe4gY4kKuANvtHQiysqqWb8qX6Kgz21g6PDLMLTOqhQYPSqH2hP3 z+we8Nc/eEwjYWzFTCZFkPYSRAW1cMA9CW6nb0YPcBxbhudhhFgBebm2uX/5jDo+Qd9M wuSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=SRY4FrKihbAdLBlGm0zlu+Vf4IcbXDY8j/QZi/7lz70=; b=DJpDEBF8mTq3/2wtpKtyVOvalbm3aZjdDPu+TJqAIkvu8tTp4g/RCO43DmaSks8z7c gIVjn7+vUt2QCgor6XYJD9mHPNvlTYFB7mvMz9tHBUAPXs7kjdr57t5gc94d7IW4QmXU kYJSTvXzJnhU4TsVKvQ9Ks+1tp6yGT2UQsflsP/ExxlxlyQvGIK3V7d7OWhBG5nJoCM9 3A7E9UkY2M5r+X3pGCBVD8MKHhFGjzM+N8lH1J1eRzd2SBKTJHfaM5SxqpY5Cwe9U5YO cQ3SSAKs3uyQuE4wjqTiPYHWKN3GqZe4FFheyvkZfsCSCEQl/NISnJjidYWAF9j1WsUr fpAw== X-Gm-Message-State: ACgBeo25CiwKdcwuu4hTdvhd7qXiG7kFYF0AGLZQO2fz3sNWLu1JHmrU LpEyUeOzuOYLB7GhQi22o+pDWf1cdQp1fe0O X-Google-Smtp-Source: AA6agR4sdvFnWjvTgwp8ROd3MV2G7H0qbsHnVy5TqFwRwVyWNHtvUvnJJmGUYyJ5tO8Yc0cI5fviRg== X-Received: by 2002:a5d:6d0e:0:b0:21e:fc95:3dfc with SMTP id e14-20020a5d6d0e000000b0021efc953dfcmr26957470wrq.112.1662455500899; Tue, 06 Sep 2022 02:11:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 7/7] accel/tcg: Split log_cpu_exec into inline and slow path Date: Tue, 6 Sep 2022 10:11:26 +0100 Message-Id: <20220906091126.298041-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220906091126.298041-1-richard.henderson@linaro.org> References: <20220906091126.298041-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1662458906165100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/cpu-exec.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 7fe42269ea..ac8eec7f54 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -292,12 +292,11 @@ static inline TranslationBlock *tb_lookup(CPUState *c= pu, target_ulong pc, return tb; } =20 -static inline void log_cpu_exec(target_ulong pc, CPUState *cpu, - const TranslationBlock *tb) +static void log_cpu_exec1(CPUState *cpu, const TranslationBlock *tb) { - if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_CPU | CPU_LOG_EXEC)) - && qemu_log_in_addr_range(pc)) { + target_ulong pc =3D tb_pc_log(tb); =20 + if (qemu_log_in_addr_range(pc)) { qemu_log_mask(CPU_LOG_EXEC, "Trace %d: %p [" TARGET_FMT_lx "/" TARGET_FMT_lx "/%08x/%08x] %s\n", @@ -324,6 +323,13 @@ static inline void log_cpu_exec(target_ulong pc, CPUSt= ate *cpu, } } =20 +static inline void log_cpu_exec(CPUState *cpu, const TranslationBlock *tb) +{ + if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_CPU | CPU_LOG_EXEC))) { + log_cpu_exec1(cpu, tb); + } +} + static bool check_for_breakpoints(CPUState *cpu, target_ulong pc, uint32_t *cflags) { @@ -421,7 +427,7 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env) return tcg_code_gen_epilogue; } =20 - log_cpu_exec(pc, cpu, tb); + log_cpu_exec(cpu, tb); =20 return tb->tc.ptr; } @@ -444,7 +450,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *= tb_exit) TranslationBlock *last_tb; const void *tb_ptr =3D itb->tc.ptr; =20 - log_cpu_exec(tb_pc_log(itb), cpu, itb); + log_cpu_exec(cpu, itb); =20 qemu_thread_jit_execute(); ret =3D tcg_qemu_tb_exec(env, tb_ptr); --=20 2.34.1