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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7D52C43217 for ; Mon, 30 May 2022 11:41:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235916AbiE3LlP (ORCPT ); Mon, 30 May 2022 07:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235883AbiE3LlO (ORCPT ); Mon, 30 May 2022 07:41:14 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D8D813E4 for ; Mon, 30 May 2022 04:41:10 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id x12so9915294pgj.7 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=LmIN/XgfRfbbpdIYYru0JzDwcwAFN4zMFybavlcCGg8DElg1+3OXzMt+3wYfl/t+yJ hxYB99OqlAm5DYo0L2slFIKTBn9XL6doXgPNdNVwrjQuLbLxYFO0I2uzJaIUUXVsYfwA +hR1y+K3/Q+o74kOLWcgtH3dk6xNvKsJehgD3KTakLuNwnvNdQqsUFaoZa70FJ/0LZkZ KvFhMvwIMOrP9m/LK+ZRHVQBxD0JMTsCMH7ckBOVXN28CLZWP25KlBrIb/+ejWJhXMqw RGf0DmJMKnKuH+IzQOVwduLv4mdXEWElLWF4Bfe1FEiskFvqfS2BcBnZqFPGPB098HX7 Ah7A== X-Gm-Message-State: AOAM530pPrvOuWWT6lNNEXLKd0VyxvbE073s3fOK/RpEYUmp+rho1tgW zsWDXQHUbizC7EOWXrbe+WTL+og7WHbt4x4fwsk= X-Google-Smtp-Source: ABdhPJyyY2z+LEUijMFV1bpmsqO0SFh/jX4VeU6hiEEwV+q9m0sYnCVjVpbejR2vwdIPBTX457L7wQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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