From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52039 invoked by alias); 21 Dec 2018 22:07:53 -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 52022 invoked by uid 89); 21 Dec 2018 22:07:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1031, complained, 278 X-HELO: arjuna.pair.com Received: from arjuna.pair.com (HELO arjuna.pair.com) (209.68.5.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Dec 2018 22:07:50 +0000 Received: by arjuna.pair.com (Postfix, from userid 3006) id 1A0A48A6F9; Fri, 21 Dec 2018 17:07:49 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id 196008A6ED; Fri, 21 Dec 2018 17:07:49 -0500 (EST) Date: Fri, 21 Dec 2018 22:13:00 -0000 From: Hans-Peter Nilsson To: Andi Kleen cc: "Bin.Cheng" , bin.cheng@linux.alibaba.com, gcc-patches List Subject: Re: [PATCH AutoFDO]Restoring indirect call value profile transformation In-Reply-To: <20181218212736.GH25620@tassilo.jf.intel.com> Message-ID: References: <87wooai8cs.fsf@linux.intel.com> <20181218212736.GH25620@tassilo.jf.intel.com> User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01615.txt.bz2 On Tue, 18 Dec 2018, Andi Kleen wrote: > > Yes, take g++.dg/tree-prof/morefunc.C as an example: > > - int i; > > - for (i = 0; i < 1000; i++) > > + int i, j; > > + for (i = 0; i < 1000000; i++) > > + for (j = 0; j < 50; j++) > > g += tc->foo(); > > if (g<100) g++; > > } > > @@ -27,8 +28,9 @@ void test1 (A *tc) > > static __attribute__((always_inline)) > > void test2 (B *tc) > > { > > - int i; > > + int i, j; > > for (i = 0; i < 1000000; i++) > > + for (j = 0; j < 50; j++) > > > > I have to increase loop count like this to get stable pass on my > > machine. The original count (1000) is too small to be sampled. > > IIRC It was originally higher, but people running on slow simulators complained, > so it was reduced. Perhaps we need some way to detect in the test suite > that the test runs on a real CPU. Doesn't check_effective_target_simulator work here? See e.g. libstdc++-v3/testsuite/25_algorithms/heap/moveable2.cc for an example. brgds, H-P