From patchwork Mon Jan 14 08:19:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1024320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493980-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=firstfloor.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SBwhlchp"; dkim=pass (1024-bit key; unprotected) header.d=firstfloor.org header.i=@firstfloor.org header.b="XXOLJo4V"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43dRHG4Jbyz9s7T for ; Mon, 14 Jan 2019 19:20:26 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; q=dns; s=default; b=uviRiSGwgj2MVdfv aj7Jn9UrBjvh3tqeCr8YVW2TmwBm7NQ3onOzmewIQ7hAbVdlxFssmOtENQMTUMPL /6XF8LFhQInS/p6oW22hV81KiHDcmCwzjQOuopMeHBV24WOTmg2xI+GUEzTkGK73 oCB0WgJVH8lvBjqTV5835Ykoj40= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=default; bh=yXN1OZJj9sws2gXE7T/c5U c8TQg=; b=SBwhlchp2Cg1XWFQosmvAXgfFq8QTuNBI/BGCkCtwb7fWO+L4EBRor DCmF/ULPUNodPTCeqDT4ZalfiROhdT8mMxDVdflJBVEJ01CmLbHK9jDyRQx914ej idRkWaeDI/jN1WB2HFkBZFBHyn3uy+yqDukEbvEn6xGQS1UhMCHNE= Received: (qmail 2293 invoked by alias); 14 Jan 2019 08:20:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2233 invoked by uid 89); 14 Jan 2019 08:20:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=2191, Lower, HContent-Transfer-Encoding:8bit X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Jan 2019 08:20:05 +0000 Received: from firstfloor.org (c-71-238-43-142.hsd1.or.comcast.net [71.238.43.142]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id 9D88C86897; Mon, 14 Jan 2019 09:20:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1547454000; bh=aitDHZOfqvMlY/naxWd7D/NH4VGoaf9J/nKaHAOYt8I=; h=From:To:Cc:Subject:Date:From; b=XXOLJo4V0Uo/Lp2GCwxQtNC9L61FrAnH+lfTBV5zgyR2AK7/Y+63eCVY3ZoXrg9gF JJ/sjU9FYtKptjfE+eMjPM8WY77k7IsjfxgNxQdIGbYfruIexFSzkQLk1y5jA5TOIW djBPotaoZQzfkxrtuIQ+ovp69iIxD0k09JAdviDI= Received: by firstfloor.org (Postfix, from userid 1000) id 8AC5EA2D99; Mon, 14 Jan 2019 00:19:56 -0800 (PST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: amker.cheng@gmail.com, Andi Kleen Subject: [PATCH 1/3] Lower sampling rate for autofdo bootstrap Date: Mon, 14 Jan 2019 00:19:40 -0800 Message-Id: <20190114081942.9088-1-andi@firstfloor.org> MIME-Version: 1.0 From: Andi Kleen autofdo create_gcov uses a lot of memory for large sample files. Since gcc runs quite long the sample files generated during the bootstrap are fairly ig. Currently I can't even build make autoprofiledbootstrap on my system at home because create_gcov needs more than 12GB and runs out of memory. This should probably be fixed in create_gcov, but for now lowering the sampling rate works well enough for me. The bootstrap run is long enough that it gets good enough data in any case. gcc/: 2019-01-14 Andi Kleen * Makefile.in: Lower autofdo sampling rate by 10x. * Makefile.tpl: Dito. --- Makefile.in | 2 +- Makefile.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index aa41730528a..28539a45372 100644 --- a/Makefile.in +++ b/Makefile.in @@ -387,7 +387,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 1000000 +AUTO_PROFILE = gcc-auto-profile -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still diff --git a/Makefile.tpl b/Makefile.tpl index 1ab65ac8ec4..126296fb49a 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -390,7 +390,7 @@ MAKEINFO = @MAKEINFO@ EXPECT = @EXPECT@ RUNTEST = @RUNTEST@ -AUTO_PROFILE = gcc-auto-profile -c 1000000 +AUTO_PROFILE = gcc-auto-profile -c 10000000 # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still From patchwork Mon Jan 14 08:19:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1024319 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493979-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=firstfloor.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="x3R7clJx"; dkim=pass (1024-bit key; unprotected) header.d=firstfloor.org header.i=@firstfloor.org header.b="a1eN/9DX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43dRH34g59z9s7T for ; Mon, 14 Jan 2019 19:20:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; q=dns; s=default; b=rr0 Sf0UKchjAnQ5ul5ifb1jecFXRyR1VpYxYHAKCBoswP1pgqXFVDtgl0jl+R5kFHuJ /kQzXTu+2mzi41KHRsUMXUMzO/ll3V9KmHw81TqOG/rMlWFbvEF01wLgO8ozu0sl 1tVQF3DxyMN9y2XsVHy3zEMxLkkba9BdJp41sngg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=default; bh=4AS1qCYUB NUSDPKEf9sbAj+GiyI=; b=x3R7clJx4XEYPljFF6s8aOLE1OKixAoK38r6pYCFE Vm6fz9SStS1bRZHZgOMdJc79ezroQrtM6oKQp+/sKfG8b3oQdJQCsLCwbuDEPLBe C6U7hA5MHibSTNf8kpFBaKlchmmwD5RAUspGZTs3/c4p7IX3zJRpHym3AE7Os0Gd aM= Received: (qmail 1705 invoked by alias); 14 Jan 2019 08:20:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 696 invoked by uid 89); 14 Jan 2019 08:20:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=2191, HContent-Transfer-Encoding:8bit X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Jan 2019 08:20:05 +0000 Received: from firstfloor.org (c-71-238-43-142.hsd1.or.comcast.net [71.238.43.142]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id 9B9E38688E; Mon, 14 Jan 2019 09:20:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1547454000; bh=9Jc8EA42Zui7hsFFfGu2dyaAIQI0NXyKvIVFE703iVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a1eN/9DXex0XBh9EQFXfba6/no+bSZhJAx1r7gmRq7sYcHIzANqtN1QkTOE4hSBu+ 49kZgneR3Cxa5HVfKAAAaRFd3npiDnvHpNcvBZqONbXHIg5nO1PJiCI8TjzmHKm+jU Be/TMSbl6YJCOLPhDq0f9ALxqg2kRGEpu30IZF08= Received: by firstfloor.org (Postfix, from userid 1000) id 9B88CA03EA; Mon, 14 Jan 2019 00:19:56 -0800 (PST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: amker.cheng@gmail.com, Andi Kleen Subject: [PATCH 2/3] Fix autoprofiledbootstrap Date: Mon, 14 Jan 2019 00:19:41 -0800 Message-Id: <20190114081942.9088-2-andi@firstfloor.org> In-Reply-To: <20190114081942.9088-1-andi@firstfloor.org> References: <20190114081942.9088-1-andi@firstfloor.org> MIME-Version: 1.0 From: Andi Kleen autoprofiledbootstrap fails currently with In file included from ../../gcc/gcc/hash-table.h:236, from ../../gcc/gcc/coretypes.h:440, from ../../gcc/gcc/ipa-devirt.c:110: In static member function 'static void va_heap::release(vec*&) [with T = tree_node*]', inlined from 'void vec::release() [with T = tree_node*]' at ../../gcc/gcc/vec.h:1679:20, inlined from 'auto_vec::~auto_vec() [with T = tree_node*; long unsigned int N = 8]' at ../../gcc/gcc/vec.h:1436:5, inlined from 'vec possible_polymorphic_call_targets(tree, long int, ipa_polymorphic_call_context, bool*, void**, bool)' at ../../gcc/gcc/ipa-devirt.c:3099:22: ../../gcc/gcc/vec.h:311:10: error: attempt to free a non-heap object 'bases_to_consider' [-Werror=free-nonheap-object] 311 | ::free (v); | ~~~~~~~^~~ ../../gcc/gcc/vec.h:311:10: error: attempt to free a non-heap object 'bases_to_consider' [-Werror=free-nonheap-object] cc1plus: all warnings being treated as errors The problem is that auto_vec uses a variable to keep track if the vector is on the heap or auto. Normally this gets constant resolved, but only when the right functions are inlined. With autofdo for some reason the compiler decides to not inline these vec functions, even though they are marked as "inline" Mark them as ALWAYS_INLINE instead. gcc/: 2019-01-14 Andi Kleen * vec.h (using_auto_storage, release): Mark as ALWAYS_INLINE. --- gcc/vec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/vec.h b/gcc/vec.h index 407269c5ad3..1f5b78b1fac 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1664,7 +1664,7 @@ vec::create (unsigned nelems MEM_STAT_DECL) /* Free the memory occupied by the embedded vector. */ template -inline void +ALWAYS_INLINE void vec::release (void) { if (!m_vec) @@ -1940,7 +1940,7 @@ vec::reverse (void) } template -inline bool +ALWAYS_INLINE bool vec::using_auto_storage () const { return m_vec->m_vecpfx.m_using_auto_storage; From patchwork Mon Jan 14 08:19:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1024321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493981-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=firstfloor.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="QuthNqHL"; dkim=pass (1024-bit key; unprotected) header.d=firstfloor.org header.i=@firstfloor.org header.b="xjAbzGst"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43dRHW5pdyz9s7T for ; Mon, 14 Jan 2019 19:20:39 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; q=dns; s=default; b=qwe VXgJE9X+TWx/ujtaq8pIEcsg8bHsCa40OwGf0thUt9Qg7HidJEUkRZBX/lTYKX8Z eP/fRfo5RzXMpvNkozHjr65UmMKvvbzkSn2rq8aLGSA5FeEw+NYIQhqrPPNa6tx7 Ro9jcjU9HqXiOjXnhkyocJfHC+Vn8b+bitOWTt1g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=default; bh=MEBHRauIo ppXwsbEh7Hg4kJ7i6c=; b=QuthNqHLd1v9L1Y8fPiGtwFo4a+KfMOfBQ9U2qj5u mGE+euPHMaxkt7rq5861BNR/6XVW4UXFsYREt8z+53UwtzbjDK6RSMsKy1Wu2JIL SWh7u0S0YI2YO0KNobo3foONDWYGIE59iKh6YxCVypKNOJKsvPvqGzmmZUim6UeB Ao= Received: (qmail 2473 invoked by alias); 14 Jan 2019 08:20:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2380 invoked by uid 89); 14 Jan 2019 08:20:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=2191, impact X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Jan 2019 08:20:05 +0000 Received: from firstfloor.org (c-71-238-43-142.hsd1.or.comcast.net [71.238.43.142]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id 9982586889; Mon, 14 Jan 2019 09:20:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1547454000; bh=kls6xEqzsQLRYbMd7f7WXziwdds7yp3xGO0bzCvTY3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xjAbzGstjfiQSDDtWLaEhFjsFmj1NUtpcDw1oPrp2TcNkNlJZvsYe++T92vI9RfKm wwZ9tSLn7+MA1sxCV2biPax+2c0I6BgtgnO5E1JBTOEwnvV1rQAsQIo7pSnvRiEjEe SMwr5nqnXJb3tg5WLbqui64ZZr3SW9sYqNTw+CkI= Received: by firstfloor.org (Postfix, from userid 1000) id A1A00A6E45; Mon, 14 Jan 2019 00:19:56 -0800 (PST) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: amker.cheng@gmail.com, Andi Kleen Subject: [PATCH 3/3] Increase iterations for autofdo tests Date: Mon, 14 Jan 2019 00:19:42 -0800 Message-Id: <20190114081942.9088-3-andi@firstfloor.org> In-Reply-To: <20190114081942.9088-2-andi@firstfloor.org> References: <20190114081942.9088-1-andi@firstfloor.org> <20190114081942.9088-2-andi@firstfloor.org> MIME-Version: 1.0 From: Andi Kleen Bin cheng pointed out that the autofdo tests are unstable because they don't have enough iterations for the perf sampling to get enough data. Increase the iterations, but only for autofdo. This avoids any impact on targets that use a slow emulator, which will never run the host only autofdo tests. gcc/testsuite/: 2019-01-14 Andi Kleen * g++.dg/tree-prof/morefunc.C (ITER): Add. (test1): Use. (test2): Use. * gcc.dg/tree-prof/cold_partition_label.c (ITER): Add. (main): Use. * gcc.dg/tree-prof/crossmodule-indircall-1.c (ITER): Add. (main): Use * gcc.dg/tree-prof/indir-call-prof.c (ITER): Add. (main): Use. * gcc.dg/tree-prof/peel-1.c (ITER): Add. (t): Use. (main): Use. * gcc.dg/tree-prof/pr52027.c (ITER): Add. (main): Use. * gcc.dg/tree-prof/tracer-1.c (ITER): Add. (main): Use. * gcc.dg/tree-prof/unroll-1.c (ITER): Add. (t): Use. (main): Use. * gcc.dg/tree-prof/update-cunroll-2.c (ITER): Add. (main): Use. * lib/profopt.exp: Pass -DITER to autofdo compilations. --- gcc/testsuite/g++.dg/tree-prof/morefunc.C | 8 ++++++-- gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c | 6 +++++- .../gcc.dg/tree-prof/crossmodule-indircall-1.c | 10 +++++++--- gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c | 6 +++++- gcc/testsuite/gcc.dg/tree-prof/peel-1.c | 10 +++++++--- gcc/testsuite/gcc.dg/tree-prof/pr52027.c | 6 +++++- gcc/testsuite/gcc.dg/tree-prof/tracer-1.c | 7 ++++++- gcc/testsuite/gcc.dg/tree-prof/unroll-1.c | 10 +++++++--- gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c | 8 ++++++-- gcc/testsuite/lib/profopt.exp | 4 ++-- 10 files changed, 56 insertions(+), 19 deletions(-) diff --git a/gcc/testsuite/g++.dg/tree-prof/morefunc.C b/gcc/testsuite/g++.dg/tree-prof/morefunc.C index a9bdc167f45..02b01c073e9 100644 --- a/gcc/testsuite/g++.dg/tree-prof/morefunc.C +++ b/gcc/testsuite/g++.dg/tree-prof/morefunc.C @@ -2,6 +2,10 @@ #include "reorder_class1.h" #include "reorder_class2.h" +#ifndef ITER +#define ITER 1000 +#endif + int g; #ifdef _PROFILE_USE @@ -19,7 +23,7 @@ static __attribute__((always_inline)) void test1 (A *tc) { int i; - for (i = 0; i < 1000; i++) + for (i = 0; i < ITER; i++) g += tc->foo(); if (g<100) g++; } @@ -28,7 +32,7 @@ static __attribute__((always_inline)) void test2 (B *tc) { int i; - for (i = 0; i < 1000000; i++) + for (i = 0; i < ITER; i++) g += tc->foo(); } diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c index 450308d6407..099069da6a7 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c +++ b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c @@ -9,6 +9,10 @@ const char *sarr[SIZE]; const char *buf_hot; const char *buf_cold; +#ifndef ITER +#define ITER 1000000 +#endif + __attribute__((noinline)) void foo (int path) @@ -32,7 +36,7 @@ main (int argc, char *argv[]) int i; buf_hot = "hello"; buf_cold = "world"; - for (i = 0; i < 1000000; i++) + for (i = 0; i < ITER; i++) foo (argc); return 0; } diff --git a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c index 58109d54dc7..32d22c69c6c 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c @@ -2,6 +2,10 @@ /* { dg-additional-sources "crossmodule-indircall-1a.c" } */ /* { dg-options "-O3 -flto -DDOJOB=1" } */ +#ifndef ITER +#define ITER 1000 +#endif + int a; extern void (*p[2])(int n); void abort (void); @@ -10,12 +14,12 @@ main() { int i; /* This call shall be converted. */ - for (i = 0;i<1000;i++) + for (i = 0;i