From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DE23C433E7 for ; Mon, 19 Oct 2020 17:09:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7369D207FF for ; Mon, 19 Oct 2020 17:09:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ez7ni1uq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7369D207FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9xWcWxN88uaccrwIyntHtAy+vxC2XrtY5s2m8clY/vM=; b=Ez7ni1uqv4fcVfA5vf0uVrT8m GinwfEUVe403H5gtrLYwPbUrAu0A03iw/47MkSgpv65H9+7KhPehbuvdPiQBWNDoVXHhbnr25uPvQ uoT/rKP0eB3Kru/RRTJfVDiCxgyKiAW3acDc8KIFC5OTA/8Azityiz/Svp2U8zn9eav65jnpSpUmG gTCx+Cnl+tlQcraGeLGvfdveCousJ+VXZGi41ZexQlHYqyDCHX7W0UIs3r3KZyIOmHh02NuSvhOL0 WSYNatiufTM6mLuNdwkMeWDSXkZO6sGXkU/v9QYujBmDdiF3mGJpE+XvA3ilkxdgDHI5ReRI5R7RE VqCeDB2/A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUYdm-0008DW-LU; Mon, 19 Oct 2020 17:08:10 +0000 Received: from lhrrgout.huawei.com ([185.176.76.210] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUYdj-0008CL-4u for linux-arm-kernel@lists.infradead.org; Mon, 19 Oct 2020 17:08:08 +0000 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 24118B690575A8B28DCE; Mon, 19 Oct 2020 18:08:05 +0100 (IST) Received: from [127.0.0.1] (10.47.6.70) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Mon, 19 Oct 2020 18:08:03 +0100 Subject: Re: [perf metricgroup] fcc9c5243c: perf-sanity-tests.Parse_and_process_metrics.fail To: Ian Rogers References: <1602152121-240367-10-git-send-email-john.garry@huawei.com> <20201018085031.GK11647@shao2-debian> <602e6bb8-a4ac-fae7-ed61-edf252e08d9a@huawei.com> From: John Garry Message-ID: Date: Mon, 19 Oct 2020 18:04:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.47.6.70] X-ClientProxiedBy: lhreml725-chm.china.huawei.com (10.201.108.76) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_130807_386045_6BA7FF17 X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Zijlstra , Linuxarm , LKML , Jin Yao , James Clark , Jiri Olsa , Andi Kleen , 0day robot , kernel test robot , Will Deacon , Alexander Shishkin , Ingo Molnar , "linux-imx@nxp.com" , Arnaldo Carvalho de Melo , Zhangshaokun , "lkp@lists.01.org" , Namhyung Kim , Linux ARM , Mathieu Poirier , Joakim Zhang , Leo Yan Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 19/10/2020 17:20, Ian Rogers wrote: >>> n >> So this named patch ("perf metricgroup: Hack a fix for aliases...") is >> breaking test #67 on my machine also, which is a broadwell. > Thanks for taking a look John. If you want help you can send the > output of "perf test 67 -vvv" to me. It is possible Broadwell has > similar glitches in the json to Skylake. I tested the original test on > server parts as I can access them as cloud machines. Here it is: john@localhost:~/kernel-dev7/tools/perf> ./perf test -vv 67 Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc 67: Parse and process metrics : --- start --- test child forked, pid 24433 metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC parsing metric: inst_retired.any / cpu_clk_unhalted.thread found event inst_retired.any found event cpu_clk_unhalted.thread adding {inst_retired.any,cpu_clk_unhalted.thread}:W Attempting to add event pmu 'inst_retired.any' with '' that may result in non-fatal errors Attempting to add event pmu 'cpu_clk_unhalted.thread' with '' that may result in non-fatal errors parsing metric: inst_retired.any / cpu_clk_unhalted.thread lookup: is_ref 0, counted 0, val 300.000000: inst_retired.any lookup: is_ref 0, counted 101, val 200.000000: cpu_clk_unhalted.thread metric expr idq_uops_not_delivered.core / (4 * (( ( cpu_clk_unhalted.thread / 2 ) * ( 1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk ) ))) for Frontend_Bound_SMT parsing metric: idq_uops_not_delivered.core / (4 * (( ( cpu_clk_unhalted.thread / 2 ) * ( 1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk ) ))) found event cpu_clk_unhalted.one_thread_active found event cpu_clk_unhalted.ref_xclk found event idq_uops_not_delivered.core found event cpu_clk_unhalted.thread adding {cpu_clk_unhalted.one_thread_active,cpu_clk_unhalted.ref_xclk,idq_uops_not_delivered.core,cpu_clk_unhalted.thread}:W Attempting to add event pmu 'cpu_clk_unhalted.one_thread_active' with '' that may result in non-fatal errors Attempting to add event pmu 'cpu_clk_unhalted.ref_xclk' with '' that may result in non-fatal errors Attempting to add event pmu 'idq_uops_not_delivered.core' with '' that may result in non-fatal errors Attempting to add event pmu 'cpu_clk_unhalted.thread' with '' that may result in non-fatal errors parsing metric: idq_uops_not_delivered.core / (4 * (( ( cpu_clk_unhalted.thread / 2 ) * ( 1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk ) ))) lookup: is_ref 0, counted 46, val 300.000000: idq_uops_not_delivered.core lookup: is_ref 0, counted 0, val 200.000000: cpu_clk_unhalted.thread lookup: is_ref 0, counted 216, val 400.000000: cpu_clk_unhalted.one_thread_active lookup: is_ref 0, counted 46, val 600.000000: cpu_clk_unhalted.ref_xclk metric expr (dcache_miss_cpi + icache_miss_cycles) for cache_miss_cycles parsing metric: (dcache_miss_cpi + icache_miss_cycles) metric expr l1d\-loads\-misses / inst_retired.any for dcache_miss_cpi parsing metric: l1d\-loads\-misses / inst_retired.any metric expr l1i\-loads\-misses / inst_retired.any for icache_miss_cycles parsing metric: l1i\-loads\-misses / inst_retired.any found event inst_retired.any found event l1i-loads-misses found event l1d-loads-misses adding {inst_retired.any,l1i-loads-misses,l1d-loads-misses}:W Attempting to add event pmu 'inst_retired.any' with '' that may result in non-fatal errors adding ref metric icache_miss_cycles: l1i\-loads\-misses / inst_retired.any adding ref metric dcache_miss_cpi: l1d\-loads\-misses / inst_retired.any parsing metric: (dcache_miss_cpi + icache_miss_cycles) lookup: is_ref 1, counted 0, val 0.000000: dcache_miss_cpi processing metric: dcache_miss_cpi ENTRY parsing metric: l1d\-loads\-misses / inst_retired.any lookup: is_ref 0, counted 105, val 300.000000: l1d-loads-misses lookup: is_ref 0, counted 46, val 400.000000: inst_retired.any processing metric: dcache_miss_cpi EXIT: 0.750000 lookup: is_ref 1, counted 0, val 0.000000: icache_miss_cycles processing metric: icache_miss_cycles ENTRY parsing metric: l1i\-loads\-misses / inst_retired.any lookup: is_ref 0, counted 216, val 200.000000: l1i-loads-misses lookup: is_ref 0, counted 46, val 400.000000: inst_retired.any processing metric: icache_miss_cycles EXIT: 0.500000 metric expr d_ratio(dcache_l2_all_hits, dcache_l2_all) for DCache_L2_Hits parsing metric: d_ratio(dcache_l2_all_hits, dcache_l2_all) metric expr l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit for DCache_L2_All_Hits parsing metric: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit metric expr dcache_l2_all_hits + dcache_l2_all_miss for DCache_L2_All parsing metric: dcache_l2_all_hits + dcache_l2_all_miss metric expr l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit for DCache_L2_All_Hits parsing metric: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit metric expr max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss for DCache_L2_All_Miss parsing metric: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss found event l2_rqsts.rfo_miss found event l2_rqsts.pf_miss found event l2_rqsts.rfo_hit found event l2_rqsts.demand_data_rd_hit found event l2_rqsts.all_demand_data_rd found event l2_rqsts.pf_hit adding {l2_rqsts.rfo_miss,l2_rqsts.pf_miss,l2_rqsts.rfo_hit,l2_rqsts.demand_data_rd_hit,l2_rqsts.all_demand_data_rd,l2_rqsts.pf_hit}:W Attempting to add event pmu 'l2_rqsts.rfo_miss' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.pf_miss' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.rfo_hit' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.demand_data_rd_hit' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.all_demand_data_rd' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.pf_hit' with '' that may result in non-fatal errors adding ref metric DCache_L2_All_Miss: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss adding ref metric DCache_L2_All_Hits: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit adding ref metric DCache_L2_All: dcache_l2_all_hits + dcache_l2_all_miss adding ref metric DCache_L2_All_Hits: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit parsing metric: d_ratio(dcache_l2_all_hits, dcache_l2_all) lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all_hits processing metric: dcache_l2_all_hits ENTRY parsing metric: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit lookup: is_ref 0, counted 8, val 100.000000: l2_rqsts.demand_data_rd_hit lookup: is_ref 0, counted 224, val 200.000000: l2_rqsts.pf_hit lookup: is_ref 0, counted 46, val 300.000000: l2_rqsts.rfo_hit processing metric: dcache_l2_all_hits EXIT: 600.000000 lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all processing metric: dcache_l2_all ENTRY parsing metric: dcache_l2_all_hits + dcache_l2_all_miss lookup: is_ref 1, counted 1, val 600.000000: dcache_l2_all_hits lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all_miss processing metric: dcache_l2_all_miss ENTRY parsing metric: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss lookup: is_ref 0, counted 112, val 400.000000: l2_rqsts.all_demand_data_rd lookup: is_ref 0, counted 8, val 100.000000: l2_rqsts.demand_data_rd_hit lookup: is_ref 0, counted 100, val 500.000000: l2_rqsts.pf_miss lookup: is_ref 0, counted 120, val 600.000000: l2_rqsts.rfo_miss processing metric: dcache_l2_all_miss EXIT: 1400.000000 processing metric: dcache_l2_all EXIT: 2000.000000 metric expr d_ratio(dcache_l2_all_miss, dcache_l2_all) for DCache_L2_Misses parsing metric: d_ratio(dcache_l2_all_miss, dcache_l2_all) metric expr max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss for DCache_L2_All_Miss parsing metric: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss metric expr dcache_l2_all_hits + dcache_l2_all_miss for DCache_L2_All parsing metric: dcache_l2_all_hits + dcache_l2_all_miss metric expr l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit for DCache_L2_All_Hits parsing metric: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit metric expr max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss for DCache_L2_All_Miss parsing metric: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss found event l2_rqsts.rfo_miss found event l2_rqsts.pf_miss found event l2_rqsts.rfo_hit found event l2_rqsts.demand_data_rd_hit found event l2_rqsts.all_demand_data_rd found event l2_rqsts.pf_hit adding {l2_rqsts.rfo_miss,l2_rqsts.pf_miss,l2_rqsts.rfo_hit,l2_rqsts.demand_data_rd_hit,l2_rqsts.all_demand_data_rd,l2_rqsts.pf_hit}:W Attempting to add event pmu 'l2_rqsts.rfo_miss' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.pf_miss' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.rfo_hit' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.demand_data_rd_hit' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.all_demand_data_rd' with '' that may result in non-fatal errors Attempting to add event pmu 'l2_rqsts.pf_hit' with '' that may result in non-fatal errors adding ref metric DCache_L2_All_Miss: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss adding ref metric DCache_L2_All_Hits: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit adding ref metric DCache_L2_All: dcache_l2_all_hits + dcache_l2_all_miss adding ref metric DCache_L2_All_Miss: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss parsing metric: d_ratio(dcache_l2_all_miss, dcache_l2_all) lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all_miss processing metric: dcache_l2_all_miss ENTRY parsing metric: max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss lookup: is_ref 0, counted 128, val 400.000000: l2_rqsts.all_demand_data_rd lookup: is_ref 0, counted 224, val 100.000000: l2_rqsts.demand_data_rd_hit lookup: is_ref 0, counted 112, val 500.000000: l2_rqsts.pf_miss lookup: is_ref 0, counted 0, val 600.000000: l2_rqsts.rfo_miss processing metric: dcache_l2_all_miss EXIT: 1400.000000 lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all processing metric: dcache_l2_all ENTRY parsing metric: dcache_l2_all_hits + dcache_l2_all_miss lookup: is_ref 1, counted 0, val 0.000000: dcache_l2_all_hits processing metric: dcache_l2_all_hits ENTRY parsing metric: l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit lookup: is_ref 0, counted 224, val 100.000000: l2_rqsts.demand_data_rd_hit lookup: is_ref 0, counted 0, val 200.000000: l2_rqsts.pf_hit lookup: is_ref 0, counted 152, val 300.000000: l2_rqsts.rfo_hit processing metric: dcache_l2_all_hits EXIT: 600.000000 lookup: is_ref 1, counted 1, val 1400.000000: dcache_l2_all_miss processing metric: dcache_l2_all EXIT: 2000.000000 metric expr ipc + m2 for M1 parsing metric: ipc + m2 metric expr ipc + m1 for M2 parsing metric: ipc + m1 metric expr ipc + m2 for M1 parsing metric: ipc + m2 failed: recursion detected for m2 metric expr 1/m3 for M3 parsing metric: 1/m3 metric expr 1/m3 for M3 parsing metric: 1/m3 failed: recursion detected for m3 metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC parsing metric: inst_retired.any / cpu_clk_unhalted.thread metric expr (dcache_miss_cpi + icache_miss_cycles) for cache_miss_cycles parsing metric: (dcache_miss_cpi + icache_miss_cycles) metric expr l1d\-loads\-misses / inst_retired.any for dcache_miss_cpi parsing metric: l1d\-loads\-misses / inst_retired.any metric expr l1i\-loads\-misses / inst_retired.any for icache_miss_cycles parsing metric: l1i\-loads\-misses / inst_retired.any found event inst_retired.any found event cpu_clk_unhalted.thread found event inst_retired.any found event l1i-loads-misses found event l1d-loads-misses adding {inst_retired.any,cpu_clk_unhalted.thread}:W,{inst_retired.any,l1i-loads-misses,l1d-loads-misses}:W Attempting to add event pmu 'inst_retired.any' with '' that may result in non-fatal errors Attempting to add event pmu 'cpu_clk_unhalted.thread' with '' that may result in non-fatal errors Attempting to add event pmu 'inst_retired.any' with '' that may result in non-fatal errors parsing metric: inst_retired.any / cpu_clk_unhalted.thread lookup: is_ref 0, counted 64, val 800.000000: inst_retired.any lookup: is_ref 0, counted 32, val 200.000000: cpu_clk_unhalted.thread adding ref metric icache_miss_cycles: l1i\-loads\-misses / inst_retired.any adding ref metric dcache_miss_cpi: l1d\-loads\-misses / inst_retired.any parsing metric: (dcache_miss_cpi + icache_miss_cycles) lookup: is_ref 1, counted 0, val 0.000000: dcache_miss_cpi processing metric: dcache_miss_cpi ENTRY parsing metric: l1d\-loads\-misses / inst_retired.any lookup: is_ref 0, counted 0, val 300.000000: l1d-loads-misses lookup: is_ref 0, counted 64, val 800.000000: inst_retired.any processing metric: dcache_miss_cpi EXIT: 0.375000 lookup: is_ref 1, counted 0, val 0.000000: icache_miss_cycles processing metric: icache_miss_cycles ENTRY parsing metric: l1i\-loads\-misses / inst_retired.any lookup: is_ref 0, counted 32, val 200.000000: l1i-loads-misses lookup: is_ref 0, counted 64, val 800.000000: inst_retired.any processing metric: icache_miss_cycles EXIT: 0.250000 FAILED tests/parse-metric.c:343 group IPC failed, wrong ratio FAILED tests/parse-metric.c:357 test metric group test child finished with -1 ---- end ---- Parse and process metrics: FAILED! john@localhost:~/kernel-dev7/tools/perf> > >> I will have a look, but I was hoping that Ian would have a proper fix >> for this on top of ("perf metricgroup: Fix uncore metric expressions"), >> which now looks to be merged. > I still have these changes to look at in my inbox but I'm assuming > they're good:-) really? I wouldn't assume my hacky patch is good :) > Sorry for not getting to them, but it's good they are > merged. cheers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel