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 38A73C4167B for ; Thu, 7 Dec 2023 20:32:23 +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=By5WYOhYnb1mm/hCFDxvLniFbduUOO3787QNk5dySOI=; b=GQzAWGs9HxdhHS ltCf06gd3BN2qgLk0WHVTibq2U29X0XASseVsTy+LvsfLZlrGP1/ulqx7/3Via6ixlm1g4ivh0KDk DaXkA8A5gwp8r2Yw1SEP+B3tPy1wJMLk/PSCDG/o9LiN75hp+s77UPaUYc3mxDwvpTq0MCjzSBm0N OAHjBrNRWsZCPQZkZqQAyWQzLtWBijVvkcClERhr1uLhCRem7UWLpvFBROgzzMaqTV2n6TUwXa2+4 NE65w8B2k3xBB40HeGc2kawn2JWfwcLx+/k0jI6LlOYjj9sh5iSujNAJlN8FE4jYCEStUaNk+AIjI GE3YHui6+R6/XBpIrPqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBL2J-00Dqfm-0c; Thu, 07 Dec 2023 20:31:55 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBL2H-00DqfZ-2t for linux-arm-kernel@bombadil.infradead.org; Thu, 07 Dec 2023 20:31:53 +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=oQ+5pJTrFYJAizG7yblYvbd0KCjxUeG1LCidzliru1Q=; b=EllOypDoMXL84Shsf3sOxOgrBg xXukgbNtSIwIccSI4zgxebk7HuH6wo5ebc5OBRakhxPuzl080/7jKMhZ5StUUAQeVZnqEk1rFksgt Bvmmk9UfpWhpsxeCGa/OPhu5nZVRKWrXAw4tJ1sZXwa2eWCs2wrWmSTIOh4x6C6BxP/8fXVIT/qN2 MZ7ywhRlueZiVmU7hFvfRYdsz7wj0AefzUGMDBarGdtjdAzqPLI2b3KJOe1pUrUT9VjOftQcW8BI6 P88axjDcIsfWagbZkBg+1R7CmsgJqKE2vzEfc/d1pfEYZXX0CXfAP4L8A7s3aUuRehsQfmd8AGOOL p0z3RIdA==; Received: from [187.19.173.117] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1rBL2G-004L5c-7n; Thu, 07 Dec 2023 20:31:52 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6A9F2403EF; Thu, 7 Dec 2023 17:31:49 -0300 (-03) Date: Thu, 7 Dec 2023 17:31:49 -0300 From: Arnaldo Carvalho de Melo To: kan.liang@linux.intel.com, ravi.bangoria@amd.com Cc: irogers@google.com, peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, john.g.garry@oracle.com, will@kernel.org, james.clark@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, yuhaixin.yhx@linux.alibaba.com, renyu.zj@linux.alibaba.com, tmricht@linux.ibm.com, ravi.bangoria@amd.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2 0/5] Clean up perf mem Message-ID: References: <20231207192338.400336-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231207192338.400336-1-kan.liang@linux.intel.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, Dec 07, 2023 at 11:23:33AM -0800, kan.liang@linux.intel.com escreveu: > From: Kan Liang > > Changes since V1: > - Fix strcmp of PMU name checking (Ravi) > - Fix "/," typo (Ian) > - Rename several functions with perf_pmu__mem_events prefix. (Ian) > - Fold the header removal patch into the patch where the cleanups made. > (Arnaldo) > - Add reviewed-by and tested-by from Ian and Ravi It would be good to have a Tested-by from people working in all the architectures affectes, like we got from Ravi for AMD, can we get those? I'm applying it locally for test building, will push to perf-tools-next/tmp.perf-tools-next for a while, so there is some time to test. ARM64 (Leo?) and ppc, for PPC... humm Ravi did it, who could test it now? - Arnaldo > As discussed in the below thread, the patch set is to clean up perf mem. > https://lore.kernel.org/lkml/afefab15-cffc-4345-9cf4-c6a4128d4d9c@linux.intel.com/ > > Introduce generic functions perf_mem_events__ptr(), > perf_mem_events__name() ,and is_mem_loads_aux_event() to replace the > ARCH specific ones. > Simplify the perf_mem_event__supported(). > > Only keeps the ARCH-specific perf_mem_events array in the corresponding > mem-events.c for each ARCH. > > There is no functional change. > > The patch set touches almost all the ARCHs, Intel, AMD, ARM, Power and > etc. But I can only test it on two Intel platforms. > Please give it try, if you have machines with other ARCHs. > > Here are the test results: > Intel hybrid machine: > > $perf mem record -e list > ldlat-loads : available > ldlat-stores : available > > $perf mem record -e ldlat-loads -v --ldlat 50 > calling: record -e cpu_atom/mem-loads,ldlat=50/P -e cpu_core/mem-loads,ldlat=50/P > > $perf mem record -v > calling: record -e cpu_atom/mem-loads,ldlat=30/P -e cpu_atom/mem-stores/P -e cpu_core/mem-loads,ldlat=30/P -e cpu_core/mem-stores/P > > $perf mem record -t store -v > calling: record -e cpu_atom/mem-stores/P -e cpu_core/mem-stores/P > > > Intel SPR: > $perf mem record -e list > ldlat-loads : available > ldlat-stores : available > > $perf mem record -e ldlat-loads -v --ldlat 50 > calling: record -e {cpu/mem-loads-aux/,cpu/mem-loads,ldlat=50/}:P > > $perf mem record -v > calling: record -e {cpu/mem-loads-aux/,cpu/mem-loads,ldlat=30/}:P -e cpu/mem-stores/P > > $perf mem record -t store -v > calling: record -e cpu/mem-stores/P > > Kan Liang (5): > perf mem: Add mem_events into the supported perf_pmu > perf mem: Clean up perf_mem_events__ptr() > perf mem: Clean up perf_mem_events__name() > perf mem: Clean up perf_mem_event__supported() > perf mem: Clean up is_mem_loads_aux_event() > > tools/perf/arch/arm64/util/mem-events.c | 36 +---- > tools/perf/arch/arm64/util/pmu.c | 6 + > tools/perf/arch/powerpc/util/mem-events.c | 13 +- > tools/perf/arch/powerpc/util/mem-events.h | 7 + > tools/perf/arch/powerpc/util/pmu.c | 11 ++ > tools/perf/arch/s390/util/pmu.c | 3 + > tools/perf/arch/x86/util/mem-events.c | 99 ++---------- > tools/perf/arch/x86/util/pmu.c | 11 ++ > tools/perf/builtin-c2c.c | 28 +++- > tools/perf/builtin-mem.c | 28 +++- > tools/perf/util/mem-events.c | 181 +++++++++++++--------- > tools/perf/util/mem-events.h | 15 +- > tools/perf/util/pmu.c | 4 +- > tools/perf/util/pmu.h | 7 + > 14 files changed, 233 insertions(+), 216 deletions(-) > create mode 100644 tools/perf/arch/powerpc/util/mem-events.h > create mode 100644 tools/perf/arch/powerpc/util/pmu.c > > -- > 2.35.1 > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel