From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id 0D39C386FC36 for ; Sun, 9 May 2021 16:28:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D39C386FC36 IronPort-SDR: 7qzowx3bJA/ymp7U56yFiMTT8rPZIvL3/fVW7h9O05/j1pJBNe5QNB8DXGzYpvw3P48nj5Twg4 UayYKP8aIovQ== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="219978011" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="219978011" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2021 09:28:24 -0700 IronPort-SDR: NEUGErJ50Xekk5jo39lMgGOeWiWAqY7ODWafnVrjKJUv0W9s7npoyqTPh5UGDFEF4WTZVDAUWu bbXj6/hPcn5g== X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="435778835" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.80.18]) ([10.209.80.18]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2021 09:28:24 -0700 Subject: Re: State of AutoFDO in GCC To: 172060045@hdu.edu.cn Cc: gcc , Eugene.Rozenfeld@microsoft.com References: <20210423192834.GA1949@kam.mff.cuni.cz> <20210425190754.GA88857@kam.mff.cuni.cz> <87a6plulkz.fsf@linux.intel.com> <20210426180011.GA1401198@tassilo.jf.intel.com> <20210429054025.GB4032392@tassilo.jf.intel.com> <4d005159.55ea.1791e171ab9.Coremail.172060045@hdu.edu.cn> <875z0378j1.fsf@linux.intel.com> <67df7dbb.5eae.1794bba0ca3.Coremail.172060045@hdu.edu.cn> From: Andi Kleen Message-ID: <7c802b11-857e-78eb-c2e8-0a3044817793@linux.intel.com> Date: Sun, 9 May 2021 09:28:23 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <67df7dbb.5eae.1794bba0ca3.Coremail.172060045@hdu.edu.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2021 16:28:28 -0000 > With my tests, AutoFDO could achieve almost half of the effect of > instrumentation FDO on real applications such as MySQL 8.0.20 . Likely this could be improved with some of the missing changes. Apparently discriminator support is worth quite a bit especially on dense C++ code bases. Without that, gcc autofdo only works on line numbers, which can be very limiting if single lines have a lot of basic blocks. Sadly discriminator support is currently only on the old Google branch and not in gcc mainline Longer term it would probably be best to replace all this with some custom specialized binary annotation instead of stretching DWARF beyond its limits. -Andi