From patchwork Fri Apr 28 12:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 8755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp916604vqo; Fri, 28 Apr 2023 06:08:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Lh8EdJ4aL+31hP4eF1yqkxQLOLmGvKqBFUd/047tqmkcOCsGc+Kq31+sAnlb9Entc7vtV X-Received: by 2002:a17:90b:ec7:b0:24b:8b39:cd7f with SMTP id gz7-20020a17090b0ec700b0024b8b39cd7fmr5338361pjb.41.1682687300319; Fri, 28 Apr 2023 06:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682687300; cv=none; d=google.com; s=arc-20160816; b=D5ELv3oJWmZFRIDhCA0CKwVQJjM+zNH/l+4Av6l16NbxREgP8LrDGxH+ODh/d73rwS Qo+DhWUI2qdvykeQNx4V16madb4jMw6tgOJ5+NIRgfN/TZfEm4aqvTaaKf0F+Od+LwLY euerwxwPNdALw9wQ6HBAXYTSiWlAKCqpGyYyXrmbsEc6qxyvwkS9LMO4RzoybQtzRSVg /pb1Bcgf5wPjZe1NVLRo5adZn3SGzv6tH/7o3maWDLpeFSvCFH4OwsPgwL6ekU04tG/f TZxKlsYPwMllgzkZMtTUyMNFywT5KhTlam9onM6ZQNUsFsqC2gufb57QTTpfluzRUnXN PzZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=NTdF01BRwF7Qyyqyk5IAHau8d17+EfUL3YApV2LZ/qo=; b=Qjz8bLt+9B9r24+AICht09458yialLscuLrNzZzg0cy6583MVH1+qy8G13xq0OgGvE nfhjYBmtMknwYLNY5/cOFX2swu0QAUH37WrsI0ihoBOSxBxnjPDI0Ftzr3W9NwrYNIcg PjYt9DU9ruL4ZBVXkfz6Z6Md9K7d0fbGw6kS5cbA1W9XhRxVJh1eaSX/m+Vf4oThx//n /kiV+1fIFUPI8FINYH4bfCOgfgw/jIbOS8YkY69aqw/qJbsrH2MPl87Rqcl4q1olBYjZ 9gy9hTnQ3PEOFTWI4wj4c6BjkAkBVp12O4TLKeyUfqp6yilrKGaBZY9oC6ZswyCV65pH ve0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d6AG87Zr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs9-20020a632809000000b00523eac95881si20223670pgb.24.2023.04.28.06.08.04; Fri, 28 Apr 2023 06:08:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d6AG87Zr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjD1MyB (ORCPT + 99 others); Fri, 28 Apr 2023 08:54:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjD1Mx6 (ORCPT ); Fri, 28 Apr 2023 08:53:58 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD2BB2701; Fri, 28 Apr 2023 05:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682686437; x=1714222437; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SwlO+zJZX2Fwd239/8Bsb6WY1dKLW4hVckNBRRJnpxw=; b=d6AG87Zrhd2760Hq9liET/o5X9dKVhlctXB3wYSgiJAX/qXVAurIdi6C n8Z79Cp68heqEh46g1SQrgILtFU9L65ebE2gpg2n8KbP4ZOYK1jcdSTff xZ9qLF1AJK6UhGTzSmvAG2jr6udI2jtuwvSvhAFtNZ8Bqn3F9Ug6yf+oT NG3hB4n5YiJljVsGtQ5kjL5W4BDcDvMWt9s0byVDeSdEBzc4TEZ/MiuCS OblI9lF9F4PHFgamy/utlDu/Wf2417ZdADKA4TFE51068iIW7+FV3IJ3q tVNCYpxXv3j1+4q/bpMRka0Mz7vUAqVcsKbho19yIt2kiAhN5Ekov5Klf g==; X-IronPort-AV: E=McAfee;i="6600,9927,10694"; a="413127709" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="413127709" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2023 05:53:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10694"; a="759646721" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="759646721" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.249.36.125]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2023 05:53:55 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V2 0/1] perf tools: Allow config terms with breakpoints Date: Fri, 28 Apr 2023 15:53:44 +0300 Message-Id: <20230428125345.8924-1-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764425383454853958?= X-GMAIL-MSGID: =?utf-8?q?1764425518805790555?= Hi Here is a patch (V2) to the event parser for breakpoint events. I am not that familiar with flex / bison, but it seemed to need trailing context to stop the mem event colon and slash delimiters from getting mixed up with delimiters for config terms or event modifiers. Please look closely at that. Change in V2: Add comments to tools/perf/util/parse-events.l Add a test for 2 mem events back to back with config terms Adrian Hunter (1): perf tools: Allow config terms with breakpoints tools/perf/tests/parse-events.c | 157 ++++++++++++++++++++++++++++++++++++++++ tools/perf/util/parse-events.c | 23 +++++- tools/perf/util/parse-events.h | 6 +- tools/perf/util/parse-events.l | 23 +++++- tools/perf/util/parse-events.y | 42 ++++++----- 5 files changed, 224 insertions(+), 27 deletions(-) Regards Adrian Reviewed-by: Ian Rogers