From patchwork Mon Aug 19 02:34:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13767735 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012020.outbound.protection.outlook.com [52.101.66.20]) (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 15F793A8D2 for ; Mon, 19 Aug 2024 02:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.20 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724034813; cv=fail; b=nkr/sAIJdlSV+M3gNpmnAYhxCkFzZe8HXSGJ7lGyZBMyscYDztj69nGFUKHxxblkRa2ZWxutTNMZ3FHop6MpkYJJwx3QCR7LNZ94vK3NeGLmUl53I7R1rf/OJ/S0dTa6NUx3wJRzXDmYp4NzM7fuKjiWe7ofeOIY5nCNHnb2RbQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724034813; c=relaxed/simple; bh=U9tjMWEo1CsENCI2PIKqPz2qTKfiT+GkPRZr7qQlpl8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=m8BsKRgvi63qqeJjPs8vsB2qJ60TQNMbzjFCXGcnU+IgqqxfzBnPZitm51wVTb2ErNlTrJNr4z2tslU9CD6BCThCKTMfechDHZm0Bcpt5MBWD613tzheMRzyHo0TYEX3p4DmEmtt3aNIyDqihILUHwah8iA0pUIQV5582RYPjvE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=bJrdLNuk; arc=fail smtp.client-ip=52.101.66.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="bJrdLNuk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y3mcfydxQ0adFjZwKPYVUdeTf45b3RfhLfH56HaOyV6CKFyP2NZJRm4XPBCTWXDe3GsJAbUDCOd87UDIblQAqGz1j7gCJla6GV9t9L5APyXh4L5n2+9GKi9D2VpdzY9NjWBfvWv0n/4qlL+cSMCNQwtJAQfV5Tg28MAENnpAHA9IWIKi6GtE/M5rKYQTwTrlJNm7KJVMgwMQzwIHkStBLfr74n+SOY8d+URxnmqYUvb6T8Zg4mPjtk77T8jej/XYpZPiqaKJuHARvib+Wrb3QrqlxsTUrzGJSBZzuzNJs+i83f4pDWVeTnln04GFzd+VNfe95F9cgrKZhXuda3Eclg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nd4CNFUpFTDqWQaQbtUoqzUuZh2+8xMVimBLZdG/N9k=; b=QICVQOVZEUtN6hI1OEAp/Z2X9M8ZbMnbdGgcflY3qkBhBtruSHWX521krgXKVTXiY91Z2TRDaWFzDBugmw5iQBwQGeefav4gfuedtt7wRmFzMVRKXPYU/J01PMPcLi1Gy2M/olcWeDX+xUePpvtJvXh4UZxgrb16c7uhFUipq4OnpBFSZpp+HTdsD9H5KX3JR713gNwY3eorWKVGQUTdvf0l7EGbqf6NM4UKRlc2EzE9VpfmPeHDqOK0OT4D3UAB4D39XlnRXFO0OLYp1l0Z3xas1WQPU5uNEijh2hbVA+adi1C/Y3BpUlR5xoFBN5UdUHrb6V7JvYMnGMdH43Njkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nd4CNFUpFTDqWQaQbtUoqzUuZh2+8xMVimBLZdG/N9k=; b=bJrdLNuk9lpFSPWbQ+A9ewtfrdocnQshv3VXQ/NoBn0xNOVNYU2S5/BuCNkWJnakn5IE4ATCzpJbMV/jsrj5cEwRI4Ajxn7GexuYSiWotTJ09s/J13sOdM3nrVfFnz19g9YXSIcSnWQhgMBNpL8k0K75u8GpoWwIJQ4MkbDtVHSjGRddXm8LZXQgWLCpT3mrqaxDC+kmUUga1i8e7vRqbH1ysU7FiH0egzOkRdtnph0z14ng889jljNvknoqPG9kWDpe40L9xlBzbowaFZmn9n5Je570ZSSmTAJLxfHPx1OUU5CwS1ouUAizDTsIpV6VpUgBBB4Cdh6RYuXfFmvBqw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by PAXPR04MB9706.eurprd04.prod.outlook.com (2603:10a6:102:24c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Mon, 19 Aug 2024 02:33:28 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7875.019; Mon, 19 Aug 2024 02:33:28 +0000 From: Xu Yang To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, namhyung@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, kan.liang@linux.intel.com Cc: linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v2] perf python: include "util/sample.h" Date: Mon, 19 Aug 2024 10:34:03 +0800 Message-Id: <20240819023403.201324-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2PR01CA0022.apcprd01.prod.exchangelabs.com (2603:1096:4:192::14) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|PAXPR04MB9706:EE_ X-MS-Office365-Filtering-Correlation-Id: 977a5859-1394-4589-1784-08dcbff74edc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?uCYani1h2HoOZ9jfXuZhzzcwaZDtFWS?= =?utf-8?q?SU/uRU3DH/bowekj82LsgBCyTc3EFo5Zhj2MnofvcDF4mlcEZy0bq0DqWge5+9KvK?= =?utf-8?q?loC2HFZ34aSYBvYh2gcYAVwqpSkKHYmcuFsM00A8e/7xOf9zTWMi7oavmMq+U1oJB?= =?utf-8?q?pk7ZwCAxJLImydAP72u9qzYpOswosVt18n4iDPbgaDTkqqP/NKkNYEnGZ1cfJuM3u?= =?utf-8?q?+NfQvtdUDVN39oonC2lpgF7IhAHuV6aP005T+fp9+5sGwlmZ/kM686yZMGd0SJIvb?= =?utf-8?q?wlA/2KCH8w1El3k1NhKzTF6FOcnVBOJTcNn5LO5P663vS/fGRtEqICvI7wjQluKZn?= =?utf-8?q?Tek0Qmv0SIfGVvGo2EmxdISMDSipyS2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FnW/DtK9d3W7PEcbYHNv5LiZisbex3q0Fbz/0E?= =?utf-8?q?6Po6TVr/JWCt3nTS0WncyGDFu4SsnbZDeM4+uvYSojBxDgu7kevJyqwjUGJPJEtFa?= =?utf-8?q?76XqcE7aC6bNu12pxJ1nvJaaPJWbRWYsw0DGHLNIz/5Bm3qVRZM5nI4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+QQuYruq+o/NBc0iBcdZyaGIyczC?= =?utf-8?q?mS64o6d5konNYjdO3tg5of2O1l623Nn+Bl+FKNwSjHffiH33uUcuniiYyccmxIzQP?= =?utf-8?q?VRTknLZ1H69ZqbsalxlhwVqkM360qj2v4x9OAFFygT8vRjHbTpW5rLDieZ3snOse+?= =?utf-8?q?LHkri2D9n5L1bJ7oPYxDzKXfztr/WwUYJmVevOnEdI0EPM2u+MwRJeqIV6Gu25UQC?= =?utf-8?q?dlmxV/99M9H8EayuVRG1w0iYm9eO+bWW9rt+Yvi0C4a4zDhoZ4MisECDLJDcKD3Mk?= =?utf-8?q?CHrfyC8mRGnYTf8hPOtCOfXq4j6MkrkzjLKOvZ7I2ExANN29TkXbCBQLdHenzwF2R?= =?utf-8?q?gjz+1F42AYgrGaswXW/K+GVI8/Iyx7ecl5w8kssT140Lo6wdf2c3sCP2F3wU15/vK?= =?utf-8?q?M2XVncr3f+wNft/IfkXxaG1nsN5okhB+1WYx8vnQ6HRvl3qewbglwu+uuRMtZ+Hct?= =?utf-8?q?rGxg+7fK66i4Jzq9FBnUSZwA+Olw4H4yCnRp11Mrm4VDU8cIo7taVncgN8unTLp9E?= =?utf-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utf-8?q?mHg69GNYM5FDnvhEgwe4XPw8hLe3pozD22zndAvqu/VUVvW0HQms551qNr8BcCsSQ?= =?utf-8?q?lJ9opMO1IN+cp3S0n5+8iH/gLU0ICWklcWw1DdGH2Y6JVBUPtGst3PV3KwMbS5nfu?= =?utf-8?q?Kip5dguaBuDk?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 977a5859-1394-4589-1784-08dcbff74edc X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 02:33:28.3430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fLD1r/J+AMZyfdQgC6ZNpWvjl9QWSq4eUOlKZ/9UXJWlYDjB2SoQkA7aUsTVGTGcbeRu6HfcWYzFegapR7kMsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9706 The 32-bit arm build system will complain: tools/perf/util/python.c:75:28: error: field ‘sample’ has incomplete type 75 | struct perf_sample sample; However, arm64 build system doesn't complain this. The root cause is arm64 define "HAVE_KVM_STAT_SUPPORT := 1" in tools/perf/arch/arm64/Makefile, but arm arch doesn't define this. This will lead to kvm-stat.h include other header files on arm64 build system, especially "util/sample.h" for util/python.c. This will try to directly include "util/sample.h" for "util/python.c" to avoid such build issue on arm platform. Signed-off-by: Xu Yang --- Changes in v2: - include "util/sample.h" in "util/python.c" --- tools/perf/util/python.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 3be882b2e845..31a223eaf8e6 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -20,6 +20,7 @@ #include "util/env.h" #include "util/kvm-stat.h" #include "util/kwork.h" +#include "util/sample.h" #include "util/lock-contention.h" #include #include "../builtin.h"