From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932210AbdHVIUN (ORCPT ); Tue, 22 Aug 2017 04:20:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49386 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932077AbdHVIUK (ORCPT ); Tue, 22 Aug 2017 04:20:10 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B8B37C05678D Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Tue, 22 Aug 2017 10:20:07 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v2 04/19] perf, tools: Tighten detection of BPF events Message-ID: <20170822082007.GA23985@krava> References: <20170811232634.30465-1-andi@firstfloor.org> <20170811232634.30465-4-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170811232634.30465-4-andi@firstfloor.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 22 Aug 2017 08:20:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2017 at 04:26:19PM -0700, Andi Kleen wrote: > From: Andi Kleen > > perf stat -e cpu/uops_executed.core,cmask=1/ > > would be detected as a BPF source event because the .c matches the .c > source BPF pattern. > > v2: > > Originally I tried to use lex lookahead, but it doesn't seem to work. > > This now extends the BPF pattern to match longer events, but then > does an extra check in the C code to reject BPF matches that > do not end with .c/.o/.obj > > This uses REJECT, which makes the flex scanner slower, but > that shouldn't be a big problem for the perf events. > > Signed-off-by: Andi Kleen seems ok, Arnaldo, could you run it with BPF/clang test machinery? ;-) thanks, jirka