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 582EEC52D6F for ; Thu, 8 Aug 2024 12:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CRibQBk7k0a6F5zBdVaH76jKc3M+/8AmSZsfzVNSj/s=; b=GPcE7jQ04nb797wXrjUeHrDl8b sZOB2zFrDe7mAnrZCrgisCADfo+GRjSwFAzF6vVWIcTa+bZJHntlVVWE4f4/rlkhlZ1KwPA4aT7Lv QihbD83M+vQBV2juuCQ20oEeTfAIR4tyCFk8jCk1f+ofdcGl7HOaaa+zgzpFRVxv0y5M4xLhROn8z 6EFjsfA2IaPAMWsUWAKidrGynPCB99O6zLZbfzKrltTJTASJeqri2MzWASd3LxgQ3a1JfCjskcB9x DEjxQUmfuVEyTq8M5vuDOct4MKHs6Eh5818O+xhEyhbO9B0O3IOqfWtYP1SfBjFXPqHwqTehv0m1v kB6m8vhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sc2jy-00000008Izs-0lG0; Thu, 08 Aug 2024 12:59:38 +0000 Received: from mgamail.intel.com ([198.175.65.16]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sc2jF-00000008Imr-0VhH for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 12:58:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723121934; x=1754657934; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=dIM5pe6dJVWepwtYqZwe6PPCHnYS8ixi+Xg2xmV2vWE=; b=Lla4Fsz869ynnxOGDuBmmPbVeIN+D5PY3IQ6oEa3DsYBG1DLbRv+9225 Qrapj3aHRmM3n5Vj9TiJtujYassJj4RC+k3Wvu83zh1WFi18PNJaWPNEm hZ0EPpi6w9Xkw2b/Gj9IZcQdnuesQK8LXaWQvs9K6FbexAP9+4MjGmOLX zlQl78oyP9k9C9H+c9U0lo6WtNKfZAB8IbWbGrl/Z76+vSmjgUft3wgG5 fsSy80DzdQwSWI7RCH9dbdk59206ooVcw1XoMW16p/PrRnA69YhxfIhNA kwF2rbEKGIT0i6uhx+bMdef+OyeTEQ9O8x+c7qjAdZlyvXyiSc+Tz7mvO w==; X-CSE-ConnectionGUID: duyaxxspSyaPsfSV2jOxPQ== X-CSE-MsgGUID: IWSVsGkkTcuSXrKcCLeKEQ== X-IronPort-AV: E=McAfee;i="6700,10204,11158"; a="21397019" X-IronPort-AV: E=Sophos;i="6.09,273,1716274800"; d="scan'208";a="21397019" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2024 05:58:50 -0700 X-CSE-ConnectionGUID: o/0DktMBTpGFNfilrohghg== X-CSE-MsgGUID: 8SAfMfDZTniD2qCKQDZlRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,273,1716274800"; d="scan'208";a="57131628" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.245.150.149]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2024 05:58:45 -0700 Message-ID: <1059261e-9d1c-472e-a211-f83c313eb5c2@intel.com> Date: Thu, 8 Aug 2024 15:58:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 3/9] perf auxtrace: Refactor auxtrace__evsel_is_auxtrace() To: Leo Yan , Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , James Clark , Suzuki K Poulose , Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Liang, Kan" References: <20240806204130.720977-1-leo.yan@arm.com> <20240806204130.720977-4-leo.yan@arm.com> Content-Language: en-US From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20240806204130.720977-4-leo.yan@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_055853_237034_D2EDF26D X-CRM114-Status: GOOD ( 10.09 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 6/08/24 23:41, Leo Yan wrote: > The auxtrace__evsel_is_auxtrace() function invokes the callback > .evsel_is_auxtrace() to check if an event is an AUX trace. In the > low-level code, every AUX trace module provides its callback to > compare the PMU type. > > This commit refactors auxtrace__evsel_is_auxtrace() by simply > calling evsel__is_aux_event() rather than using the callback function. > As a result, the callback .evsel_is_auxtrace() is no longer needed, so > the definition and implementations are removed. evsel__is_aux_event() assumes it is on the target machine e.g. being called from perf record. It indirectly reads from sysfs to find PMUs, which will not necessarily be the same a different machine. For example, what happens if a perf data file from one arch is being processed on a machine from another arch.