Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp2032662rdb; Tue, 5 Sep 2023 12:10:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkP2zM+w2Gwm5k228banBn2icNWjrmrIBThOu+GbbgvhM1o3KnQXXDB/JzE9Gcy/I95epo X-Received: by 2002:a05:6402:5172:b0:523:2e30:aaee with SMTP id d18-20020a056402517200b005232e30aaeemr478386ede.32.1693941022368; Tue, 05 Sep 2023 12:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693941022; cv=none; d=google.com; s=arc-20160816; b=zfrGEX4Qn7Dqs5l2uJKqJ03iVv2cMI5K+4nBEQTNvTi8bQq3cPu+4rNmVSr6OVNzzP cvNW0DnEZSEqN7VUFxdoBpEFy0s1KjvBEebLxYGiyRpgO2EecSX9sseQMvA3APh5tuSZ 5mJMDOETfcI/n2BkF2xBqN0c/WLQie2AbCiYKmYyf/fLbNryhiHuYU8eh/5TiblxuIq0 +SJWC7pWrNnrDEEIdWNnvbEo+e4LiYrIQIZ98Qd+a+BCCkD/tfTd/JAJQOk/hDeX9W4R rfKLyogXvThbOOmjRfU1esu/315gFYWgC6p7siO/jeEOvs2CvEsacSVgUcN43y7QH4qG hTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=BPoQ47u9AiO+5Up1kQyavpCFQDEWvQPGmLkKDKk7HLY=; fh=LcvV+inLWYLGSFOjKsElL+kWknU1Xq4fSBinvCO4xPg=; b=JMSVtzvBl0Ba+/CQbWPpfCVS8EwzBBNMXm4scCtBGmpw20+KeYKj7koo8TGcpk1x3o lE7dN+l/eOZ94kiLPbdSUrGnx6ReKzul0E7ONY45M8edWwMyTDYiLcgMJ/0XzzYOi5Ca pxtRjLPOVVO3Mv92ksixdaN9HpHM38i22ff45+LVPmmMgBW0CiNL2DSd2gNnGSoMlyLh WphQNC6QBpxoZWehJ3EiAnarY8rv2oCYNkD84SdN+V9aGyx1zFQOyHU/QlhFmRSBBQzb s1a8tlxpIep3tr0FdxX0gMaoHcgBKqMwGuOjkXaRXaDMuU2gEShA9EQSLqF3TwpOAY9N kM1g== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020aa7d1c8000000b005255d1088ffsi7944024edp.671.2023.09.05.12.09.56; Tue, 05 Sep 2023 12:10:22 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240542AbjIES0M convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Sep 2023 14:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232744AbjIES0M (ORCPT ); Tue, 5 Sep 2023 14:26:12 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 261BFCF9; Tue, 5 Sep 2023 11:25:41 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-794e0e8b588so127460739f.1; Tue, 05 Sep 2023 11:25:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693938220; x=1694543020; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DHEnGqxw8d4wb+1Vk/P+WvuthLFK4N5sRk7D0hL/o58=; b=S9g4I4xgRzogTOQFlMVzwfa/PAIIDLIw649TMGTBrmsmDffZi9JX6HtgYyg+J4inDj EfeQ7LD9OLlnUYseLUSZHWHkRWoekS5ZTnU61YtIzAI9PkQ65XQhNmaSaDX6xKFuV9iB enOruLYn3rIBm7XMdnVdUprSclmIqeOUrhk6GKF1lJV7+qLYbiSyYI8RXqKnBe4PVQbN USaWKRt41XRCCXYAu6Aic7mE2Z1Jdg1aPs6buhXSy3TQmztwWqfohH1hDonTFDUKhcOY s/buOeOKmjN4wjVEKRTGhAaSrUMbQ4XfLB7f/hakM43Pd0ZbOMlnC8AjBPu6+vHQTGwi 26+Q== X-Gm-Message-State: AOJu0Yx8bfbNA12lyncVjH3kICTPNSwFiSXM1paoh1NjzoVr/RYdIsR/ xtxqX/yNEIsVCvR9NHKVnAxggvcNA7WZBDh+RaU= X-Received: by 2002:a5e:8f06:0:b0:787:1472:3181 with SMTP id c6-20020a5e8f06000000b0078714723181mr15644419iok.3.1693938219833; Tue, 05 Sep 2023 11:23:39 -0700 (PDT) MIME-Version: 1.0 References: <20230905181554.3202873-1-irogers@google.com> <20230905181554.3202873-3-irogers@google.com> In-Reply-To: <20230905181554.3202873-3-irogers@google.com> From: Namhyung Kim Date: Tue, 5 Sep 2023 11:23:28 -0700 Message-ID: Subject: Re: [PATCH v1 3/3] perf completion: Support completion of metrics/metricgroups To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Stephane Eranian Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Tue, Sep 5, 2023 at 11:16 AM Ian Rogers wrote: > > Allow metrics to expand for -M or --metrics options. > > Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/perf-completion.sh | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh > index 319ad724b97a..f224d79b89e6 100644 > --- a/tools/perf/perf-completion.sh > +++ b/tools/perf/perf-completion.sh > @@ -202,6 +202,10 @@ __perf_main () > $prev_skip_opts == @(record|stat|top) ]]; then > local evts=$($cmd list --raw-dump pfm) > __perfcomp "$evts" "$cur" > + elif [[ $prev == @("-M"|"--metrics") && > + $prev_skip_opts == @(stat) ]]; then > + local metrics=$($cmd list --raw-dump metric metricgroup) > + __perfcomp "$metrics" "$cur" > else > # List subcommands for perf commands > if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched| > -- > 2.42.0.283.g2d96d420d3-goog >