Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14326668rwd; Sat, 24 Jun 2023 17:26:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/zuHC2w3olY2fKCluYgqFHcr1vGLJImLHZNamZ9sShaplpq8BvVlodbMoVm0LlCWppzll X-Received: by 2002:a05:6871:411:b0:1a6:a6fc:f6f8 with SMTP id d17-20020a056871041100b001a6a6fcf6f8mr31210879oag.50.1687652805162; Sat, 24 Jun 2023 17:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687652805; cv=none; d=google.com; s=arc-20160816; b=R08dAbwoutehd2laN1gi5NNL2BmxYiaomvs0wtugMw+29UGTQu3G4hkgwRuPlXmW4Z pSOIzU9YqctDXetN3PLtm9lFneokN7nqWzGMizXPcoW0zhZbd/JCFOkIe9DDy2kd26Ws FVPxEXIWRD45CvCN/PHJaZVdehqTPHJV9sSjMiErOvrqyVI9aYofjG46zmXFn6Q4BiJk h2HI+xf3meWghtpqO+oLSt3BexXZZk04XjnANUo114qYXRa4ERK8P+XIF5EN8x6nZsYl UcCkgj0fWKz+7e3asUs2AqpYLg9av9jzZKLQb9ky1/l11IposSzOCIN7sSO48uSh9Uzf FrPA== 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=Twdia5CJnajxlqf2ciGHk+2BSOYK0E8MusepT9mvvfU=; fh=a+dqKjw+q+vKv2v1QJjFqPQhNz5c8HyW7UfwxvAf8es=; b=JIwjfBsqXUyBJ7OCTR4Iwtr+4xMJODZLuD+H3Vi2WkZaOYDg6pZj2YOZ6skfhfH8EN sBrQ7E5ZdAHAx0JO4y6gGFgpWzkR5TMagAws+V5xKZIyAsxjN8gpWyrpDGwlTUbX2fhA B+aX6geVYFziUO6BIhRRVyaUfRFTckrLe8MSYeFlI29IwDYlGnCtX6gLUior5b5pkZRi 47PMFbzlAiN3/wAqQ7gWJPI137pcp+xqkjdAm/Q2uDCMg9KD3LjbMOg1x+XGQJq7F26Y qdjVXNKV0nCmqpQYLjthd7GiySYaQkihHUhFpySUoLY58/IqcQGaei992HxsVIbczj+Z DB/g== 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 h70-20020a638349000000b0054fdcd2edbfsi2345892pge.831.2023.06.24.17.26.33; Sat, 24 Jun 2023 17:26:45 -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 S230203AbjFXXja convert rfc822-to-8bit (ORCPT + 99 others); Sat, 24 Jun 2023 19:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbjFXXj3 (ORCPT ); Sat, 24 Jun 2023 19:39:29 -0400 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6BF10F4; Sat, 24 Jun 2023 16:39:28 -0700 (PDT) Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-780cf728871so77387639f.0; Sat, 24 Jun 2023 16:39:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687649967; x=1690241967; 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=Ap+Rpv8IlS2rc5S0MfXr5NC3itWY6poknvEA/Nr4pHU=; b=YvdcBR5NHSFz8KurlAD121cDATS6CI2r2r/1B04idipftgB7il0gcrZL4bo0ZlFtOr NVMYWrEjhGdZn7dua1ScJzfGuPM/YB1KWu5vrLfA5QwF3C7tG10p7IJKQ/Lv8+yVkPFB 4azb6sCulAP6a0VlOHTsPlVW1S/EKEGFoQa5L4+7glJB8yo28/hklNqRAqX3CHNlP8F7 XmaZ070Cr85KrtzKWOPuQWch59K6Mz9eVInn6NnbNOZKNQCn5/WsTTClP48L8/7GLSaE EIRpZ9Pcq2C3jUxWbIXAsgPW2YGVQLB19Tz4oX3EpfnLNSHdDcV/Ouo0J2rckJ4Bwdss F4Sw== X-Gm-Message-State: AC+VfDziXdVl7YNdmr9zW2tba9SCIfdsDaWYS7ruFsJR6TNc7+Gvg8cU 54VMrfuMcWhEEWIzGYkPvmdq6gpeUm/Uiev9VHc= X-Received: by 2002:a5e:a901:0:b0:783:4869:e1 with SMTP id c1-20020a5ea901000000b00783486900e1mr1929354iod.19.1687649967583; Sat, 24 Jun 2023 16:39:27 -0700 (PDT) MIME-Version: 1.0 References: <20230623230139.985594-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Sat, 24 Jun 2023 16:39:15 -0700 Message-ID: Subject: Re: [PATCH 1/2] perf test: Reorder event name checks in stat STD output linter To: Ian Rogers Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Kan Liang 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_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Fri, Jun 23, 2023 at 4:22 PM Ian Rogers wrote: > > On Fri, Jun 23, 2023 at 4:01 PM Namhyung Kim wrote: > > > > On AMD machines, the perf stat STD output test failed like below: > > > > $ sudo ./perf test -v 98 > > 98: perf stat STD output linter : > > --- start --- > > test child forked, pid 1841901 > > Checking STD output: no argswrong event metric. > > expected 'GHz' in 108,121 stalled-cycles-frontend # 10.88% frontend cycles idle > > test child finished with -1 > > ---- end ---- > > perf stat STD output linter: FAILED! > > > > This is because there are stalled-cycles-{frontend,backend} events are > > used by default. The current logic checks the event_name array to find > > which event it's running. But 'cycles' event comes before those stalled > > cycles event and it matches first. So it tries to find 'GHz' metric > > in the output (which is for the 'cycles') and fails. > > > > Move the stalled-cycles-{frontend,backend} events before 'cycles' so > > that it can find the stalled cycles events first. > > > > Also add a space after 'no args' test name for consistency. > > > > Fixes: 99a04a48f225 ("perf test: Add test case for the standard 'perf stat' output") > > Cc: Kan Liang > > Signed-off-by: Namhyung Kim > > Acked-by: Ian Rogers Applied both to perf-tools-next, thanks!