Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp341474rdd; Tue, 9 Jan 2024 06:03:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzPwcC1Co+51xYtlvQRi8Uy35DaG65dsW643/UK0j/Iarx0CZ2+YVK0RSjKCsCuU/p+1zG X-Received: by 2002:aa7:c606:0:b0:554:2359:51b2 with SMTP id h6-20020aa7c606000000b00554235951b2mr2356315edq.66.1704808984040; Tue, 09 Jan 2024 06:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704808984; cv=none; d=google.com; s=arc-20160816; b=NoXhEHajf3DQCLHKKzIsXELpmS1TgFjZaYia6veynbbZXP19xyCzcoenWcLuPY8R9U 5p7ZlZ0mOIyBf2E92WqqmwcueA7SKxsFNPKGy65Ls4ObuPHFrxE5tHRu4/PuWbpx+uYc 42DrPNE42RqBo66opjSnvOhaZGfhzNS7ar0aXQa9UbUDQ7MLH9mSdDbZBIbhfzL7mx1i 1nJCRYZX6tV+ORZHWANGlUYsF0Ki2ZCc2UDokSrtoeCiG3jpnMnAlullB3NSEFKIg0if 4JDUlFNUhW7rqJ/l4qZGG8nwJlTsWUqcvzgV24boNU/wA8uXqLBh19HIOiKeaeDZw2or veXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=FB9hcKfV9abQXcry8nOeNrz9kPJIF/HPU/V9p/coYBA=; fh=XgPQCCABZ+3SvjEZjbW4teWoLyeopid3H/VXnB2t6gw=; b=Ni+00qo1ABcmdyisMh/c157WSG/4XxjAcTektrvCvlVv3yEEbf+4koFp1H3Do8yF0f irOGniZPMCtPHonkhQP3+nBLQMLmh40ip7VWJus7NBMt8MVly7pLYfinOQo04X01KWBW nn2/bEGmC2Kp1IeZIIe7nsQV6EjY+yzxG/J0PpRQo+JrwgVWsXXfL3Mx0uqsf/Yz6xo/ to8QqxYGrhSjTTruoxI91MxnltdIV6lec6FFwJl/nFrMWOcRrdSEHVmXsPBMjcNMklze xZgp67FeXCQwvAC9TQ45Zr7TPHCAV9wYsPvMCiGpNsOEcyIS8qHhIKmp5DmKrc/94b43 dIsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=laJdzEYA; spf=pass (google.com: domain of linux-kernel+bounces-20939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t3-20020a50d703000000b005582371376bsi226848edi.301.2024.01.09.06.03.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:03:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=laJdzEYA; spf=pass (google.com: domain of linux-kernel+bounces-20939-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ACE271F21E80 for ; Tue, 9 Jan 2024 14:03:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 789713A1AA; Tue, 9 Jan 2024 14:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="laJdzEYA" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F344639FF9; Tue, 9 Jan 2024 14:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704808912; x=1736344912; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=QRtm/mna3beZbvd3P0MsywkRDxcn22Ksxbb0Rs/W1hw=; b=laJdzEYA/Kws7iwVoY5jCZC7EPi5DDiIR7Cf02PhK4kIrqppI5WKraHv skeKcjliiRUCmenGhQswBuGJGuDNlViALWmLKnXlTc9AeyVZMpvRmmRyt eeaaDWtMTMHzuwg9nHLsJYrb0md+kxEbe1AyTBx23hVCIWY6KzdB0Exoo O/kueysFZy+cbUu4bWjIQcrhH8Stjm4Ft/XHx/OWDLqlvVjCo2MQnLUYo PLvFW5JG1nmwTWCGndLH+yU1eJNXPTiy3+c865Snkx5zY3KLv2zomm57y 6LlsW2TaZ7mcN55k2IHm4zP9xvx2fCrTQNgww4+ATufsrMdyNploOEMvS A==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="5570616" X-IronPort-AV: E=Sophos;i="6.04,183,1695711600"; d="scan'208";a="5570616" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 06:01:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,183,1695711600"; d="scan'208";a="23577791" Received: from linux.intel.com ([10.54.29.200]) by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 06:01:50 -0800 Received: from [10.212.123.48] (unknown [10.212.123.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id B6C84580D28; Tue, 9 Jan 2024 06:01:47 -0800 (PST) Message-ID: <1417fcb1-4d16-481b-b043-acf022de07fd@linux.intel.com> Date: Tue, 9 Jan 2024 09:01:46 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 0/7] Clean up perf mem To: Leo Yan Cc: acme@kernel.org, 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, yuhaixin.yhx@linux.alibaba.com, renyu.zj@linux.alibaba.com, tmricht@linux.ibm.com, ravi.bangoria@amd.com, atrajeev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20231213195154.1085945-1-kan.liang@linux.intel.com> <20240107040740.GA888@debian-dev> Content-Language: en-US From: "Liang, Kan" In-Reply-To: <20240107040740.GA888@debian-dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-01-06 11:08 p.m., Leo Yan wrote: > On Wed, Dec 13, 2023 at 11:51:47AM -0800, kan.liang@linux.intel.com wrote: > > [...] > >> 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 > > After applying this series, below tests pass with Arm SPE: > > # ./perf c2c record -- /home/leoy/false_sharing.exe 2 > # ./perf c2c report > > # ./perf mem record -e list > # ./perf mem record -e spe-load -v --ldlat 50 > # ./perf mem record -v > # ./perf mem report > # ./perf mem record -t store -v > # ./perf mem report > > Tested-by: Leo Yan > Thanks Leo. Kan