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 A9EC5C433F5 for ; Sat, 26 Mar 2022 13:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233118AbiCZN5u (ORCPT ); Sat, 26 Mar 2022 09:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233116AbiCZN4R (ORCPT ); Sat, 26 Mar 2022 09:56:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7DFD27FCF; Sat, 26 Mar 2022 06:54:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF5F1B8093C; Sat, 26 Mar 2022 13:54:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87A46C340EE; Sat, 26 Mar 2022 13:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648302876; bh=tpj4OYga0btXBeWUbbOyEBya0KUQhNIu70pMx0FFR+U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pC5bd1M8keEZTGI+g36EAA1WcN2uAqK19jpI/xZhwXA15rg3UfnQZdpwgsyKQBbT4 24eA+/wErB/sMcYeAuAae1HYusiC4azTxCGqn6UMNXs6ClCcz3yzq1Id0jeMTHV3lp QvpPJ4RRof8D6qULdkt90wE3OH5Rcy8CW3xaCfPKKq65AUMeYLUXqGD85gBwIei8ne GMIpg/6f490FxlFyDOxor3HCFXD6GUS2OqTiCCMZVodCErePotJ+6xOh4nzjxFPDUR yR8z2ggLW9lLUtVUGsOS0H4UVO+LFHGggW4K8d10QvfM8+NjCUkfxKSE/qnFYV/nnZ +ocLUG3Ej85qQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5930140407; Sat, 26 Mar 2022 10:54:34 -0300 (-03) Date: Sat, 26 Mar 2022 10:54:34 -0300 From: Arnaldo Carvalho de Melo To: Ali Saidi Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, german.gomez@arm.com, leo.yan@linaro.org, benh@kernel.crashing.org, Nick.Forrington@arm.com, alexander.shishkin@linux.intel.com, andrew.kilroy@arm.com, james.clark@arm.com, john.garry@huawei.com, jolsa@kernel.org, kjain@linux.ibm.com, lihuafei1@huawei.com, mark.rutland@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, namhyung@kernel.org, peterz@infradead.org, will@kernel.org Subject: Re: [PATCH v4 3/4] perf mem: Support mem_lvl_num in c2c command Message-ID: References: <20220324183323.31414-1-alisaidi@amazon.com> <20220324183323.31414-4-alisaidi@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324183323.31414-4-alisaidi@amazon.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Thu, Mar 24, 2022 at 06:33:22PM +0000, Ali Saidi escreveu: > In addition to summarizing data encoded in mem_lvl also support data > encoded in mem_lvl_num. > > Since other architectures don't seem to populate the mem_lvl_num field > here there shouldn't be a change in functionality. I'm removing this one as well, will wait for further discussion as the other two got yanked out as per Leo's review comments. The first patch is in with Leo's ack. - Arnaldo > Signed-off-by: Ali Saidi > Tested-by: German Gomez > Reviewed-by: German Gomez > --- > tools/perf/util/mem-events.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c > index ed0ab838bcc5..e5e405185498 100644 > --- a/tools/perf/util/mem-events.c > +++ b/tools/perf/util/mem-events.c > @@ -485,6 +485,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi) > u64 daddr = mi->daddr.addr; > u64 op = data_src->mem_op; > u64 lvl = data_src->mem_lvl; > + u64 lnum = data_src->mem_lvl_num; > u64 snoop = data_src->mem_snoop; > u64 lock = data_src->mem_lock; > u64 blk = data_src->mem_blk; > @@ -527,16 +528,18 @@ do { \ > if (lvl & P(LVL, UNC)) stats->ld_uncache++; > if (lvl & P(LVL, IO)) stats->ld_io++; > if (lvl & P(LVL, LFB)) stats->ld_fbhit++; > - if (lvl & P(LVL, L1 )) stats->ld_l1hit++; > - if (lvl & P(LVL, L2 )) stats->ld_l2hit++; > - if (lvl & P(LVL, L3 )) { > + if (lvl & P(LVL, L1) || lnum == P(LVLNUM, L1)) > + stats->ld_l1hit++; > + if (lvl & P(LVL, L2) || lnum == P(LVLNUM, L2)) > + stats->ld_l2hit++; > + if (lvl & P(LVL, L3) || lnum == P(LVLNUM, L3)) { > if (snoop & P(SNOOP, HITM)) > HITM_INC(lcl_hitm); > else > stats->ld_llchit++; > } > > - if (lvl & P(LVL, LOC_RAM)) { > + if (lvl & P(LVL, LOC_RAM) || lnum == P(LVLNUM, RAM)) { > stats->lcl_dram++; > if (snoop & P(SNOOP, HIT)) > stats->ld_shared++; > -- > 2.32.0 -- - Arnaldo 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 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 EE64BC433EF for ; Sat, 26 Mar 2022 13:55:39 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f8hxEVzvUMJl2l+aAU7X/J+HuMz67obyjV6bwibmGUQ=; b=M3cHX+nYQeeAPf fn9cB/hvZ9hhIQQ5RoGOcpvnO4+sQuttKwPOnc8UBXQkQMnx1MIrNzFeu4vtwdd2HT9UQJOH2FpRy RtL/SuN8rY7FpDsM3sejDxaICUGjNQ2E6PBINvIjRtK9MVXqOOW3I6rlA4XWZoxyKmFy19vv4Dywj s7EzdQWwK5aH/jWqH/aYHrYb/ffk1YN6omXvCT44+cXf5FyB7ZZPfkmUA9uUG5RTFXx+F2+SLUC3p HTxdSEvHQzYvBO7NEzpUr9RFHMRZLrkGX4XbUvfog0A/UfZjDOP07Dy3JLg8WX4aRM67Sw/AShT+X RRZLNL5qLpfa+JYyUV3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nY6sK-004KiG-V3; Sat, 26 Mar 2022 13:54:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nY6sI-004Kht-D9 for linux-arm-kernel@bombadil.infradead.org; Sat, 26 Mar 2022 13:54:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1+fNfgBz9ey/JMFCz+qLPe9sdHSWvdVH+efgO5HFHDo=; b=qryEjb9QKUkt5FPFhPhp0u9o2d TKgRV6a1AqsGlGq4QP9qU3dY4NDkjNLbEttBy0BqudapOp5REmZzmdcaaUp28JN5SbCd5zFeO94DF 2nuoGse0Sz7wfwFRD9UlDeFl6ehC3fsdIxG1jH+ydkbHmBt74C285tnt7Q9hOIBYWxfeeZ+wEo2/c L7trAHQoVbZl1inQFT2pwoL6c7bH/FqXmOxHSF/rjmtMhV/2B+6LuBFb3T2z+mAcUQKUqWPHaKlGy NWJ2u0ijRxyogkBWR6uqfjerlJw2+VCp5xqKqdtKhNjz1TTkp1M6gOzA60GJAbFQ65jPE2VJlKTDa p84lTM3Q==; Received: from [187.19.238.43] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nY6sG-00FIAf-ML; Sat, 26 Mar 2022 13:54:37 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5930140407; Sat, 26 Mar 2022 10:54:34 -0300 (-03) Date: Sat, 26 Mar 2022 10:54:34 -0300 From: Arnaldo Carvalho de Melo To: Ali Saidi Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, german.gomez@arm.com, leo.yan@linaro.org, benh@kernel.crashing.org, Nick.Forrington@arm.com, alexander.shishkin@linux.intel.com, andrew.kilroy@arm.com, james.clark@arm.com, john.garry@huawei.com, jolsa@kernel.org, kjain@linux.ibm.com, lihuafei1@huawei.com, mark.rutland@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, namhyung@kernel.org, peterz@infradead.org, will@kernel.org Subject: Re: [PATCH v4 3/4] perf mem: Support mem_lvl_num in c2c command Message-ID: References: <20220324183323.31414-1-alisaidi@amazon.com> <20220324183323.31414-4-alisaidi@amazon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220324183323.31414-4-alisaidi@amazon.com> X-Url: http://acmel.wordpress.com 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Thu, Mar 24, 2022 at 06:33:22PM +0000, Ali Saidi escreveu: > In addition to summarizing data encoded in mem_lvl also support data > encoded in mem_lvl_num. > > Since other architectures don't seem to populate the mem_lvl_num field > here there shouldn't be a change in functionality. I'm removing this one as well, will wait for further discussion as the other two got yanked out as per Leo's review comments. The first patch is in with Leo's ack. - Arnaldo > Signed-off-by: Ali Saidi > Tested-by: German Gomez > Reviewed-by: German Gomez > --- > tools/perf/util/mem-events.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c > index ed0ab838bcc5..e5e405185498 100644 > --- a/tools/perf/util/mem-events.c > +++ b/tools/perf/util/mem-events.c > @@ -485,6 +485,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi) > u64 daddr = mi->daddr.addr; > u64 op = data_src->mem_op; > u64 lvl = data_src->mem_lvl; > + u64 lnum = data_src->mem_lvl_num; > u64 snoop = data_src->mem_snoop; > u64 lock = data_src->mem_lock; > u64 blk = data_src->mem_blk; > @@ -527,16 +528,18 @@ do { \ > if (lvl & P(LVL, UNC)) stats->ld_uncache++; > if (lvl & P(LVL, IO)) stats->ld_io++; > if (lvl & P(LVL, LFB)) stats->ld_fbhit++; > - if (lvl & P(LVL, L1 )) stats->ld_l1hit++; > - if (lvl & P(LVL, L2 )) stats->ld_l2hit++; > - if (lvl & P(LVL, L3 )) { > + if (lvl & P(LVL, L1) || lnum == P(LVLNUM, L1)) > + stats->ld_l1hit++; > + if (lvl & P(LVL, L2) || lnum == P(LVLNUM, L2)) > + stats->ld_l2hit++; > + if (lvl & P(LVL, L3) || lnum == P(LVLNUM, L3)) { > if (snoop & P(SNOOP, HITM)) > HITM_INC(lcl_hitm); > else > stats->ld_llchit++; > } > > - if (lvl & P(LVL, LOC_RAM)) { > + if (lvl & P(LVL, LOC_RAM) || lnum == P(LVLNUM, RAM)) { > stats->lcl_dram++; > if (snoop & P(SNOOP, HIT)) > stats->ld_shared++; > -- > 2.32.0 -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel