Received: by 10.192.165.148 with SMTP id m20csp5149167imm; Tue, 1 May 2018 09:52:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrYdbKtZ0BdNkWIyCIh7fEb2p3NOpTzHc0llrI2aXtuGofiODl6qpK7CgYnnLTan3u89egG X-Received: by 2002:a65:438b:: with SMTP id m11-v6mr13671560pgp.153.1525193555955; Tue, 01 May 2018 09:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525193555; cv=none; d=google.com; s=arc-20160816; b=ZQBaR5n/MPZcKOTOwukPfqY3+iViqXmKx2EOEJVS05nvecWs1K/GBA4QlVczvWT+9P v2uGM1rWH6PNqxpm7BpKw9fYki/Mtd+WSdXamCY8LG8uOjZ8kBKQGYcW1STLWcHA/hQ1 C1iKS/f1BoUO6qPjytQfgB2WfwmETZ/vgZgn7Hm4zg5JozY/V7MdhOTkWTq9n9+rq+qv 5YBx2OV1FiypPmA89lEI2kJPSFiruRwrNi21uHAAKoHfp07nFBS+FDqpnmdpYocfA+bF wMoofsrMUkBjQ35s83dfgw/3rHIg6zeG1ug5KCTOO9wr2PDYIm2ghMsQMNc6YJ5cxjwD q2nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=gTJB2bWBgD0hSKIeVR/PetDuLH3cf425AfYqkv1kAEI=; b=bXav3neYA1P7mfadYVc0x4j4R+0jfvLlByxAYxnAdVtwn9uWwPIDFDN5hB/nBc3r2T 1fIC3XpfomSYll9gvieoVw4BHoudmannjYo1QC2JKRZIl9wLNsXK02fk7TItBNH7cvf2 f4getnf7eUbMpKUjijBiTtWNC2N11HM/L9XEc1TyVhFU6l686pwz8Ux0I2i3NFPlyKIp lpSsgnV+tGRyhG30No82cikyoTu3Swe8a8spAbBn015quFmQNOi4HtXq8yFGFYJ5SIzx ZZbeUn6aaiyX6qxCV6MtEY1OUjWRq0v3B1LyvWvTxBDSwIxmRjlfDQS7UD31cdOfOZD8 vjXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=h6CsiW2n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si7932713pgp.163.2018.05.01.09.52.21; Tue, 01 May 2018 09:52:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=h6CsiW2n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756174AbeEAQwI (ORCPT + 99 others); Tue, 1 May 2018 12:52:08 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:55636 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755402AbeEAQwH (ORCPT ); Tue, 1 May 2018 12:52:07 -0400 Received: by mail-it0-f52.google.com with SMTP id 144-v6so14273411iti.5 for ; Tue, 01 May 2018 09:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gTJB2bWBgD0hSKIeVR/PetDuLH3cf425AfYqkv1kAEI=; b=h6CsiW2nfmL2rRsnwfzWmGljyrDdUZ4mfou/Mppehuld5SHL3T5g9fWAu2Wp+jkQu8 40hVxbw1qcJ0tSx8xZBg0xYchtWbkiHXyzzIYTchlF4M9h7D+yKioMSOLOAtNQTg3FYF mlxgYTPMUe8RmJceHpdBo8QEaQbWeL8m6n0a4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gTJB2bWBgD0hSKIeVR/PetDuLH3cf425AfYqkv1kAEI=; b=TMckw11vV/E9ZcKnQmnh/C7opN9YQlK8MCKXoKLVsTh//yh+A/3yFy0BY9LJsiCNsF rIl+rPjpYYN/fJ0eqNuU94AO0oBmpod+cP2i2NPxa59jXc6MBFY8+UUyvTVNwKQZSFLw a9vwkNax9JTVrYYy7ZGe5kwq3msUhDmjdrqUb9BNKABZ5mJlHWWisXCTTHkL+Xeqx3ta dqv2/oddX/NZpFxZjLAJABeoNN9VLuy45YO2vDfWU4IlHQmlMnEJlhCdfl7AWKgCXHlg lm/uKFzfSuGqXUTmDmDlzAUHEKsEzgE6LZLsybF99hFdQNUOXNBaxZ0SkVCaqU+5Crx/ D6jg== X-Gm-Message-State: ALQs6tD8QDKA8AxzDRvywbZsGXNKb4MPQj1bYKnH2lsLXAI9Ggxz7TO5 ab803P12KynHX4mFegKQBODv5aGFRUIOrz7xvPQ= X-Received: by 2002:a24:2213:: with SMTP id o19-v6mr16356337ito.16.1525193526886; Tue, 01 May 2018 09:52:06 -0700 (PDT) MIME-Version: 1.0 References: <20180501134020.fonel3x6plea5xdt@treble> <042668BD-8912-44D4-9CA1-9ABA2F094709@vmware.com> <8E8FD6A0-DA57-4523-A16F-C68167C2B5ED@vmware.com> In-Reply-To: <8E8FD6A0-DA57-4523-A16F-C68167C2B5ED@vmware.com> From: Linus Torvalds Date: Tue, 01 May 2018 16:51:56 +0000 Message-ID: Subject: Re: Suboptimal inline heuristics due to non-code sections To: namit@vmware.com Cc: Josh Poimboeuf , Peter Zijlstra , Ingo Molnar , Linux Kernel Mailing List , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 1, 2018 at 9:46 AM Nadav Amit wrote: > My bad. It=E2=80=99s not the new-line. Let me do some more digging. From the gcc docs: Some targets require that GCC track the size of each instruction used in order to generate correct code. Because the final length of the code produced by an @code{asm} statement is only known by the assembler, GCC must make an estimate as to how big it will be. It does this by counting the number of instructions in the pattern of the @code{asm} and multiplying that by the length of the longest instruction supported by that processor. (When working out the number of instructions, it assumes that any occurrence of a newline or of whatever statement separator character is supported by the assembler -- typically @samp{;} --- indicates the end of an instruction.) so it probably counts newlines and semicolons to estimate the size. Linus