Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp327305pxu; Wed, 14 Oct 2020 02:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD3wYSTw2g9yLSwlocMmsRKDqnpIZ049Wm++hzAVDL1sLgFKtAriYZ8bwcNpDPTKnJHWNO X-Received: by 2002:a50:b023:: with SMTP id i32mr3965186edd.377.1602667263738; Wed, 14 Oct 2020 02:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602667263; cv=none; d=google.com; s=arc-20160816; b=AKBsZySnOTzOIaVmlOaItZCFHIveXl9dD5kHeGlabhhUOE4fpCXgSw8IWb3V/ctm4g wfC1mOahGkvbt9SEXFG4FtX02LUEqmDK651mN8dAdDZFmLKp+ScY/luS1gOiHPKPP0Nx 6z8iPqpIUGdk0VkFwt14In5yhmYQR318OkZkXeYq/wmiXmHK182fH4ngF6bEkBUg7ZOK 73Mc537wthK8l7IIAplkaMM3qRp2KC1xuYii+FriJIZvOeOgwZpd1ZhCh8kg7IR6RPqb U4U4gwqvbmW7VJ9SLn9yFH7Z3rHL+fSevMYDIg0XUztDXlfgaoEnj6lSyuf7VN9Jrd/F ccIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=W6T0jppUpRS5f8Ffh23Z+KWSdGOH/gu/luscJ6UxZuo=; b=Kv0/Qr3WCB1SN/QEJbjKDXgoJU1bsM1lVAadKCTvKTroGb/gbB6lZdRTExw4Cj8TIz kaAwO30RFOhLMPx6ysTOIDrXq/LRVKiLNi7V/r8b5sMXf2wl6I2f8wZmp2cb/rM0eoHj 4gHHVGkVukydhnhtL0dm7UstgAgJSkRip5+/y1qr4t2PXPixS1ehwKy+pJd4wn6nVMDu c/MpgNAhEpOPXZ/LnKEn3mdMges0gX7yRTSpLJFahzWX3fg/jCfhUdCMTH41+08ncpiz vSB/NPY1PCdcIiCB4FsXPXxCS5kDn6OMVKKo3BqSEHyJJ/kwsT9tQJ5LAoz4ue5zx+iM 4HxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n43I1cNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si1798235edy.344.2020.10.14.02.20.40; Wed, 14 Oct 2020 02:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n43I1cNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729812AbgJNIow (ORCPT + 99 others); Wed, 14 Oct 2020 04:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbgJNIoj (ORCPT ); Wed, 14 Oct 2020 04:44:39 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3186C04584B for ; Tue, 13 Oct 2020 22:09:32 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id n15so2172790wrq.2 for ; Tue, 13 Oct 2020 22:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=W6T0jppUpRS5f8Ffh23Z+KWSdGOH/gu/luscJ6UxZuo=; b=n43I1cNYzvDiig7PTfNY37nSXZLoK8sKrLhdiz0QfB4hO/OSDpiqwSE/0m2u7rZUdg VnaAB6T81ZmHT3Ps+bWjf0X9ZrviP+QIaKIiWPstouu9hRTFhzWtN5jJvIV+MrVCeGb6 JTEaCrSmgXMg5RClECMblaryj5EBeBKTqY6e+/0J8yIiF5q19DyAVSEcUGruzAIKsP9w kbDTCYv1fo9TRF1t3uESAP0t7MX2h8j2bMVYUY0x6xBddzJoDwVyiaRihT95iNVP27gu l4RFPm/uN5TFQHJiGFeqp6q31JuGl0T4O+xOBsT941TB2kiptXyd+b8JMXtTBt2+PgcE bKYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W6T0jppUpRS5f8Ffh23Z+KWSdGOH/gu/luscJ6UxZuo=; b=Sod7ujN+V4BqeU+9xetz4kz+9uOZn9ahu8+m6NcuG0i2JyTxytAEd2kqXrZMR1k/qv GsXb5jxxxChmBsp8cm9s3rrxxHkNrsJ4LofdGuyDQQ+KtGbtjZk639YsMv1fNyWdt8z+ nP2HtvhTXIVoFkgXRSSFh0t9TWr93Uy5ujm/QIjF68X650kxgf0sIkeotGKUZlmFr8VF iyHkkf4aIRIcFQw0V7lmJfIVJYCPv8oVqtNaJgQEjRyn9LSFTeKUl4kyBdPslRS9imgR GBG8LxJrjlG8RdRIdTo34NDxADEJWyXvzu/pXs9M/Qu34Vo2tcyh3QqTx4iBD2t9e8ko qlsg== X-Gm-Message-State: AOAM531oCozXOC/u11zVrSUnWqsaVbOQ8LjZqv8/wGr/v9HekP5RuJIq TBbObbNMRRT5obsK/Qg2YoI/5w== X-Received: by 2002:a5d:4141:: with SMTP id c1mr3139197wrq.113.1602652171675; Tue, 13 Oct 2020 22:09:31 -0700 (PDT) Received: from hackbox2.linaro.org ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t124sm1823330wmg.31.2020.10.13.22.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 22:09:30 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , David Ahern , Don Zickus , Joe Mario , Al Grant , James Clark , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 0/8] perf c2c: Refine the organization of metrics Date: Wed, 14 Oct 2020 06:09:13 +0100 Message-Id: <20201014050921.5591-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set is to refine metrics output organization. If we reivew the current memory metrics in Perf c2c tool, it doesn't orgnize the metrics with directive approach; thus user needs to take time to dig into every statistics item. On the other hand, if use the "summary and breakdown" approach, the output result will be easier for reviewing by users, e.g. the output result can firstly give out the summary values, and then the later items will breakdown into more detailed statistics. For this reason, this patch is to reorgnize the metrics and it only changes for the "Shared Data Cache Line Table": it firstly displays the summary values for total records, total loads, total stores; then it breaks these summary values into small values, with the order from the most near memory node ("CPU Load Hit") to more far nodes ("LLC Load Hit", "RMT Load Hit", "Load Dram"). "LLC Load Hit" = "LclHit" + "LclHitm" "RMT Load Hit" = "RmtHit" + "RmtHitm" \ -> LLC Load Miss "Load Dram" = "Lcl" + "Rmt" / Another main reason for this patch set is wanting to extend "perf c2c" to support Arm SPE memory event, but Arm SPE doesn't contain 'HTIM' tag in its default trace data, for this case if want to analyze cache false sharing issue, we need to rely on LLC metrics + multi-threading info. So this patch set can be friendly to show LLC related metrics in the "Shared Data Cache Line Table"; for sorting cache lines with LLC metrics which will be sent out with another separate patch set. Before: ================================================= Shared Data Cache Line Table ================================================= # # ----------- Cacheline ---------- Total Tot ----- LLC Load Hitm ----- ---- Store Reference ---- --- Load Dram ---- LLC Total ----- Core Load Hit ----- -- LLC Load Hit -- # Index Address Node PA cnt records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 L2 Llc Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... ....... ........ ........ # 0 0x55acdcc92100 0 8197 40716 52.18% 3170 3170 0 24466 24437 29 0 0 0 16250 3349 5909 0 3822 0 1 0x55acdcc920c0 0 1 4621 31.01% 1884 1884 0 0 0 0 0 0 0 4621 739 0 0 1998 0 2 0x55acdcc92080 0 1 4475 16.69% 1014 1014 0 0 0 0 0 0 0 4475 2405 0 0 1056 0 After: ================================================= Shared Data Cache Line Table ================================================= # # ----------- Cacheline ---------- Tot ------- Load Hitm ------- Total Total Total ---- Stores ---- ----- Core Load Hit ----- - LLC Load Hit -- - RMT Load Hit -- --- Load Dram ---- # Index Address Node PA cnt Hitm Total LclHitm RmtHitm records Loads Stores L1Hit L1Miss FB L1 L2 LclHit LclHitm RmtHit RmtHitm Lcl Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ....... ........ ....... ........ ........ # 0 0x55acdcc92100 0 8197 52.18% 3170 3170 0 40716 16250 24466 24437 29 3349 5909 0 3822 3170 0 0 0 0 1 0x55acdcc920c0 0 1 31.01% 1884 1884 0 4621 4621 0 0 0 739 0 0 1998 1884 0 0 0 0 2 0x55acdcc92080 0 1 16.69% 1014 1014 0 4475 4475 0 0 0 2405 0 0 1056 1014 0 0 0 0 Leo Yan (8): perf c2c: Display the total numbers continuously perf c2c: Display "Total Stores" as a standalone metrics perf c2c: Organize metrics based on memory hierarchy perf c2c: Change header from "LLC Load Hitm" to "Load Hitm" perf c2c: Use more explicit headers for HITM perf c2c: Change header for LLC local hit perf c2c: Correct LLC load hit metrics perf c2c: Add metrics "RMT Load Hit" tools/perf/builtin-c2c.c | 83 +++++++++------------------------------- 1 file changed, 18 insertions(+), 65 deletions(-) -- 2.17.1