From patchwork Mon Sep 23 22:59:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174228 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3401474ill; Mon, 23 Sep 2019 16:05:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJUseBU222pXjWhAY0rXOpF0VW+JhncSg66/IZx5CisZ6R55mSpf9LBHp2+tkc0TJ5gjj7 X-Received: by 2002:a50:ab84:: with SMTP id u4mr2640585edc.13.1569279922043; Mon, 23 Sep 2019 16:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569279922; cv=none; d=google.com; s=arc-20160816; b=mUvEzxcp3Cwp9E2o+rAHwJbi0FwuZM5k/oKt2E7kxyeR3+DmpJHw6FVzS4FYlsyBMA eAPHhopZTgbW9HI5Jdu0OV8WKnLfT/FBzeVszc4KrJM/2EzMbvVj9FNNyCKTsu42DUcp r/hYtCpvqSpQ7wwDiZKLWg5vIHa9WfHOdcplF9g5Ok+bR10OOJ2Bnpt2IkUmETwN9CIX ulblMYKzCJZPTfWzMWYeYoJR70TGZjzEtLmfjNH8Lk1nLUQRryVk0Z0OiffuOuAFhk2j FWlflW+dD8M2yAxkpUuOT5Y1c/prqvmkOgkoMGi90A6zIMCsSXsxGP7adH3rW4vLdXqU OLAQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DLSBL7HpLmLBUzIEzjw9q9aafzQEGfd8fwlel43TucU=; b=MycbN2BIAj+SgnRltPfICfGO+9BAo7zysgjvpV2IAXtumVBDWUMF2f/hJ3KjVSvG9+ B3h3wSctp2wWPSUHED3TKEvrmoaWNDnlDioWVGAZSjZaXuOlxWs2hHRqBhVL013gm//p SxBExc27RG3wUwkNW1LI9A5vPtJDm02JGQTdqx5l3tYBy27x348YNHUj7h8rsyP+r3oq npZYswsmKgTMx5WKPT2U9U7ayXF+yHvHf04MWrLuqKL0jCCHPA2m6PB38WFv1I9N74mo abyvifmABzvjDsLFKNd1LJY2q+6VTrNyi0KKYimvMi92BrCT1ysAVg6ovSs88ToWEuO7 WYHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cjawjnek; 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 k16si5952481ejc.134.2019.09.23.16.05.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Sep 2019 16:05:22 -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=cjawjnek; 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]:37074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCXOS-0000QT-CY for patch@linaro.org; Mon, 23 Sep 2019 19:05:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35709) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCXJW-0005Qy-CG for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCXJV-00080O-55 for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:14 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:41685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCXJU-0007zh-VH for qemu-devel@nongnu.org; Mon, 23 Sep 2019 19:00:13 -0400 Received: by mail-pg1-x541.google.com with SMTP id s1so7779579pgv.8 for ; Mon, 23 Sep 2019 16:00:12 -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 :mime-version:content-transfer-encoding; bh=DLSBL7HpLmLBUzIEzjw9q9aafzQEGfd8fwlel43TucU=; b=cjawjnekOI9pYfGesh2bquow7IgGYQHFqQGvA0o3qE+iyx8ON9ptVksJ3HXoaBcHwT d9ESK6K9bmxN8Tind2EJse+zTuDNNeJJ/pVGN4/5rm/yxOFYeLhMwU2RwtvHIE/V662y zNOGgC78fGhVMLc25ZqeXiLPcUgEtIHlRaH5ORq5vly/tT/+LlXLFr6nDCX+UImvuPPX iV0Nij+vKZjPlpDlV6qsiftInLcVZRF6Flsrv3bYUqSm9jA8jl5cWXnuX+fJicNuCQU+ ACDQoraNALA6vI7O9DO4s0DkPK1vMOBZB998a7biQNVhPOE8T3//6yJFuYRJjiIAE8uG p/5w== 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:mime-version:content-transfer-encoding; bh=DLSBL7HpLmLBUzIEzjw9q9aafzQEGfd8fwlel43TucU=; b=ltHzcvd1VsmcMpFp8MW39g14gmpc2j5p6TjFwSZ0llRGNNPTemH9a5Lt2X7togx+eL Y2lO8Ks1sS1Cd850vR57ye8H3WD0v8Y88j83mjEwwgAD/R5PobBLkv0gh76EaCDhTIxm uHhBeN3uTMonW90S3ZDiu4lLm6D/m6/ppRkRVanUBVJNYUr61Sq1AWJz3ThdNxTt8qQj qJicXlE6fA6mpTVzqJtkk2oGOgA4jjeUW5jXnyg8LigtAK5mskA31/0uwgwAtuRVZrYk xdzlOWsENgsFqayRa3qYa0peQzRiJ2unUYpeDrPVA0+DGKkXzyNKLyDYsDzYS7DzSDih dlmw== X-Gm-Message-State: APjAAAWCuNpMlFVjf1VkEg3VCkb1axXWRXKm3NYif3NKiaZDJfQCZ70Q fQ52DUSONH7gM9leqe6A/Y+CPn8GKeg= X-Received: by 2002:a63:c050:: with SMTP id z16mr2314463pgi.250.1569279611464; Mon, 23 Sep 2019 16:00:11 -0700 (PDT) Received: from localhost.localdomain ([12.206.46.59]) by smtp.gmail.com with ESMTPSA id 74sm11674810pfy.78.2019.09.23.16.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 16:00:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 02/16] cputlb: Disable __always_inline__ without optimization Date: Mon, 23 Sep 2019 15:59:50 -0700 Message-Id: <20190923230004.9231-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190923230004.9231-1-richard.henderson@linaro.org> References: <20190923230004.9231-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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: pbonzini@redhat.com, alex.bennee@linaro.org, stefanha@redhat.com, david@redhat.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. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- include/qemu/compiler.h | 11 +++++++++++ accel/tcg/cputlb.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 09fc44cca4..20780e722d 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -170,6 +170,17 @@ # define QEMU_NONSTRING #endif +/* + * Forced inlining may be desired to encourage constant propagation + * of function parameters. However, it can also make debugging harder, + * so disable it for a non-optimizing build. + */ +#if defined(__OPTIMIZE__) +#define QEMU_ALWAYS_INLINE __attribute__((always_inline)) +#else +#define QEMU_ALWAYS_INLINE +#endif + /* Implement C11 _Generic via GCC builtins. Example: * * QEMU_GENERIC(x, (float, sinf), (long double, sinl), sin) (x) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index abae79650c..2222b87764 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1281,7 +1281,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 QEMU_ALWAYS_INLINE load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, uintptr_t retaddr, MemOp op, bool code_read, FullLoadHelper *full_load) @@ -1530,7 +1530,7 @@ tcg_target_ulong helper_be_ldsl_mmu(CPUArchState *env, target_ulong addr, * Store Helpers */ -static inline void __attribute__((always_inline)) +static inline void QEMU_ALWAYS_INLINE store_helper(CPUArchState *env, target_ulong addr, uint64_t val, TCGMemOpIdx oi, uintptr_t retaddr, MemOp op) {