Received: by 10.223.185.116 with SMTP id b49csp5462281wrg; Wed, 7 Mar 2018 12:10:21 -0800 (PST) X-Google-Smtp-Source: AG47ELtnKdXUsRmaNK0v+q1YrM9ZtSFoxTJDswc8U2oMa+LC5KprGKqGQA4wMSvjdZC1Q21FoLWS X-Received: by 10.99.119.203 with SMTP id s194mr14276280pgc.26.1520453421155; Wed, 07 Mar 2018 12:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453421; cv=none; d=google.com; s=arc-20160816; b=EeAjNuaHRLsRBw6Gy5u6b2X79+2K1HI7/84MI55+vjwNH9uca5eOQ7wFONanRihte9 BL/3bCBDLVkmWHcKTc+QXuwBs30upyBQr63zb/p/8z043EZXwFUQEGc4plQKFEB5XVQp D0bbZ0gWyos9OQTEFpYFJreiyzqC7zPQRdXXM1ptpSbBZlJWpqcI3/LoNHlvlLR2+7n7 FLxX6LXAorAvU+OOPCYTv/kSf0fU19EJE8dADcqBRRpcc+c/9oZIjXep8lTKfYeiuF5/ Jhc4zmk+0ShrFARNi9QIhvqiqB9fb10p0+0b2JtbGX06y9UxtoBoJQqGlokf7k1Iz6or cywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=9O4x77zj34NEE5nX7rGFqUb5kyTAzH3V4rHrewl3Ny4=; b=txG4uxZP7V/e04rRKqalNrhc7GfHjU1vkYBosFKLG/c7z3C9gBhEEgG0iQaafB5Uqn S6gHrLN6so7KVG3jucWjSOT8vsEwjtjkmlqGoqtpjAnx6K1earJ1sEAzVbzDvTmaDH9m J/u0dInT9Omg3CV19kS+WfxubK0wnO+5zvDf4cEBkQ1K+y3tP3wsbMxxkrUMFASMtdKc B7gE/XhF/NH+5fU4ypp9cfaj0WojokwCvTwEaVS9sBf9/m7s4U3yFI4xeUCFLY6I/x+P rGc74GniKHNjaACaFxvnwpZaLIwYwohiwHsRYNuJBb6/U/qgCYSBeDqiMkMflL3aUW5s C6Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=bzBdmmSQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=IshXU/NC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6-v6si13485502pll.258.2018.03.07.12.10.06; Wed, 07 Mar 2018 12:10:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=bzBdmmSQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=IshXU/NC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965141AbeCGUJN (ORCPT + 99 others); Wed, 7 Mar 2018 15:09:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53390 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934658AbeCGUJK (ORCPT ); Wed, 7 Mar 2018 15:09:10 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B65776055B; Wed, 7 Mar 2018 20:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520453349; bh=rmsP/rARbgMVxXPKNnsKEVRaOBtz2eae3JYvnLSoOnI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bzBdmmSQE+r4GLVnioBtdzBOJ9p77TrUAIymprknb8opg4dJcBY/R6/1qwLEdD8+/ 4EPVqVsFERYGsYWRYe13D0chNNHdpk6xrq2HGgUFeYkcT+BnPVziXX1TtAzkYSU9rB R24CvTNAG64GBwvgRDZGJPltesDwcNqbKNoKsTKA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C8C0E6016D; Wed, 7 Mar 2018 20:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520453348; bh=rmsP/rARbgMVxXPKNnsKEVRaOBtz2eae3JYvnLSoOnI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IshXU/NCnWPnyqtJoJau9ZizHzBuD1BjsRU8c/haIDIJ2z6Wm4FhQz1U8okETk4SI D+5IquEExOcXJUuwg8MBidbNio5D0RAxQmKBZijXVXbGN5lj7sc48ctOQd/S7v5ivT BADk/8wtPr1BefU9zGwHz4ya9xwCiHSvFzWfZ+1c= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 07 Mar 2018 15:09:08 -0500 From: Agustin Vega-Frias To: Arnaldo Carvalho de Melo Cc: Andi Kleen , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , timur@codeaurora.org Subject: Re: [RFC V3 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events In-Reply-To: <20180307195833.GX3701@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> <20180307193930.GW3701@kernel.org> <20180307195833.GX3701@kernel.org> Message-ID: <0ba091eaa6676498b4554978606d8016@codeaurora.org> X-Sender: agustinv@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-07 14:58, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 07, 2018 at 02:49:50PM -0500, Agustin Vega-Frias escreveu: >> On 2018-03-07 14:39, Arnaldo Carvalho de Melo wrote: >> > 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 >> >> Hey Jiri, >> >> The downside is that, while the compilation now works on those >> systems, the pattern will not work as intended in them :o( >> Let me cook something and send it ASAP. > > Well, do you think this is really a big problem? Even if we add nice > docs? > > I haven't tested something that works with this syntax on a capable > system and then on one that doesn't, to see how it would behave, > probably it would say something about a syntax error? > Most likely, yes, it would be flagged as a syntax error in the event name. I'd prefer we fix this. I have the new patch ready, do you want me to just send you that patch instead of the series? Thanks, Agustín -- Qualcomm Datacenter Technologies, Inc. on behalf of the Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.