From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932097AbdHWOOI (ORCPT ); Wed, 23 Aug 2017 10:14:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33024 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754001AbdHWOOG (ORCPT ); Wed, 23 Aug 2017 10:14:06 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A54D281229 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Wed, 23 Aug 2017 16:14:01 +0200 From: Jiri Olsa To: Andi Kleen Cc: Andi Kleen , peterz@infradead.org, acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Joe Mario Subject: Re: [PATCH v5 3/4] perf, tools: Add support for printing new mem_info encodings Message-ID: <20170823141401.GA16889@krava> References: <20170816222156.19953-1-andi@firstfloor.org> <20170816222156.19953-4-andi@firstfloor.org> <20170823130148.GA7736@krava> <20170823140032.GE28715@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170823140032.GE28715@tassilo.jf.intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 23 Aug 2017 14:14:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 23, 2017 at 07:00:32AM -0700, Andi Kleen wrote: > > Andi, > > how is this 'Remote' different from the remote levels in mem_lvl? > > > > "Remote RAM (1 hop)", > > "Remote RAM (2 hops)", > > "Remote Cache (1 hop)", > > "Remote Cache (2 hops)", > > It applies to any other level. This is needed to express > "Remote unknown level", as is reported by Skylake. so if I find HITM with this flag set I should count it as remote HITM then? something like attached.. untested thanks, jirka --- diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c index 06f5a3a4295c..65e22b9e59f9 100644 --- a/tools/perf/util/mem-events.c +++ b/tools/perf/util/mem-events.c @@ -279,6 +279,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi) u64 lvl = data_src->mem_lvl; u64 snoop = data_src->mem_snoop; u64 lock = data_src->mem_lock; + bool mr = data_src->mem_remote; int err = 0; #define HITM_INC(__f) \ @@ -324,7 +325,7 @@ do { \ } if ((lvl & P(LVL, REM_RAM1)) || - (lvl & P(LVL, REM_RAM2))) { + (lvl & P(LVL, REM_RAM2)) || mr) { stats->rmt_dram++; if (snoop & P(SNOOP, HIT)) stats->ld_shared++; @@ -334,7 +335,7 @@ do { \ } if ((lvl & P(LVL, REM_CCE1)) || - (lvl & P(LVL, REM_CCE2))) { + (lvl & P(LVL, REM_CCE2)) || mr) { if (snoop & P(SNOOP, HIT)) stats->rmt_hit++; else if (snoop & P(SNOOP, HITM))