From patchwork Wed Mar 7 19:39:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 10264821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BE956055B for ; Wed, 7 Mar 2018 19:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4671A20246 for ; Wed, 7 Mar 2018 19:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B3462941F; Wed, 7 Mar 2018 19:40:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C207A20246 for ; Wed, 7 Mar 2018 19:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iTPzHIjy1vOp8R8lfD1rAPUFg97vP2AG11+fDoLKQ+g=; b=WL8E6yvLa3b4ZF I4PVdwKhtC0NKYt350u6yzuZ83FJuBJMgjygFJ/UNELy7ywB4n3ZmBRVXD4jW4gZMzzXQf0Rvd7MB FRUZrlsVYUCg7rLRW/6K1oQzGcY5zfILbhMOXCPZprvw49KaCXvPj/SlDLH5mZ7HLM12K7KVvEtsK AQU4LnEww+toKJk3BaGjBojSiSauDL8/RBlwvhF8KkK+QxienLmP8/aEBOco0YJGFx/ocRCVRoaNO SjomPslOay89QRvxW8KlNxuDPyS9k+gQ7YT1G7EUFSdZ1rIfY8VHNlwEJalbg9OZ6L8rlxc/MAViW J1BNS+D+Gt3Jzpx81BNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1etev9-0001XH-MP; Wed, 07 Mar 2018 19:40:15 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eteuV-0000xJ-IW for linux-arm-kernel@bombadil.infradead.org; Wed, 07 Mar 2018 19:39:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p3NkJvh1gF43tkqJ6Fi4/RSsmrPLF6vBzk9K4vvSnoY=; b=iDm1I4LXfICwA2sn0jY+VPZzT KuzQ93s4FnB3T5AWmWkHn3pcd9TJ8aiPC8Vq8dQSlZGU/LoLuCggIsEWlqP/z6HMcAO1ncnO2B8uf ErPHrp2ylg4EaoNtatdLOyNq+ONCS/GRNwnL49nxuIu679pPclyQIFppMMpreoHwWce73nqw+vPgB TjbfOqsnM2xG3xqvvDLAsK4UaaFyBoIqmh9DRfLpEvGdaU4UxsYETEF0B7tjSqvHoqui0RTraxEPH p62ckQH3tRlJlujUpLBkoABe5bxHI3ADnnMv+sdLzDzIofcStojBxsb1fM4evJqS2qzceV8jNtHXK bqEtqMzJw==; Received: from [177.79.83.202] (helo=jouet.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eteuT-0001fh-8m; Wed, 07 Mar 2018 19:39:33 +0000 Received: by jouet.infradead.org (Postfix, from userid 1000) id 8983C1450F6; Wed, 7 Mar 2018 16:39:30 -0300 (-03) Date: Wed, 7 Mar 2018 16:39:30 -0300 From: Arnaldo Carvalho de Melo To: Agustin Vega-Frias , Andi Kleen Subject: Re: [RFC V3 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events Message-ID: <20180307193930.GW3701@kernel.org> References: <1520345084-42646-1-git-send-email-agustinv@codeaurora.org> <1520345084-42646-2-git-send-email-agustinv@codeaurora.org> <20180307160224.GN3701@kernel.org> <20180307185415.GK25017@tassilo.jf.intel.com> <20180307190509.GQ3701@kernel.org> <20180307190543.GR3701@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180307190543.GR3701@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , timur@codeaurora.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Alexander Shishkin , Ingo Molnar , Namhyung Kim , Jiri Olsa , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Em Wed, Mar 07, 2018 at 04:05:43PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Mar 07, 2018 at 04:05:09PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Wed, Mar 07, 2018 at 10:54:15AM -0800, Andi Kleen escreveu: > > > > Sorry about that. That's probably because FNM_EXTMATCH is a GNU extension, > > > > not POSIX, and the Alpine and Android runtimes likely don't implement > > > > that... > > > > I'll send a fix reverting back to the strncmp to ignore the uncore_ prefix, > > > > and dropping that extension. > > > > > > Just don't set it? Even the basic glob patterns are useful. > > > > Or use: > > > > #ifndef FNM_EXTMATCH > > #define FNM_EXTMATCH 0 > > #endif > > > > So on systems without it, its not used, while on GNU systems, we have > > that functionality (pretty fancy, someone may need that... ;-)) > > I'll try this route, btw, no need to send more patches for now. So, with the patch at the end of this message, it works now in those systems: [root@jouet ~]# dm 1 alpine:3.4 : Ok gcc (Alpine 5.3.0) 5.3.0 2 alpine:3.5 : Ok gcc (Alpine 6.2.1) 6.2.1 20160822 3 alpine:3.6 : Ok gcc (Alpine 6.3.0) 6.3.0 4 alpine:edge : Ok gcc (Alpine 6.4.0) 6.4.0 5 amazonlinux:1 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11) 6 amazonlinux:2 : Ok gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) 7 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 8 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 9 centos:5 : Ok gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55) 10 centos:6 : Ok gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) I stopped the test at this point to process some more patches, will restart the tests with those extra patches and if all goes well with the other 46 build environments, push upstream, thanks. - Arnaldo diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y index 316ac073aa78..18473be7d787 100644 --- a/tools/perf/util/parse-events.y +++ b/tools/perf/util/parse-events.y @@ -9,6 +9,13 @@ #define YYDEBUG 1 #include +/* + * GNU extension, so better define it to 0 for systems such + * as Android and Alpine Linux. + */ +#ifndef FNM_EXTMATCH +#define FNM_EXTMATCH 0 +#endif #include #include #include