From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124851 invoked by alias); 21 May 2016 18:02:42 -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 124837 invoked by uid 89); 21 May 2016 18:02:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=family, HContent-Transfer-Encoding:8bit X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 21 May 2016 18:02:31 +0000 Received: by mail-wm0-f66.google.com with SMTP id n129so4641937wmn.1 for ; Sat, 21 May 2016 11:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:from:date:to:cc:message-id; bh=EJE+Db8SUktEAhtLG5JPs54xC3wo7C+uDALPmS8LV98=; b=UjUvhQHiDDJ0GiVo5Mlo0P/x9jGdqqfdfBpL0dtdfO3+veqISaVyPx78T8p2zGtPua iLOJIUK7UyWtM48lwNWTRNR18zLsl9VDWH1FICjoLyIsaAbiAasTVyrkD/REghIKgfOx o5QdvYg6pyV6ksOg5+zjiJHdMNnlcJHI6P6xFlJ38iSxpm5GWbbe6XACv31zN2qkOX7a dLZeZzvwY92bK8VgpAlBjBlD21rI1nEozjLwj5Cn7icbfrwCO3ZtTkJN7YRzvvma+aXj WHmqyUB2VeBIT5ry17vMWXR7vBhrxlBeH0wLWZehAinOxB7T0Xn5eV5AudVb9YzO/g6o SfOg== X-Gm-Message-State: AOPr4FUpyHtFBnTlaukvnnw/+CqXQ56qpAseDCydh41q7bIUugSscXl6v1KoGW+qgdsPgw== X-Received: by 10.194.81.106 with SMTP id z10mr8850599wjx.163.1463853748659; Sat, 21 May 2016 11:02:28 -0700 (PDT) Received: from [10.40.73.140] (089144201140.atnat0010.highway.a1.net. [89.144.201.140]) by smtp.gmail.com with ESMTPSA id t3sm4358345wmf.20.2016.05.21.11.02.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 May 2016 11:02:27 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <1463848586-19259-2-git-send-email-andi@firstfloor.org> References: <1463848586-19259-1-git-send-email-andi@firstfloor.org> <1463848586-19259-2-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 1/5] Add gcc-auto-profile script From: Bernhard Reutner-Fischer Date: Sat, 21 May 2016 18:02:00 -0000 To: Andi Kleen ,gcc-patches@gcc.gnu.org CC: Andi Kleen Message-ID: X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg01724.txt.bz2 On May 21, 2016 6:36:22 PM GMT+02:00, Andi Kleen wrote: >From: Andi Kleen >+if [ "$1" = "--kernel" ] ; then >+ FLAGS=k >+ shift >+fi >+if [ "$1" == "--all" ] ; then == is legacy, s/==/=/ >+ FLAGS=uk >+ shift >+fi >+ >+if ! grep -q Intel /proc/cpuinfo ] ; then >+ echo >&2 "Only Intel CPUs supported" >+ exit 1 >+fi >+ >+if grep -q hypervisor /proc/cpuinfo ; then >+ echo >&2 "Warning: branch profiling may not be functional in VMs" >+fi grep && echo would do but OK. >+ >+case `egrep -q "^cpu family\s*: 6" /proc/cpuinfo && >+ egrep "^model\s*:" /proc/cpuinfo | head -1` in''' head and tail both require -n nowadays (in fact since susv2, IIRC), so please head -n1 thanks,