Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5283976ioo; Wed, 1 Jun 2022 02:16:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeZFB8RrzxfUm8PPLTTuCBgXO7q1KpzWvN07BH3cbKV5p/WQDCK8HYwd3oXvjvo8vI2V+u X-Received: by 2002:a05:6402:27d0:b0:42d:fbe2:57d9 with SMTP id c16-20020a05640227d000b0042dfbe257d9mr997925ede.47.1654074982094; Wed, 01 Jun 2022 02:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654074982; cv=none; d=google.com; s=arc-20160816; b=XvHrssECLX5yaRvvfysGW2Ko/aaTtDsSm96dQE0mfvKsATwbE+3qwwkgnN24mddAlJ OXh8jNbLdhlAC1b5auYBltMg1UiCy09XnINw3YfANonfdd/QVCxTky8vM/F8h6fw9EPi SBLiv6/rRLa87a8NPqGDo2zLOyor+YNxohq0AGLPcdPSgW7VVi38tFBH95Rzg0V+0G/0 iZqovAHPeGNNCz5VK26qu/b6XkHvxqgPbakZLVmpoIQIgSakCQuU4HZ/AXC08p/nYzbA SxfQ5srUPOUwD/1fBZ3s8LoznqvYpLWSoi9XUKDzIcwrKmiRV/T8GoIDdNFqkmpr6py2 7JzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=h8h+dOa5UXWEE0M1AXGeUja2PScbi3m/14Ye0UYGzpI=; b=tHWOQAMf4MXSpl9tYQJDbtCLRgGeChe//sEl2g2yKmGGpmbFG2cMGrpNUJ6wc5q2SC D2UUp7nNd9Q0+ZSulfpJw8rIjHzXhGrw7XykmNzKq+b7bgMn6T4JtQgMMYYiKyHxylN6 DsI6UBQMmoLm/TtqFFk6BQgFUlIaEkaMYMaMRe/xkzRRCvt3D8x22N9cKDcU2Hbh1G+J dVDQuZmqnJiDlBEmT7m75GkegOS3xWEIkhijTBWkwfjxSKCoF0vW4z+3dcap6AAoMQK5 DEgsGh+rHQoNS4aqof7iKc409LIMyY9jWJMoqvJwNd7fG1UtiOTRtLCdBs55IRGxmgkW 9CaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOe0sxeZ; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a17090658c500b006ff077eab22si1229593ejs.0.2022.06.01.02.15.55; Wed, 01 Jun 2022 02:16: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; dkim=pass header.i=@linaro.org header.s=google header.b=aOe0sxeZ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbiE3LlZ (ORCPT + 99 others); Mon, 30 May 2022 07:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235884AbiE3LlO (ORCPT ); Mon, 30 May 2022 07:41:14 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16F46813E9 for ; Mon, 30 May 2022 04:41:10 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id g67so2337943pfb.2 for ; Mon, 30 May 2022 04:41:10 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=h8h+dOa5UXWEE0M1AXGeUja2PScbi3m/14Ye0UYGzpI=; b=aOe0sxeZZ3mOj0Cr7eUZd6cMma69nGUO55Otyh2VVIlBOWRgpcdeLZEafs83PKh/VL vtBOZ6xDlWoUF46lwZxNIPPnc+Ekd2iHetayug+sfRdpqIHIzBja5IVBCsPPw0bBNeqJ yc9oh4u5n87wPvgsND0bnmTKbFy6ysJbylSQtmbvJS2jteohoTzKC4NMlZFMMZApv+rX d7iMQTf+6STuriEOFXYUdT303pf6G8e2SZtDd3z1C+9f0cnkr3nRjP2TWtRABc6H8nRC Oz3cv/7NYRKpgIPE8AuRF2gVB0t/+hksPqrotZo33wKMK4m+UKIAiyqmPQvil0eHS8aP 5ANA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h8h+dOa5UXWEE0M1AXGeUja2PScbi3m/14Ye0UYGzpI=; b=Pvf/6FsV3rAOTMRZR8akvAbu3q6aL/E5OZXGJU1tviDIQB7I5y6AAbp2KPMFo1Ld97 zNHl5j+ULPIOjT4U5D5r+V3kc0ZPdepsAsrmGbA9CYXnjKoST2C4A82FUFqsv+6X+5LF LMNRI7seeX1yKm5VbCnRUSTpSXMYGMJCz7FSDmrWfWcoet/AoavZOtd9MCqE0DsUASAr KdAfsKuTIEVpJPg5f/JA5IpyYWnj0HZewPsTqsKr9xGayoJXzYPcwT+F8YN/yQcaZZzi ER3npPRxOApxHWy5fzGvtC1l/xAEaJcP2NSiKDvumiPKj+08uil3jWmR6CjkZQtdzbDV LAjA== X-Gm-Message-State: AOAM530GeYHLwQfQ7VeQgXt5xtsrj9p0cZ3fRH3Y/H69f8MRnc0B3Rs8 Vd7ENBN/K8/425xlEJB46Wzn2g== X-Received: by 2002:a05:6a00:2402:b0:4e1:46ca:68bd with SMTP id z2-20020a056a00240200b004e146ca68bdmr56506321pfh.70.1653910869257; Mon, 30 May 2022 04:41:09 -0700 (PDT) Received: from leo-build-box.lan (n058152077182.netvigator.com. [58.152.77.182]) by smtp.gmail.com with ESMTPSA id c7-20020a170902724700b00161a9df4de8sm8846194pll.145.2022.05.30.04.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 04:41:09 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alyssa Ross , Ian Rogers , Like Xu , Kajol Jain , Li Huafei , Joe Mario , Adam Li , German Gomez , James Clark , Ali Saidi , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v4 02/12] perf c2c: Output statistics for peer snooping Date: Mon, 30 May 2022 19:40:26 +0800 Message-Id: <20220530114036.3225544-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530114036.3225544-1-leo.yan@linaro.org> References: <20220530114036.3225544-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 This patch outputs statistics for peer snooping for whole trace events and global shared cache line. Signed-off-by: Leo Yan --- tools/perf/builtin-c2c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index e8280973d7b8..ac389432c15f 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2202,6 +2202,8 @@ static void print_c2c__display_stats(FILE *out) fprintf(out, " Load LLC Misses : %10d\n", llc_misses); fprintf(out, " Load access blocked by data : %10d\n", stats->blk_data); fprintf(out, " Load access blocked by address : %10d\n", stats->blk_addr); + fprintf(out, " Load HIT Local Peer : %10d\n", stats->lcl_peer); + fprintf(out, " Load HIT Remote Peer : %10d\n", stats->rmt_peer); fprintf(out, " LLC Misses to Local DRAM : %10.1f%%\n", ((double)stats->lcl_dram/(double)llc_misses) * 100.); fprintf(out, " LLC Misses to Remote DRAM : %10.1f%%\n", ((double)stats->rmt_dram/(double)llc_misses) * 100.); fprintf(out, " LLC Misses to Remote cache (HIT) : %10.1f%%\n", ((double)stats->rmt_hit /(double)llc_misses) * 100.); @@ -2230,6 +2232,7 @@ static void print_shared_cacheline_info(FILE *out) fprintf(out, " L1D hits on shared lines : %10d\n", stats->ld_l1hit); fprintf(out, " L2D hits on shared lines : %10d\n", stats->ld_l2hit); fprintf(out, " LLC hits on shared lines : %10d\n", stats->ld_llchit + stats->lcl_hitm); + fprintf(out, " Load hits on peer cache or nodes : %10d\n", stats->lcl_peer + stats->rmt_peer); fprintf(out, " Locked Access on shared lines : %10d\n", stats->locks); fprintf(out, " Blocked Access on shared lines : %10d\n", stats->blk_data + stats->blk_addr); fprintf(out, " Store HITs on shared lines : %10d\n", stats->store); -- 2.25.1