From patchwork Sat Jun 4 04:28:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12869583 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F833C433EF for ; Sat, 4 Jun 2022 05:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uNm6vMCH8WNb8123R2CrEgp0oHJz2X4RPC+qAAiB0KE=; b=TCF4r/LsCQGKWZ gtsA6fURL1Def7kqivt/beK9A62B0f8w3CQYr5rquu8EW0qgE7bmPpypA/PsNtJ+C/obH3U7OJGBK IPG/xhigFBFY3LDzJPcQMyKUg04Xvr3y5hcfWJ5l0DFOkYnrJsF78JXBDlEFCYSPtT9Msju1yNDN+ C3TnOtIEcbdLA4cd2y+d3pqlWqMrdpuxyyzXv1zWUG2lzA+RWeZtR40ODIJRNjQ+upjDvSlwI4Bxb j4E08TRAfqrBaC+Ggw+UEvjZPkeGToKFe8LUXvqFfAgU/BC0cz+DqGYb8jVjsmCPT6i2M0q5+6BQy KffZEtsIHvhLZP+NPyNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxMYk-00ARR6-At; Sat, 04 Jun 2022 05:42:50 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxMYh-00ARQj-U8 for linux-arm-kernel@bombadil.infradead.org; Sat, 04 Jun 2022 05:42:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=I8Ap7FR359+LVmOW7dWyoVzLBfvKdGYXWerLwv/ikLM=; b=LwE9uSmvP7p/+BtixfjZdDwRyn s+5xJBpOX8ttLDPVVIVETza5SpSD92Fki6DbsyCS0rGHz7l3HbL803S957rCHd3KfLDPhmjTw0aHl JMbOK2Qije28EApes+VPwdvWeHNHwjlohEIux4yFpljaEx3wyNEnOdSylGXvTuq0gJRsNfl9PV81w V3mFg8IUgM7wJsa68QLVn+htqNHhYXne7W2rIpZQvJ3HYiXRJOf+279oJXNbffZFYg5M9NyG+O5XE bZn7hk8QLqJUnXwje5My0cL4MmndnT8ER8Fjy5OP7p71CyKVeWa3F9XkEnsNPGI+IMsnxOvKUhRc/ c58JC+sg==; Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxLPh-004cIO-VJ for linux-arm-kernel@lists.infradead.org; Sat, 04 Jun 2022 04:29:28 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 3-20020a17090a174300b001e426a02ac5so10376491pjm.2 for ; Fri, 03 Jun 2022 21:29:24 -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=I8Ap7FR359+LVmOW7dWyoVzLBfvKdGYXWerLwv/ikLM=; b=TPHCrVO1/y3Q2tZD3YRceWQi3hi3GcxlLJWeyI2NA7bT1CenfZ5kbsmlv8uKCWYRW0 M2MBjc9t6osl4+RB6J9n9QtzlFGSy7Hy4pJhoTnebNhwZ4dV1DI5MintAc13KAD+UBQG kJWkwQTrqUAdvO31Azw4zhmylMX7IOWbQHM6bWrbDb/QL8gyoOzfgDK9vsMRfHnWPNJR 9K5EYEudHvWD+pfoH+5CqMkn+cedzllkmnx1otoe+kj9GwwRnytAl4A4bkAF5x12LFWv QncNRlM+AWDDjBUAJvq/k89lV7aJfDCHyhYeHDHiNj+1WztP3UFmbXPVw8eLktXyqbQG lPZg== 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=I8Ap7FR359+LVmOW7dWyoVzLBfvKdGYXWerLwv/ikLM=; b=Qjzbdt/znHiYxY6ga9bZjetm1t/LD2cTft5gQjHSDkXPB1EwcBWLjHw4pRwidojOlJ ySAPj84VBD0Rm0hUu32Ou/QfWoB00iPZWDw+WmckfkgAi4EFpzSkJP+/XoAaBJTYzBGP 2eNqSVsWx5+KbkSp0VGQp3QpGXFflYBBbHPH5axanYSuO0wENYnsSh9mpMiUVhXCM8mg OZb3Zt4zQFxmHKg1yzaaZxnd/AwkZ/6Bagw1uDYZWP3kJM27jqBboSgjeXSm1KFpjwOs gQwESmclQ+oXjSi+QetjU5EFlq761RXFOIV3pigs900EWG+xcS8ioZP57uQSgZrlzSlN jyGA== X-Gm-Message-State: AOAM533NHEZ+cCoUwf5qkAF04ROSZT3fbo7NLC9myhgDRSDB/+AFN1os 3RyxIeFBcjWHrVMF5Cg5YO/piQ== X-Google-Smtp-Source: ABdhPJxxYRt3x8gx/ICRCeLcEppFaWtqoPMk/6x7MxTBELCPfaApUfWHdyrdE/CoUy7jpcbR9w0m1Q== X-Received: by 2002:a17:90b:4b02:b0:1e2:ff51:272a with SMTP id lx2-20020a17090b4b0200b001e2ff51272amr14173646pjb.56.1654316962610; Fri, 03 Jun 2022 21:29:22 -0700 (PDT) Received: from leo-build-box.lan (ec2-54-67-95-58.us-west-1.compute.amazonaws.com. [54.67.95.58]) by smtp.gmail.com with ESMTPSA id w24-20020a1709027b9800b00163d4c3ffabsm6152916pll.304.2022.06.03.21.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jun 2022 21:29:22 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Ian Rogers , John Garry , Will Deacon , James Clark , German Gomez , Ali Saidi , Joe Mario , Adam Li , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v5 07/17] perf c2c: Output statistics for peer snooping Date: Sat, 4 Jun 2022 12:28:10 +0800 Message-Id: <20220604042820.2270916-8-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220604042820.2270916-1-leo.yan@linaro.org> References: <20220604042820.2270916-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220604_052926_429586_3FD7749F X-CRM114-Status: GOOD ( 10.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch outputs statistics for peer snooping for whole trace events and global shared cache line. Signed-off-by: Leo Yan Acked-by: Ian Rogers Tested-by: Ali Saidi Reviewed-by: Ali Saidi --- 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 4898ee57d156..37bebeb6c11b 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);