From patchwork Sat Jun 4 04:28:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12869564 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 B7DF4C433EF for ; Sat, 4 Jun 2022 04:31:29 +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=rspmLxC9aQyBbWH0dH3jY5veqYwAZHsSxwe+H5ADT4s=; b=i4e7CXskUfRmo3 PIwryw6GX2REqhawRj+Gz8XxYUhCwpGYxCNwt3EMtNt2bu0Y/Qj7pfqgWnNppvFVDPsEdZbks8RUQ f8VvOqwaXblFm8lAHfx3xm/82c/iqrSzmgJHPX4ElS6Sv1ikyY2ra7jpYPWsuwZd58HTCMqT26DOI TanCsvju4l7+wgaeNbrwrbCuWpoifvKoMcC/EiiKquCeS9yNR3r1GcIqpzSJsvV3tlgYt4JNQM7ua I89eoPVDLnYSu69/JqJkF4pZZq4bxEplMIcdnJX52xWWvpPie00AieiWXoYBThMcXeMtGJBsY9qci 6b8Vp3qihXhqpSuXaSBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxLQX-00AERK-7e; Sat, 04 Jun 2022 04:30:18 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxLPl-00AE42-G6 for linux-arm-kernel@lists.infradead.org; Sat, 04 Jun 2022 04:29:30 +0000 Received: by mail-pj1-x102a.google.com with SMTP id mh16-20020a17090b4ad000b001e8313301f1so2155676pjb.1 for ; Fri, 03 Jun 2022 21:29:28 -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=wKXILwkRVdA3Fa6aqPRmJrL7mZPDO3MwqGuWltaS794=; b=ZrMrMwxNoNF0zzyxwZDgysg7jGahVeGE+iX35PIPdmiZHQuLQPSCD2dwYqttdPyhjP LS8HOl95nRarD3I1q40CBFOGFpyQF1HnOGJUYfmt9tf0/trGGgXRpdAEbdkHtWZ9dK8c 4ePr9RZeG8RsaZaRSmLPYIqZEbzlcpQGeC43SCEj1f3Ycl645cfIiWeRjfCUMamtjKtr 9yzd6SXtxBiihWFKC1q5sVx86zgmxhwWGaFtYbL5Nh5yqJIZ7X2wM/twI0j6k8e0pkF7 SsKJBoYIMJ3/FzLSBV7Um07NWAe/DaJ2yu96eC+Zf5jNjWNzd9J2mtxetOyjDxmVgaEZ GNQg== 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=wKXILwkRVdA3Fa6aqPRmJrL7mZPDO3MwqGuWltaS794=; b=cMYk/usdj1og2UrOXo2zaGmgnVvMFx10FsUhEK/PvzbVIOsUm56WUnHp30kg7w5vMJ dCS6e+EAjKb6/4kDdWBmGLMWg4ViLung9J77+tmd8VBa/283ktdcmfnDSWgRi48mf7je exJd00tJNwgzMQVrZGWASpiIRaBu8VsLr0OxvGszVG4zabmNtcrltxF8P7QIC6rbJTW8 aphcNUa4Tl4bK55oNhOKotYlCkIAUiZSMj/I4+3ogdXX/2RjfANnbzxePN1/EEdiJhRY Lira2GofXUHVuXXcA9x8BVuTXggfQZ626ibC79BZg7VwW1RJNuWrF9o+OGjI8jry6fpQ 0+Eg== X-Gm-Message-State: AOAM532ASdg835guKVkmMc4+3fVpY0u8uKqOabbbXQipXY5ZkKv2B6nd DTbRu0yAkMxaPpdzbGyTFLVPxg== X-Google-Smtp-Source: ABdhPJwrfo/O3rcVKswOwm/BY0TFIFuj5/gOCyu21b7yZFXaclT6zOL9KrFQgfNXmNibPS1S5xKBLQ== X-Received: by 2002:a17:902:ee8d:b0:164:7dd:6cc6 with SMTP id a13-20020a170902ee8d00b0016407dd6cc6mr13858875pld.84.1654316968262; Fri, 03 Jun 2022 21:29:28 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jun 2022 21:29:27 -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 08/17] perf c2c: Add dimensions for peer load operations Date: Sat, 4 Jun 2022 12:28:11 +0800 Message-Id: <20220604042820.2270916-9-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-20220603_212929_575375_3228F0D7 X-CRM114-Status: GOOD ( 11.90 ) 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 adds three dimensions for peer load operations of 'lcl_peer', 'rmt_peer' and 'tot_peer'. These three dimensions will be used in the shared data cache line table. Signed-off-by: Leo Yan Acked-by: Ian Rogers Tested-by: Ali Saidi Reviewed-by: Ali Saidi --- tools/perf/builtin-c2c.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 37bebeb6c11b..99c0c7307a4a 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -650,6 +650,9 @@ __f ## _cmp(struct perf_hpp_fmt *fmt __maybe_unused, \ STAT_FN(rmt_hitm) STAT_FN(lcl_hitm) +STAT_FN(rmt_peer) +STAT_FN(lcl_peer) +STAT_FN(tot_peer) STAT_FN(store) STAT_FN(st_l1hit) STAT_FN(st_l1miss) @@ -1360,6 +1363,30 @@ static struct c2c_dimension dim_rmt_hitm = { .width = 7, }; +static struct c2c_dimension dim_tot_peer = { + .header = HEADER_SPAN("------- Load Peer -------", "Total", 2), + .name = "tot_peer", + .cmp = tot_peer_cmp, + .entry = tot_peer_entry, + .width = 7, +}; + +static struct c2c_dimension dim_lcl_peer = { + .header = HEADER_SPAN_LOW("Local"), + .name = "lcl_peer", + .cmp = lcl_peer_cmp, + .entry = lcl_peer_entry, + .width = 7, +}; + +static struct c2c_dimension dim_rmt_peer = { + .header = HEADER_SPAN_LOW("Remote"), + .name = "rmt_peer", + .cmp = rmt_peer_cmp, + .entry = rmt_peer_entry, + .width = 7, +}; + static struct c2c_dimension dim_cl_rmt_hitm = { .header = HEADER_SPAN("----- HITM -----", "Rmt", 1), .name = "cl_rmt_hitm", @@ -1672,6 +1699,9 @@ static struct c2c_dimension *dimensions[] = { &dim_tot_hitm, &dim_lcl_hitm, &dim_rmt_hitm, + &dim_tot_peer, + &dim_lcl_peer, + &dim_rmt_peer, &dim_cl_lcl_hitm, &dim_cl_rmt_hitm, &dim_tot_stores,