Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7104671rdb; Fri, 15 Dec 2023 19:30:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGF4YpVV7DqxrkGdwdWSAOxV6m0w83YsuLQ7mybJMNj/en0hzcDxOoJ/RgQN211TGFkNJPs X-Received: by 2002:a05:6402:222b:b0:54f:47df:269f with SMTP id cr11-20020a056402222b00b0054f47df269fmr7001218edb.58.1702697448882; Fri, 15 Dec 2023 19:30:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697448; cv=none; d=google.com; s=arc-20160816; b=cT/A55ficQR6pNAJCwYs6OYSC0/UORc8qrOTj6C5ZHco0Srk0H+udsls/Ki+2mnuPf ON9Ed2531B9RPZNNW7tlzY6lI5SZPa5UzYzby4fv9t4dhD9goDLGqAO9mW3SCjG1IgLd aeBqbD4CF0LK0GP6L34w1wfjvooNPOD6TJRbc1sknnYpk96YWbMj08u2o/Dx4KmdO0nB Owv80IEKb1KpBgQtjwkq7l6vXz1PZq7lShT1ZVlbQU/hC65EgOZRuc0sMWg6/mEtTO1D lE0N8jFmHnE+K36+7GXq4ZYOjtFEU0JPNJMRdsySSQJrOyZWIOq/kNPBzUIEjy3wDPRH M7GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aEQ/QfzWe41WSMz22CzSA9GVF90SoiyHigHSMZ63aNY=; fh=JxmPmU2ZV6N422sfdlTJtwUY4OUy32Kp080/ieYM8Fo=; b=c1ClT1rJvyB7V/HIZULBFzs5eCR+jnmTQ2p3ZG1LKTJWdy3m3JgZqPKBiSvG4HH2AS HaBkSCOd0DOJ4+P39JRve+oc7kNGdgR8eUfx7u1DK9EU8GPwdFUFEg2t/eRkqG1T7tlk t2lcDG8iavSQ7/5ydN3e1tgufIaeilFGYO2ZTgX0LPSWWDNUeJahIEdN9ZP0OHU3P+Vu z2Z15abmt7ESqxedtqg6W4CKVXPS+Hrk33kotZiQzhT6zDZnkwutP1mX581QLaRblNQ9 /+8mBl5LTMrratX9MwAYhu2BarmvTgRBHi56Jnr9lPOoOhLc5zZegBUsP9Q59jkNB27k ZQmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qIFSSaBi; spf=pass (google.com: domain of linux-kernel+bounces-1999-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h3-20020a056402280300b0054ca260d79asi8012053ede.248.2023.12.15.19.30.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:30:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1999-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qIFSSaBi; spf=pass (google.com: domain of linux-kernel+bounces-1999-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 77EEB1F25A61 for ; Sat, 16 Dec 2023 03:30:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D94865387; Sat, 16 Dec 2023 03:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qIFSSaBi" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D61A4DDDB for ; Sat, 16 Dec 2023 03:30:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6ce939ecfc2so1242982b3a.2 for ; Fri, 15 Dec 2023 19:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702697402; x=1703302202; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aEQ/QfzWe41WSMz22CzSA9GVF90SoiyHigHSMZ63aNY=; b=qIFSSaBiVlGzzW+MAdxf0MggRhjZuUQFJBAm6M58NqiakE2F8ytOoaUfCloR7YICi+ q9Vh/AiPjCNgOXf2NmiRUqS0huaepZCEh/GBbYoG99Iz4nVdRU6r/DJrZ7S8fCNQkUJu WgZxDyYMBAtAlmRWSRwndyhDEFWzqb4j73Hqks8tN1jaOhJaTrbnp3KotYS05kTv+wCe aMJxHq+6CUBEUUJnlxtEw8A+/mu2QOX3eC9McpTOVWcEREI/dkJ80wkEtu2Ge0aifDOz FFKFSqpthYXsplK6RGq4hG8VWOJPhAjrQH8rZ6P0NuCecYc3asVXZW7tosWBSibH4tFK Hmeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702697402; x=1703302202; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aEQ/QfzWe41WSMz22CzSA9GVF90SoiyHigHSMZ63aNY=; b=cDZbkj/D/Fht+i+Jz/qC/pzB/O4TZWUltaLGyHHWlPm/n1eICd7G9IzvjtPSLqPMHZ XuW4b4KtbX2vOecXcrTncFivTKESBBPK2A9U08zfiNw1E298HkPqE+LLixEGUkXdYiG9 22EzoYinkjJwxG2C6kSeDSU1dHInRI+Cn011/zy3SLEHFcEjlyQNrUQ5ePnP84hnQfrl HvRr3bLvotRjT12mY5Tod4Fwc2OxTYX6QvlZ7CVe658yfYDZvHB4MMrLHC49NYRfQj+Y 9hmC7Fqsu0WJ1MirnDSJrSqSkE7fZW1p76dNfeglyQWJRf9euJvOuYXH7iodA7gFbAkU SidQ== X-Gm-Message-State: AOJu0YwNA2DdQTUYbACK/Ql9BOr+/JNMux4+QWH7VhmxDVCZUREY+O8F JlQccNOLrMho+IBbt8KiEvdc4rC0LyIDV7S7BbQECw== X-Received: by 2002:a05:6a20:b2a3:b0:193:fc0b:deb4 with SMTP id ei35-20020a056a20b2a300b00193fc0bdeb4mr1239813pzb.32.1702697401801; Fri, 15 Dec 2023 19:30:01 -0800 (PST) Received: from leoy-huanghe.lan (211-75-219-200.hinet-ip.hinet.net. [211.75.219.200]) by smtp.gmail.com with ESMTPSA id t20-20020a056a00139400b006cd88728572sm14165680pfg.211.2023.12.15.19.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:30:01 -0800 (PST) Date: Sat, 16 Dec 2023 11:29:52 +0800 From: Leo Yan To: kan.liang@linux.intel.com 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 Subject: Re: [PATCH V3 0/7] Clean up perf mem Message-ID: <20231216032952.GI86143@leoy-huanghe.lan> References: <20231213195154.1085945-1-kan.liang@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213195154.1085945-1-kan.liang@linux.intel.com> 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. This patch series is fine for me: Reviewed-by: Leo Yan I only compiled successfully it on my Arm64 machine but don't test it due to I have no chance to access a machine with Arm SPE. James, could you test it? Thanks a lot! > 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