From patchwork Wed Sep 25 18:45:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174402 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1017435ill; Wed, 25 Sep 2019 11:48:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPivo2PE7lHBQ3sbe7yv5dSG1nIi8A/yw4gIlySPNjfTq5EJL3Y/m/bcU1ByRWKdubXQL8 X-Received: by 2002:a05:6402:750:: with SMTP id p16mr4624010edy.188.1569437289648; Wed, 25 Sep 2019 11:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569437289; cv=none; d=google.com; s=arc-20160816; b=PhpQS38lFRN50oSXQnsbqtSZJGaz6A5jGyeQxjduoix7y7kUG4qsn9So93I1h7Hu1X ou764Z2Cz22QSp25S/4MKJA/aEvv+0BVHR/VG7r9yJjOVOp/yINknEcYKoQLMbyHfLr0 T9sqI+pflkMl9QBElo6RDxmkkdqY1I4dZEpNz9fTFI6imPXvU/CQeENI9/AC9FXL+OBN 5RsMRLvZasIUcVeX+c5iQGvr1xmlCVqIl9t8362Y8CgQcvZvR9d9u9lyXyCv8nk0ovxB X488kHcK/mJeDevAVrpMsvL80prTyoL9aekjlNizI/GGmL+EEXpgATQ00WgPNyCNQgfo shdA== 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=aF7h8rqeF+2t+99M3oN6M4tL53Bil7zhbXJ09PpgfiI=; b=LmDdO9kGbO3ys3XdxBtfatyTJlE8PtTYTM1ofNtTeP39DP1NlmIeKVB6mhTRgGke1t XlHizH8NJiinT3mFDxFNKF3CvqGad0rntA+I8SDA8AL71uxdDp32omiwydIN/fV4l5aM VAeNDzz/Sm/nV0u6jyRuBJbfdUO9Y9c29rhfgArb6PQo8dGs6u4XLOTjB3a3X0mgaMHw JBL1mByX6i3rjq14sRIOjg3P6b9oekFV5Uguac5fKzgCo/nPRIKQzCNIycArLFK2Atbd +CZbVAWjlTvxfWhWjc4MwX6tW2+4IdiZfQUFNFv3sj/S+uHzCa2kwzJZD2RwLGaSpJ20 VPeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jr2PYB98; 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=pass (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 a3si3865215edc.75.2019.09.25.11.48.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2019 11:48:09 -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=pass header.i=@linaro.org header.s=google header.b=Jr2PYB98; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDCKd-0001gM-TD for patch@linaro.org; Wed, 25 Sep 2019 14:48:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46951) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDCIW-0001ev-Dv for qemu-devel@nongnu.org; Wed, 25 Sep 2019 14:45:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDCIV-0004Bn-B4 for qemu-devel@nongnu.org; Wed, 25 Sep 2019 14:45:56 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:38024) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDCIV-0004AY-5A for qemu-devel@nongnu.org; Wed, 25 Sep 2019 14:45:55 -0400 Received: by mail-pf1-x436.google.com with SMTP id h195so4156831pfe.5 for ; Wed, 25 Sep 2019 11:45:55 -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=aF7h8rqeF+2t+99M3oN6M4tL53Bil7zhbXJ09PpgfiI=; b=Jr2PYB98n8W4eYtLOfF7FaH9i2h89lfkq5iTuXlXuUruLL7WEKdy7ubbBilpWNmjzc xSXbInx+BbxFhvPrepFdAr+KPswc8JdZyNrlP3cL0t2wxpnD8QmGiewGnmrGnk8e1O9z H1+A/vopzcR5VbtN/+vaDDyGhd+rdGVycOdK0HIJBCsb3KrLZdMTTnJ6cLoV7KWWvu5V C6/42tHAaOuw2Qh+0zUWEUwjRI0mv8LcNTci3QMeXxi6xXI+/BACso7QTBUaMGMVxNVN 6P0V7wYPZzL2y8wCk2s3v9OdsZ010WOkvbOkCkCm6prosn2KZwYwgVvZ13pXovg0Lmb1 ACTw== 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=aF7h8rqeF+2t+99M3oN6M4tL53Bil7zhbXJ09PpgfiI=; b=CM7EM7fUTDuL+de/4NwvUdUeo86j6VqvseTGsH6BHgIRVD63/erZi/l4tFWfHfM364 nLMlsHFgnmxstnSmYtq/nFkjzBas2GT3Xx4ALvkxLsPRbC1mYWshLmT9SoVivtBRcKQT u2kDOveyq2awGzdTP0RR7yCpCAxtQjkMWN1NoMszyKqYw3cPZ92sFphpmczmn1TRicnh tyu3x99q0Tu0k+9IQ8rffoblhVG3o8O/jCakCt+FBWGnkS60uUu3gxIsvM6s692Ln4x0 VwOFZcS10I5LrRevMhW+M2F1/VGj5gRUGJcxBnUIo7LkxWpyRZ8+1LNPiEExLIh4pmoL G9Fg== X-Gm-Message-State: APjAAAXFmbRlPLJPhN63xX7slC7VOqwrbt9CqTFW8RWD8WZOa6xtW+PG nFGHe/wBP1B4yyjdLsixf4u2I+0z3DE= X-Received: by 2002:a62:780c:: with SMTP id t12mr11065326pfc.211.1569437153746; Wed, 25 Sep 2019 11:45:53 -0700 (PDT) Received: from localhost.localdomain ([12.206.46.61]) by smtp.gmail.com with ESMTPSA id l24sm6133229pff.151.2019.09.25.11.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 11:45:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 02/16] cputlb: Disable __always_inline__ without optimization Date: Wed, 25 Sep 2019 11:45:34 -0700 Message-Id: <20190925184548.30673-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190925184548.30673-1-richard.henderson@linaro.org> References: <20190925184548.30673-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::436 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 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: Alex Bennée 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 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) {