Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3386118ybx; Fri, 8 Nov 2019 19:20:43 -0800 (PST) X-Google-Smtp-Source: APXvYqw+/N5HBt4tUzb9Smd45msB9j8JvVRnGYWaog4jnPg8E8bjL7NlNOBz7tlAZGap5iFq0Af1 X-Received: by 2002:a17:906:2552:: with SMTP id j18mr12433070ejb.244.1573269642902; Fri, 08 Nov 2019 19:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573269642; cv=none; d=google.com; s=arc-20160816; b=PyDIPGKpz9LvaOW5Tdg0ZC6o8CU8aPtvOBjV4S4WQxb2EYDd6BNZ2nLuKUVZujyoy3 W4W6Phv8+x1CNe/FBGt/cqJmvv/jR60aU1Ib7OKA/HyIAx/7zrK0BNrpJMzvtZBUnQTG q50dX/3GvxGvQP9t+BWIFy098A4UhM4JemnMD7ubkaXBNtNyYbX81wQrls1J+qBDvFcG TzxDTe2PTBLoiTHbTD6U7ng+5HUwnvGJjbtmkEEtK3zBJve5roRvgGFx1bAqbCvPw4/8 jwbri07lbrAFCvzv+TxFPRMEYtDagAHrzrtjMlO0oFoZWBEq2N/FiyFsfVTCCb/q2blK SxhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=rhyyvFza9V58ELU4QJ1FBO4oWCvPDkp5cii1+XZLVtE=; b=KsgP8Cq0t0LpC9iKDxg+aGsABEzhnPxCCBY0d1ac31FeTYJB75g23Fn7c/nWFyiRv7 K/gNoe2DCiZQZIfk3ZwMkNXagaA7QO9nZwjXmXjYKWj6Eui5uJjXQAY36Ee/FrJxh1CC FfJF5FREBOiRUPFhqkrwN23DIYvk2QSY0NWk5nz/OpQT+kzu3RfICgPZbTktaSQayMb7 edkTAlCOwnOzS0UALyHBIa3TZjNjxH4j1aOkOS6iNeHul5MYz8tHmb8IY1TI9imuMxFg 80LSbFsJu/CSSId4Hn0J21NM34U0qXhDRfH55ggy2I/438VG6M+ZWu+OiTwqe9NcOuqQ PPGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si5281161ejb.116.2019.11.08.19.20.19; Fri, 08 Nov 2019 19:20:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726143AbfKIDTj (ORCPT + 99 others); Fri, 8 Nov 2019 22:19:39 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:46000 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726019AbfKIDTj (ORCPT ); Fri, 8 Nov 2019 22:19:39 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ABAD68DB13AE377A856F; Sat, 9 Nov 2019 11:19:36 +0800 (CST) Received: from [127.0.0.1] (10.65.95.32) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Sat, 9 Nov 2019 11:19:30 +0800 Subject: Re: [QUESTION]perf stat: comment of miss ratio To: Andi Kleen References: <20191109024754.GA573472@tassilo.jf.intel.com> CC: "linux-kernel@vger.kernel.org" , "Peter Zijlstra" , Ingo Molnar , "Arnaldo Carvalho de Melo" , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Jin Yao , Ravi Bangoria , Davidlohr Bueso , Zhangshaokun , huangdaode , linyunsheng , John Garry From: Qi Liu Message-ID: Date: Sat, 9 Nov 2019 11:19:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20191109024754.GA573472@tassilo.jf.intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.65.95.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/9 10:47, Andi Kleen wrote: >> Relevant code is checked to make sure that the ratio is calculated by >> >> L1-dcache-load-misses/L1-dcache-loads, data "7.58%=30249/399189*100%" also >> >> proves this conclusion. >> >> So, I'm not sure why we use "of all L1-dcache hits" here to describe miss >> ratio, > > Yes you're right it should be "of all L1-dcache accesses" > > Please send a patch to fix the string and also check if this isn't wrong with some other > ratio too. > > -Andi > > . > Hi Andi: Thanks for your reply firstly. I check the code and find that "of all...hits" is also used to describe miss ratio of L1-icache, dTLB cache, iTLB cache, LL-cache. Relevant code as follow: stat-shadow.c:509: out->print_metric(config, out->ctx, color, "%7.2f%%", "of all L1-dcache hits", ratio); stat-shadow.c:530: out->print_metric(config, out->ctx, color, "%7.2f%%", "of all L1-icache hits", ratio); stat-shadow.c:550: out->print_metric(config, out->ctx, color, "%7.2f%%", "of all dTLB cache hits", ratio); stat-shadow.c:570: out->print_metric(config, out->ctx, color, "%7.2f%%", "of all iTLB cache hits", ratio); stat-shadow.c:590: out->print_metric(config, out->ctx, color, "%7.2f%%", "of all LL-cache hits", ratio); stat-shadow.c:875: print_metric(config, ctxp, NULL, NULL, "of all L1-dcache hits", 0); stat-shadow.c:885: print_metric(config, ctxp, NULL, NULL, "of all L1-icache hits", 0); stat-shadow.c:895: print_metric(config, ctxp, NULL, NULL, "of all dTLB cache hits", 0); stat-shadow.c:905: print_metric(config, ctxp, NULL, NULL, "of all iTLB cache hits", 0); stat-shadow.c:915: print_metric(config, ctxp, NULL, NULL, "of all LL-cache hits", 0); So, may I send a patch to fix all these strings? Thanks, liuqi