From patchwork Wed Sep 11 01:43:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 173561 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp123826ilq; Tue, 10 Sep 2019 18:44:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQi+4J5pHJleh+YF8AgOLGpQgDX67mMk8H7+zD6RSimgyfNGPVumlDKLHeQhs/AuV18Iid X-Received: by 2002:a50:cb8c:: with SMTP id k12mr26436679edi.94.1568166293782; Tue, 10 Sep 2019 18:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568166293; cv=none; d=google.com; s=arc-20160816; b=U0bZEwZXDmweeTwU7t2A7ccWf09yQUv652nj7+JvGC4bw2N9uYcf7PQJlNz3uqwV4/ KpUcnHQsr0x76RFV9vQL01D39FUSmT3lugf+47g4RCr0WT+qJVIczp9+S1uYTIqAtu7y Sz4e9JRwcl8qUMLxBSetP4p2xW78HazlHp4S7BGpmkKoVzM9LFHNGfV4hn8iHQ/OF7mf GzaI9tcf4AJ/yVC3IR9zkx3t3fQ2eljyZ/QaHCbpMEmYQLcmOCGPS4ij3EQdMLOLCtDz Y2jpyVO1EGoxpMY5LTf2HIacJuzelDE/zqGQ3ks4uZNEUzducv2XJkZXNgKdrYjhx0mO 9fOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=v4itJ8e/ejo0YBL9s61Q35bPcHrTTy3X5DE6Cxbfjzc=; b=gFL1VpYKaWR/AsT1sVJI+LWb6CeoVL2deWpgCCQJ8CIV3bPm5j6VUk4XJQt4BlVUxT xA466i/UYiwkCp4uFZICyd0yj+L0XiBcHYTtt+6nC9f0Q0HdduwvvcH4PwXHXNo/+43c d/MBaH794O1304RnrIpokQrhrTjwiN2u1f+Lq90AigYwcLjvC8F1Xnr4dKj/5nW+0PnV aJN3oS9BkbGbaKHEV1hYqDoVLExvOgzqzKtUwDlCgO2CS8xQOdldfaxjn/wjg2dytAqb gYx5MU9kzKnFBLkWBK5NvNZM4+pKujpEB4SANZY4MwrApJRqRmmjSv4UiY7DWwOz3Vom 68Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F63EEwzd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l17si13268190edd.35.2019.09.10.18.44.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2019 18:44:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F63EEwzd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7rgi-0001hB-Hq for patch@linaro.org; Tue, 10 Sep 2019 21:44:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53856) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7rfr-0001gQ-6O for qemu-devel@nongnu.org; Tue, 10 Sep 2019 21:44:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7rfq-0000a5-5V for qemu-devel@nongnu.org; Tue, 10 Sep 2019 21:43:59 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:42272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7rfq-0000a1-1w for qemu-devel@nongnu.org; Tue, 10 Sep 2019 21:43:58 -0400 Received: by mail-qt1-x841.google.com with SMTP id c17so3922050qtv.9 for ; Tue, 10 Sep 2019 18:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=v4itJ8e/ejo0YBL9s61Q35bPcHrTTy3X5DE6Cxbfjzc=; b=F63EEwzd/KNZhyEFNFQi/9f3Oa5pV2Q1a+Encvx19d5Dw4IxbcIObKJdryto7d9nMX jLlx5gkK452Evir4XS3AT3a+lX+/Izf+HW7nvodE/BtJNaifNhg0fo4aNMEVJ3HuRcYH Xvh3kxDTT+9otZc3mhYLmBlvevGQb/1HMHPMiVm9vasbqRhuE67GqrixiWoX2vrTgsRt +Xw6GM2zMFVq++Eejuu9vTTxvsPokCxnzABvsLVfMhdlfPpLDNqBVDIynVrJ1Ynqo32T xjxFAyJgR5hux8cT0MGSYYPv81AEBKLKxECBnC/POra6h0iYyc7n/mxxFfoTW/saEkrw GX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=v4itJ8e/ejo0YBL9s61Q35bPcHrTTy3X5DE6Cxbfjzc=; b=YunNDTf0MuCQiVnBADBqaT24A6nPB8RnlGKDOM11dsOucHT22nU7C9m0S4wuA/LSl0 PSWUEowUMzccWQf+3NA8aEHHmN5S+ZgF1nnHZkn6hGseq3gSWmTwNuRyeEgk8tTkdutL JsYrWwjq3BifDX8fgdNDlkZf2V8KMvo4ximCL5+KROSU781D2A15wkTCdMZfHiY0QsJo aVfMUBeyudMspDmSX5VYsCaE3LWuXjqDoVVudSGeRrdTcUysjPNrwc0wB0ZbbDAmUUIb 8MfiM1XbV7+9ndkIGbWbkGEi9sCTv6Hl3pabZsvNDsCXcpM8opyharhAZrtRYeaBkm2r /iMA== X-Gm-Message-State: APjAAAXUvbqbzfLT2j7SwYWc4kBNSrf1SCb1vhofpWl0vB62A/AQH4+W +H/MNjoNKNVsrv17y6zBo0+mZ6X5Zbem3A== X-Received: by 2002:ac8:2d2c:: with SMTP id n41mr32519611qta.335.1568166237205; Tue, 10 Sep 2019 18:43:57 -0700 (PDT) Received: from localhost.localdomain (otwaon236nw-grc-01-64-229-69-35.dsl.bell.ca. [64.229.69.35]) by smtp.gmail.com with ESMTPSA id a14sm10074676qkg.59.2019.09.10.18.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 18:43:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 21:43:51 -0400 Message-Id: <20190911014353.5926-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190911014353.5926-1-richard.henderson@linaro.org> References: <20190911014353.5926-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::841 Subject: [Qemu-devel] [PATCH 1/3] cputlb: Disable __always_inline__ without optimization X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, tony.nguyen@bt.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This forced inlining can result in missing symbols, which makes a debugging build harder to follow. Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index abae79650c..909f01ebcc 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1269,6 +1269,18 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, cpu_loop_exit_atomic(env_cpu(env), retaddr); } +/* + * In order for the expected constant folding to happen, + * we require that some functions be inlined. + * However, this inlining can make debugging harder for a + * non-optimizing build. + */ +#ifdef __OPTIMIZE__ +#define ALWAYS_INLINE __attribute__((always_inline)) +#else +#define ALWAYS_INLINE +#endif + /* * Load Helpers * @@ -1281,7 +1293,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, typedef uint64_t FullLoadHelper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, uintptr_t retaddr); -static inline uint64_t __attribute__((always_inline)) +static inline uint64_t ALWAYS_INLINE load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, uintptr_t retaddr, MemOp op, bool code_read, FullLoadHelper *full_load) @@ -1530,7 +1542,7 @@ tcg_target_ulong helper_be_ldsl_mmu(CPUArchState *env, target_ulong addr, * Store Helpers */ -static inline void __attribute__((always_inline)) +static inline void ALWAYS_INLINE store_helper(CPUArchState *env, target_ulong addr, uint64_t val, TCGMemOpIdx oi, uintptr_t retaddr, MemOp op) {