From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8616 invoked by alias); 20 Jun 2019 06:15:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8542 invoked by uid 89); 20 Jun 2019 06:15:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Jun 2019 06:15:46 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5K6A69U173246 for ; Thu, 20 Jun 2019 02:15:44 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2t83p9t00n-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 20 Jun 2019 02:15:44 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Jun 2019 07:15:43 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 20 Jun 2019 07:15:40 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5K6Fct641943282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jun 2019 06:15:38 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A62BAE05D; Thu, 20 Jun 2019 06:15:38 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B357AE04D; Thu, 20 Jun 2019 06:15:36 +0000 (GMT) Received: from luoxhus-mbp.cn.ibm.com (unknown [9.200.154.76]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 20 Jun 2019 06:15:35 +0000 (GMT) Subject: Re: [PATCH] [RFC, PGO+LTO] Missed function specialization + partial devirtualization From: luoxhu To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, segher@kernel.crashing.org, wschmidt@linux.ibm.com, luoxhu@cn.ibm.com References: <20190618014521.67198-1-luoxhu@linux.ibm.com> <647670f1-3c0f-b5f0-9a05-da5d135212b2@suse.cz> <78b20e84-8a15-d4c2-7878-efeb4fff37fa@linux.ibm.com> <9644bda8-1d7b-f97c-dd03-394c5a29c097@suse.cz> <8527acca-6268-e913-e368-2dbf240311c4@suse.cz> <534ba71f-b452-e6b0-849c-e66ca46cf99c@linux.ibm.com> Date: Thu, 20 Jun 2019 06:15:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <534ba71f-b452-e6b0-849c-e66ca46cf99c@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit x-cbid: 19062006-0020-0000-0000-0000034BBD1A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062006-0021-0000-0000-0000219F157E Message-Id: <500641bc-4020-64fc-3887-826a9d2ede5f@linux.ibm.com> X-SW-Source: 2019-06/txt/msg01195.txt.bz2 Hi Martin, On 2019/6/20 09:59, luoxhu wrote: > > > On 2019/6/19 20:18, Martin Liška wrote: >> On 6/19/19 10:56 AM, Martin Liška wrote: >>> Thank you very much for the numbers. Today, I'm going to prepare the >>> generalization of single-value counter to track N values. >> >> Ok, here's a patch candidate that does tracking of most common N values. >> For your test-case I can see: >> >> pr69678.gcda:    01a90000:  18:COUNTERS indirect_call 9 counts >> pr69678.gcda:                   0: 350000000 1868707024 175000000 >> 969338501 175000000 0 0 0 >> pr69678.gcda:                   8: 0 >> >> So for now, you'll need to generalize get_most_common_single_value to return >> N most common values. >> >> Eventually we'll need to renamed the counter as it won't be tracking just >> a single value >> any longer. I can take care of it. >> >> Can you please verify that the patch candidate works for you? > Thanks, the profile data seems good, I will try it.  I need rebase my patch > to trunk first, as there are many conflicts with your previous patch. The patch works perfect for me, lots of duplicate code can be removed base on that. Hope you can upstream it soon. :) BTW, I don't need call the get_most_common_single_value function to access the histogram values & counters, I will loop access it directly one by one. Thanks Xionghu > > >> Thanks, >> Martin >>