Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp803373lqo; Wed, 8 May 2024 16:01:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXW/rsyyFap8WAIktILFlkcI4od99aw3G7ct5OnCcOhx6hp5RX99mBneDzczWtBPjRCDRqqAsYoU+yd75ntskWV/39PSmFfX8HRWIyDkA== X-Google-Smtp-Source: AGHT+IGgmyB4FiPLEIKLtqmPOgOfb+OnVGhxPV0OkkHOwYzGCq/jmKyvsoCDkdXHmRPlDgRfnQ5x X-Received: by 2002:a17:902:b58e:b0:1e1:3300:702b with SMTP id d9443c01a7336-1eeb0396d02mr33136725ad.15.1715209298696; Wed, 08 May 2024 16:01:38 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf32b6esi1429345ad.205.2024.05.08.16.01.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 16:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173915-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@codewreck.org header.s=2 header.b=I21xA386; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-173915-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173915-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AB6FA2821D9 for ; Wed, 8 May 2024 23:01:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76D1512F382; Wed, 8 May 2024 23:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b="I21xA386" Received: from submarine.notk.org (62-210-214-84.rev.poneytelecom.eu [62.210.214.84]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 885C721373; Wed, 8 May 2024 23:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.210.214.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715209282; cv=none; b=ojzlbGl2vJBwHXUrnF5WRwF+zb0DFfqi0Q0SZVrLD3nC+Onv55B93DcqPQwWpnP25SUc7Hwn0eL+krdhjjCUQ0uWbsYJFa7+9sL6TxqLM+KGuPBwwZlL6TJ0+BQi5N7EE7M+unJxvXBmamoUm5PtNRf5PwX3kBy95xaqo5ZLMiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715209282; c=relaxed/simple; bh=VFopXksH54fTTJDgybtqA31zpOE9Hd41aNi92fkPhes=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e0KDzKUg6Xfvy4nEnRTPBIBUFpMiisjH6gXeIVgU+Lgq6pfZvryCecI7FIax40FtXG2AbWZuHY6mCb+DSuvFvUud8ufGF/tojpEVjSEJQN99xHAyDcfKtU8U7bPF/W3CmKUmXQDQ+0/XNIs2Qt+KI+bUrY5Ibiy6xQ95sdiFlAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org; spf=pass smtp.mailfrom=codewreck.org; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b=I21xA386; arc=none smtp.client-ip=62.210.214.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codewreck.org Received: from gaia.codewreck.org (localhost [127.0.0.1]) by submarine.notk.org (Postfix) with ESMTPS id CE59314C2DD; Thu, 9 May 2024 01:01:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1715209279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QLELdqYDEqKXiaXhVR2Yc3TRepFAVyLz/mWUqzkCaGw=; b=I21xA386Wv1D7lVR7KcG8plD2xFMY43KBpmCDLj/PUd5RImDrDuhYt3SGznd3B1BIhkL98 u47PA9YA9QhHp6PYu3de4nBVjcwyE4BkKIJoFwpipx7dHJphEbXU/H2oUsuSu7ryVc+zL+ kjhTAq31cz92zsHOdGOmciCDgcm7YJ+YcO8Ij3mYlXS9oSBkzi3svL/kvOWbgao0pFDSEO rvgSGz9VI8uHryGkcIZAa1+n6rHCL2/pCyglZQFtDna6IPoZix8UNAlmHp9uQora6BcSKt LZEN+VM/yLlUqo+jbzV4GehEGR+p6U6FC5wISe4UP55r7Z5UmKjI4fvkmqhrow== Received: from [127.0.0.1] (localhost.lan [::1]) by gaia.codewreck.org (OpenSMTPD) with ESMTP id c5ce0fef; Wed, 8 May 2024 23:01:02 +0000 (UTC) From: Dominique Martinet Date: Thu, 09 May 2024 08:00:47 +0900 Subject: [PATCH v3 3/3] perf parse: Allow names to start with digits Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240509-perf_digit-v3-3-9036bf7898da@codewreck.org> References: <20240509-perf_digit-v3-0-9036bf7898da@codewreck.org> In-Reply-To: <20240509-perf_digit-v3-0-9036bf7898da@codewreck.org> To: Arnaldo Carvalho de Melo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Dominique Martinet X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1859; i=asmadeus@codewreck.org; h=from:subject:message-id; bh=VFopXksH54fTTJDgybtqA31zpOE9Hd41aNi92fkPhes=; b=owEBbQKS/ZANAwAIAatOm+xqmOZwAcsmYgBmPAQuDgfJSgSBBuZI9gOB6kcLvMXJ0ESNELf26 Cpx7pHxLZiJAjMEAAEIAB0WIQT8g9txgG5a3TOhiE6rTpvsapjmcAUCZjwELgAKCRCrTpvsapjm cMcdD/9Vpf3/YYoo0nd/oE0JPOO+iOGLUUYWDD2SFW5uq4+zlzkuaJVc/qlaTx1G+L3UV3dZwkI gDvgbsEc6pTLhtHE1b3yEQgTJJoo9Y4UPU6oS4YniGCvuu/Z4Ju8SXUlZi8UWVqmDy2qmiqr//E 0X/A35xSSoUy3lvS0cR6XaGxAE4JuTou0DzVOJ4CDy8pjTpZ+Mqu0gXauTaR433X4cDzWBfJbw+ OE3IWeOxse9AvJINiyjqWp45iO8fgLsnngLOiIIOOaJtcuJbvFed23dJILF/L8/QLTI7MClZVOe dBDXLXToYA+2sDe52aLY4/CJCRTxqRfSeeKUI/jt2PFxo3omVn1sFoSK8p9LWp88CWua778kxEL KnDi8lVZVrkwHiU+fW1pl+nQr/7abn1RWrbS50Nb2dwsCfmGUd94ECvXukigm/Md6ixYXwLmYyk RQJLG9zIJnOoc4EpEJb1+iwDtn4Xr1dHH8BxCILUuLvoZFaPeC8UeOwHmI8PADoX/4x6qJeaZLO IOKbEvXBzw/xaVaUrL8/2SKDf0W5iHep3wVD0nBvMuAxED4/GQhFEPZhtww4TMae64y/f17x8Vh A4ophS7XcE35wVdV3Rzp2ijhSc4rWQ9krbLxFdU43Z5Jgxmw5vuzC0BSaPxSpSy/d+ieOtWJIFg /eYBteH3GfBZnYQ== X-Developer-Key: i=asmadeus@codewreck.org; a=openpgp; fpr=B894379F662089525B3FB1B9333F1F391BBBB00A Tracepoints can start with digits, although we don't have many of these: $ rg -g '*.h' '\bTRACE_EVENT\([0-9]' net/mac802154/trace.h 53:TRACE_EVENT(802154_drv_return_int, .. net/ieee802154/trace.h 66:TRACE_EVENT(802154_rdev_add_virtual_intf, .. include/trace/events/9p.h 124:TRACE_EVENT(9p_client_req, .. Just allow names to start with digits too so e.g. perf trace -e '9p:*' works Reviewed-by: Ian Rogers Tested-by: Ian Rogers Signed-off-by: Dominique Martinet --- tools/perf/tests/parse-events.c | 5 +++++ tools/perf/util/parse-events.l | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index c3b77570bb57..417d4782a520 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -2269,6 +2269,11 @@ static const struct evlist_test test__events[] = { .check = test__checkevent_breakpoint_2_events, /* 3 */ }, + { + .name = "9p:9p_client_req", + .check = test__checkevent_tracepoint, + /* 4 */ + }, }; static const struct evlist_test test__events_pmu[] = { diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 08ea2d845dc3..99d585d272e0 100644 --- a/tools/perf/util/parse-events.l +++ b/tools/perf/util/parse-events.l @@ -242,8 +242,8 @@ event [^,{}/]+ num_dec [0-9]+ num_hex 0x[a-fA-F0-9]{1,16} num_raw_hex [a-fA-F0-9]{1,16} -name [a-zA-Z_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]* -name_tag [\'][a-zA-Z_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\'] +name [a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?.\[\]!\-]* +name_tag [\'][a-zA-Z0-9_*?\[\]][a-zA-Z0-9_*?\-,\.\[\]:=]*[\'] name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]* drv_cfg_term [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)? /* -- 2.44.0