From patchwork Thu Aug 22 14:44:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 19420 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E18A248E6 for ; Thu, 22 Aug 2013 14:44:34 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf1688662ves.10 for ; Thu, 22 Aug 2013 07:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:delivered-to:sender:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=3eIguHnXPA8IA0yGGoLtOziD+GXCvFX2zPAjR02s5Tw=; b=gQmt5ZVnEIjRCqvyXmySCjcCJFQLzI5FUxDqwDxZJPw4nnmNVt0XDDDHMXWEUZF90t ddyrL2gFfQn88IGiZQfCd9SLfr32/jHckJFrMC6r2k13Sj+mjuVWar1RuLfswx6k3hOO fY7uWPLKSfu8vr5oj/DiaMLccOrMNea56fHE4o+Nhy4fxLuYRrgja0V1BbKNxwa5MGkv jnbhe9zFAadki4QxbTRc0mLc5p7LogvcWDwfW8HOSzZ8pkcn3N5TwW8G7m8XWmmFsMR9 2vLKMvOJk+e2BObRCTcoWkpDiNeRneMIjIjFnyqCNtqTCaUBrbXI7+EKCeyhh9CkHCRD wU2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:sender:from:to:cc :subject:date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=3eIguHnXPA8IA0yGGoLtOziD+GXCvFX2zPAjR02s5Tw=; b=HuyrEd45md+31OchSaJPo3UqGCQj0PN99xA/jAwx5n1MdF2hONSyzKoEl2GA4OIGyG fz/EB6orIgVkLLp4hm2JtWglHMWnAvXDuZroXVqWxR8dDZpK9Mc60MHBPc46n+7q5Ijs b/T8ctf4FV4H4bNQ5ckC70VPKHTi7xkvuJ1KumxPzQPopq8Gv3CkxU0SeYQ9KYMth3AP CDREcJQwdd9gjfCWvxyHT3348uCAf49x2BJYXMVKMJk/nWrSAKPH5CfS76Qckw5NJqSX 58f68e5knp4eqCnahVwD8YBt2Eyg3sTftA8R6wJQ+6ppxhbFarasbWHGHBXoqp2ds+9O 0wkg== X-Received: by 10.236.193.6 with SMTP id j6mr4553826yhn.44.1377182674283; Thu, 22 Aug 2013 07:44:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.102 with SMTP id 6ls1126521qed.34.gmail; Thu, 22 Aug 2013 07:44:34 -0700 (PDT) X-Received: by 10.221.56.194 with SMTP id wd2mr12138991vcb.7.1377182674182; Thu, 22 Aug 2013 07:44:34 -0700 (PDT) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [2607:f8b0:400c:c01::229]) by mx.google.com with ESMTPS id s17si4066191vcu.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 07:44:34 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::229; Received: by mail-ve0-f169.google.com with SMTP id db10so1641678veb.0 for ; Thu, 22 Aug 2013 07:44:34 -0700 (PDT) X-Gm-Message-State: ALoCoQlQnGnHK3mWD72VGBHzoG/gxPna7ek9Qbwd+2q6iKt83uOIodqV5FcqZGIEGnyS+XrdEhCE X-Received: by 10.52.103.101 with SMTP id fv5mr1570329vdb.31.1377182673905; Thu, 22 Aug 2013 07:44:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp34799vcz; Thu, 22 Aug 2013 07:44:33 -0700 (PDT) X-Received: by 10.205.15.72 with SMTP id pt8mr10572375bkb.17.1377182671253; Thu, 22 Aug 2013 07:44:31 -0700 (PDT) Received: from mail-bk0-x22e.google.com (mail-bk0-x22e.google.com [2a00:1450:4008:c01::22e]) by mx.google.com with ESMTPS id ki1si2341461bkb.99.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 07:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of rric.net@gmail.com designates 2a00:1450:4008:c01::22e as permitted sender) client-ip=2a00:1450:4008:c01::22e; Received: by mail-bk0-f46.google.com with SMTP id 6so712560bkj.19 for ; Thu, 22 Aug 2013 07:44:30 -0700 (PDT) X-Received: by 10.204.234.5 with SMTP id ka5mr5084064bkb.5.1377182670344; Thu, 22 Aug 2013 07:44:30 -0700 (PDT) Received: from rric.localhost (g224195237.adsl.alicedsl.de. [92.224.195.237]) by mx.google.com with ESMTPSA id h5sm3117070bkg.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 07:44:29 -0700 (PDT) Sender: Robert Richter From: Robert Richter To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Borislav Petkov , Jiri Olsa , linux-kernel@vger.kernel.org, Robert Richter , Robert Richter Subject: [PATCH resent 1/4] perf tools: Rename flex conditions to avoid name conflicts Date: Thu, 22 Aug 2013 16:44:02 +0200 Message-Id: <1377182645-12922-2-git-send-email-rric@kernel.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1377182645-12922-1-git-send-email-rric@kernel.org> References: <1377182645-12922-1-git-send-email-rric@kernel.org> X-Original-Sender: rric.net@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Robert Richter These define's may cause conflicts with other definitions: #define INITIAL 0 #define mem 1 #define config 2 #define event 3 Prefix them with cond_* to avoid this. Signed-off-by: Robert Richter Signed-off-by: Robert Richter --- tools/perf/util/parse-events.l | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 0790452..435b4e5 100644 --- a/tools/perf/util/parse-events.l +++ b/tools/perf/util/parse-events.l @@ -69,9 +69,9 @@ static int term(yyscan_t scanner, int type) %} -%x mem -%s config -%x event +%x cond_mem +%s cond_config +%x cond_event group [^,{}/]*[{][^}]*[}][^,{}/]* event_pmu [^,{}/]+[/][^/]*[/][^,{}/]* @@ -95,9 +95,9 @@ modifier_bp [rwx]{1,3} start_token = parse_events_get_extra(yyscanner); if (start_token == PE_START_TERMS) - BEGIN(config); + BEGIN(cond_config); else if (start_token == PE_START_EVENTS) - BEGIN(event); + BEGIN(cond_event); if (start_token) { parse_events_set_extra(NULL, yyscanner); @@ -106,7 +106,7 @@ modifier_bp [rwx]{1,3} } %} -{ +{ {group} { BEGIN(INITIAL); yyless(0); @@ -161,7 +161,7 @@ speculative-read|speculative-load | refs|Reference|ops|access | misses|miss { return str(yyscanner, PE_NAME_CACHE_OP_RESULT); } -{ +{ config { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG); } config1 { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG1); } config2 { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_CONFIG2); } @@ -173,23 +173,23 @@ branch_type { return term(yyscanner, PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE {name_minus} { return str(yyscanner, PE_NAME); } } -mem: { BEGIN(mem); return PE_PREFIX_MEM; } +mem: { BEGIN(cond_mem); return PE_PREFIX_MEM; } r{num_raw_hex} { return raw(yyscanner); } {num_dec} { return value(yyscanner, 10); } {num_hex} { return value(yyscanner, 16); } {modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } {name} { return str(yyscanner, PE_NAME); } -"/" { BEGIN(config); return '/'; } +"/" { BEGIN(cond_config); return '/'; } - { return '-'; } -, { BEGIN(event); return ','; } +, { BEGIN(cond_event); return ','; } : { return ':'; } -"{" { BEGIN(event); return '{'; } +"{" { BEGIN(cond_event); return '{'; } "}" { return '}'; } = { return '='; } \n { } -{ +{ {modifier_bp} { return str(yyscanner, PE_MODIFIER_BP); } : { return ':'; } {num_dec} { return value(yyscanner, 10); }