Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13441951pxu; Sun, 3 Jan 2021 15:18:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJybJ920ou26JZWq8j+by5uarHGt7kr2/KcaTQrH7zNYNqi5425E686LzqLfH0Kh6QgVGouH X-Received: by 2002:a05:6402:168f:: with SMTP id a15mr35369294edv.376.1609715904626; Sun, 03 Jan 2021 15:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609715904; cv=none; d=google.com; s=arc-20160816; b=OOl4qwgVOEdL0laOEvDMfza0QrZi9ymbi6ZQQKVkaMGU5NXnxO6X2owNmoJA2sr3QT 4qqLoMRb3m+5e6Aw3+jkFQ0+89MjNU8/Yg/6rbZIe5zM1l2WV2fOZ6PfThOXs48x+1k9 sIcziklR/k5/OEF4uIIXdIttVzd8em3BuLy68F6SP7WuGk9Fj1U+IOD7VzLAnsIXrAKc TgobdKfTC5Il+sgvMJORyz4uZxjeNFmoxJe8g3eWY0Fgx4HYiIvhgdUM4OFEXXsISSkW /xwFugt2PcfQF2qMNiI0kZZ/o3n33ZY6HiYqI1AHIwikGroLplN+VGWsvxrQkgcpXlU7 khlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HbOe2bYAAuE9fhSTVX9AdEfAuXcyidg3sV/DLg0ptrQ=; b=QUFKE+Ho+/s7ZF0XgeAoyNeThLrR2pql5ADuP8m4j8Gwg4xMTpkHOXAPi3juFOStub 6nGi9mQQVIiPlZJmouhyTOGAplNbOT/lZEDyud2lvu9+5n0ll2FLI7rhSO563Ov5j5Nw wuwEMDYqLxolH8tMJ1RWLrEHkAunqljkUcin8b+GcX71C+FYQp0N8f4DmonTUJazra06 5q4UCgdpUsOiSPq2NVQFYEs22NkzN/CZR7HYXeuIAwQEF3A+DbAehm7V1eP6IZGliIyD tHs3ih0KVeOua2mhhmd+BASn8bGHWmGZk64EjaFnkfBV20QCl/567Sqkqjp1vbKZXbN7 Shiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YYCpbsOY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs21si29370607ejc.395.2021.01.03.15.18.01; Sun, 03 Jan 2021 15:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YYCpbsOY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726306AbhACWxz (ORCPT + 99 others); Sun, 3 Jan 2021 17:53:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55363 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbhACWxz (ORCPT ); Sun, 3 Jan 2021 17:53:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609714348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HbOe2bYAAuE9fhSTVX9AdEfAuXcyidg3sV/DLg0ptrQ=; b=YYCpbsOYRtWRoqI0lYCnwS363orMjSosZD4O59CZQhtO2MJ9GwuqPTuHG5MGJXEBWHHXJU 0yp60JMH8PiOaaTvddQIC66nKEvk50Ilo2NWLaobsW9Kxnw9F/fw8CZpDQuxZJZTvNasts AadF5ytNeltPJeVmQH/mV5oSY8uIvOY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-ch8GWXr7O9K4IHsjz2o_mQ-1; Sun, 03 Jan 2021 17:52:25 -0500 X-MC-Unique: ch8GWXr7O9K4IHsjz2o_mQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 683FB107ACE4; Sun, 3 Jan 2021 22:52:23 +0000 (UTC) Received: from krava (unknown [10.40.192.17]) by smtp.corp.redhat.com (Postfix) with SMTP id E9AD21A8A3; Sun, 3 Jan 2021 22:52:19 +0000 (UTC) Date: Sun, 3 Jan 2021 23:52:19 +0100 From: Jiri Olsa To: Leo Yan Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Andi Kleen , Ian Rogers , Kan Liang , Joe Mario , David Ahern , Don Zickus , Al Grant , James Clark , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 00/11] perf c2c: Sort cacheline with all loads Message-ID: <20210103225219.GA850408@krava> References: <20201213133850.10070-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201213133850.10070-1-leo.yan@linaro.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 13, 2020 at 01:38:39PM +0000, Leo Yan wrote: > This patch set is to sort cache line for all load operations which hit > any cache levels. For single cache line view, it shows the load > references for loads with cache hits and with cache misses respectively. > > This series is a following for the old patch set "perf c2c: Sort > cacheline with LLC load" [1], in the old patch set it tries to sort > cache line with the load operations in last level cache (LLC), after > testing we found the trace data doesn't contain LLC events if the > platform isn't a NUMA system. For this reason, this series refines the > implementation to sort on all cache levels hits of load operations; it's > reasonable for us to review the load and store opreations, if detects > any cache line is accessed by multi-threads, this hints that the cache > line is possible for false sharing. > > This patch set is clearly applied on perf/core branch with the latest > commit db0ea13cc741 ("perf evlist: Use the right prefix for 'struct > evlist' record methods"). And the changes has been tested on x86 and > Arm64, the testing result is shown as below. SNIP > > > [...] > > Changes from v1: > * Changed from sorting on LLC to sorting on all loads with cache hits; > * Added patches 06/11, 07/11 for refactoring macros; > * Added patch 08/11 for refactoring node header, so can display "%loads" > rather than "%hitms" in the header; > * Added patch 09/11 to add local pointers for pointing to output metrics > string and sort string (Juri); > * Added warning in percent_hitm() for the display "all", which should > never happen (Juri). > > [1] https://lore.kernel.org/patchwork/cover/1321514/ > > > Leo Yan (11): > perf c2c: Add dimensions for total load hit > perf c2c: Add dimensions for load hit > perf c2c: Add dimensions for load miss > perf c2c: Rename for shared cache line stats > perf c2c: Refactor hist entry validation > perf c2c: Refactor display filter macro > perf c2c: Refactor node display macro > perf c2c: Refactor node header > perf c2c: Add local variables for output metrics > perf c2c: Sort on all cache hit for load operations > perf c2c: Update documentation for display option 'all' > > tools/perf/Documentation/perf-c2c.txt | 21 +- > tools/perf/builtin-c2c.c | 548 ++++++++++++++++++++++---- > 2 files changed, 487 insertions(+), 82 deletions(-) Joe might want to test it first, but it looks all good to me: Acked-by: Jiri Olsa thanks, jirka