From patchwork Fri Aug 9 11:53:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13758721 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2048.outbound.protection.outlook.com [40.107.105.48]) (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 6E0CF192B9F for ; Fri, 9 Aug 2024 11:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723204393; cv=fail; b=h5rw9Ee3Aeu8AWIAbivmToRdohILnFMuHVk+vs28pdWpoWc9NOtlCBoI3tHhZBL0npkSZ/QXYBtyAx4GK6apwxq6JJMTfvmEnBOvtswyBrzWy/cNS86oyizPPfUWEwCu9scubqLnbqHpU0OHsUe8Zt4x2268ny0nz/ARAy2MTmo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723204393; c=relaxed/simple; bh=HQ8AfyECOh/+S/crhBu+8AhfCsumaHZrdtWqAelbbUw=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=V/TtXT0W3ec+gnmnPoqwZhDVpc7pc0jILo+9MQqN+qhFdZ3iVD77DXYa9Ey6qBJDodIpVH+5P0DoYaRFXwku6ruNCVaYBskLP7aaQfvSy42fa+k2Q1kqPIswlR9a/MfJ8DLnEwCQL9RKxRyI5Gh5U63upTJr1/oo96KUGAoGULk= 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=SuMkxsJY; arc=fail smtp.client-ip=40.107.105.48 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="SuMkxsJY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yc05byRWrWcdYtVS59XHBFtnV8VbVIa1UL9HLOQZ261Bt+i5DBc03g5npGAmjkb1s7ikGjPD79rqDdBUDujnldGWm3eeQTiPcECxtdWRJ3ulcaujCVOPZnLTkJoEajCA1YnvwwZ+WLm6I3vZcuCFLrkU1fL+sERGNjuvSxnhvCNpW9khhdWGyGKxy4hDZps4eMdOkZMWcBqygSSZa+15JxK1Y+IpZziDBJPVZ6SgDR1/GUrdtmeOEIRDbMjdLYEO+4Bwk6h3KbmT/Wtf58xjaqqLS5xDKKTJG+Zht4N5M74nKQs9BMUrQYEyJt45fJBXSfjO1OzCN5b9GCtCxzDSqg== 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=yW9MWnfurUdzHPYOb6EzrIt7yBfT+VLupPUFcR7X6YI=; b=Zbgx3R60MixD+vKrHeAhP2lhOmiT1cN3NagPkX9/3rjkI1kcjlcn0aetc69CVFPysb+4NyvpUlZHXfc7vngTqmHYsogOMWymOeJbhGoYx70aRdw0I099GqMUvZQieKBreaQ+7zkWOc+PpSK6ThyjGJftS+aMg5cV0fNOp7nPqxBj93MIiAWx/eqEYbZPkgU2F/QdlELpWhF/ePa2671LHjfItrRG+7vWFltWWAXO1NC/HjUA3Rcl802c9vXYdKX0eA5lIkALg2ra97iZgBqT9tY+oN93pPKxx3Dqv3rL8fSf1Fgyc9jstydgajj9GFCC9/VVWpWRfwm2t5r+C08yVg== 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=yW9MWnfurUdzHPYOb6EzrIt7yBfT+VLupPUFcR7X6YI=; b=SuMkxsJYUjhgc7AvMrt7m2i/heQ+XrslCJfGlWKZu76qaxGnMV2tg09Jl2sqR2JKZw4SwiA2JULfI3CiAlzH6iI126ApzoIs/vJMnCK/NlWRVUDtvbuuv8LHAOoHGr3EpyTxT/FBK5PBhzKYDwYBPkSOHUiwrYrAIcid4s1HMfWBPHp3fVTnsTJRZsiZWNPKkb2qEJGB4mCbVQFNYyyjuV4SwGdIZRvWrLqPomfx3SCXNA+wANmKzDJ80egaCyeS9PklMEBjDOHTLmh6pOEZECRtPHFcB5dxht5FT6siQKFeZ1vUs1R51GGh1MtkZbB7/ifo3ghtLJteizaNHGjEpQ== 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 DB9PR04MB8282.eurprd04.prod.outlook.com (2603:10a6:10:24a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13; Fri, 9 Aug 2024 11:53:06 +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.7849.014; Fri, 9 Aug 2024 11:53:06 +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] perf kvm: move HAVE_KVM_STAT_SUPPORT down Date: Fri, 9 Aug 2024 19:53:35 +0800 Message-Id: <20240809115335.540947-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR02CA0110.apcprd02.prod.outlook.com (2603:1096:4:92::26) 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_|DB9PR04MB8282:EE_ X-MS-Office365-Filtering-Correlation-Id: 34df2395-b8d1-4e78-94bf-08dcb869d4a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?U0z0pFs5rMMbH+xRHIcr2QSeDaV9r+i?= =?utf-8?q?O+psKP3unLStALllbZQobTAXmTZaOWV4PbM6qC2eMnBFHrmshK4bnQt8TX04mQE04?= =?utf-8?q?DGDVEZdwAqitb6rqN69XwJR9/hiN3iNqCYSOTp+Awr/pdQRVEm8nui3ZV4IMiYwbM?= =?utf-8?q?zebau3v4OmeiteGNgTwibRsuQBgyKGTuz5SN7TMOOhWouQQnw97eLFqlB27ISy5Dh?= =?utf-8?q?Ya+ND2QSodxvI58Ua7HPsCFQga80S7f9NxQcXFqSDvpxnQT+0BGPmNS/A2IBhdeEd?= =?utf-8?q?WND3eRacqTss8WbOcg1XB65uuhhmpfAJ2I/OjLDkixs3gC3Kf4b/4LZcLjGJHj3V0?= =?utf-8?q?zBxDA/Bs2TVG+fOs7M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9qhkrtlPgg8f3OymG1HJa+PI7v3Z+mTBL7insQCP/qLHY18U?= =?utf-8?q?OVGZwtPNH1MzpXy8BJaLIVrGnrvNbqISpl/clSWmwhoXhV7K2mEdOoFpmK3W/Kak3?= =?utf-8?q?Ue2WH36LSDXSuPfePZKa5g1b8G5Os+z/P/jThkfekyQ25RfEbbojMRk=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)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ANhX0qZwuXyE/55sw2iw49LuQJqL?= =?utf-8?q?GLkOVDWZaN4xWzsI3voWVF066QU4bGqoZeAIKOm7BdjyVCoKEMSCjPgWNHHrLYYGy?= =?utf-8?q?Mg++Uyc010ykALS2JsdBWLP4EV8Z8fCKX85nSYZrbakobCic0L6aKGoplPoXIvMTf?= =?utf-8?q?gSeRef+8z4bci1F9KtI8OMaH0vose+W6OFWFcNqbST978orevFyArdPhyYQgmwJSC?= =?utf-8?q?GX1doiBUn2bxbLvy6znHsaYYivjpR140iVy6PuttTRAY9YlHAbdzuJXQnyLs3nUu3?= =?utf-8?q?vzJl+98SEqAZesT5J/6joQ1M5tqCGDS/nAW8wsy/2YcafcUOpYK3DvUfAej2cXwaS?= =?utf-8?q?N5sLHJ5/mvO2WuzEHLWgPxe0Zh2FV8FquXNbSsBDF4gwMTDGFWJ6JLSNCnRflkkY6?= =?utf-8?q?EB40/2AxYNRLT/FC1S9+fxciT1btRTpVMNXAfcnBLyCzNRudW69bjvQPqBdNn7EL1?= =?utf-8?q?8N7haJ/9GUywZUbkfPFT0biY76ENd1x5zilLR5Ek+U1J/eFszwwaYtCyO/vJ0KrKS?= =?utf-8?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Uu3hmoNUyiVAytJEpcnQNn4NWkqtOAvr4YyemdT0lYtbRmiiCyzD+vypkiH?= =?utf-8?q?Z/xB+8BqEt/2UDuw0fOBxm1InBAXBVL4ojbuy3ClOMrn44D7tI0Yn5x/u25abN8tQ?= =?utf-8?q?GRT6M+k21NDe?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34df2395-b8d1-4e78-94bf-08dcb869d4a3 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 11:53:06.1160 (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: Fb+lMWa68TKOc7tzI8iNH4xrYkG4IPzZy+zNnngZoWgvmoebL8fKFVj5IQQ+YMxHebC/vjEOvb9e68Ph4scFlQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8282 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 "sort.h" for util/python.c. This will try to move HAVE_KVM_STAT_SUPPORT down, so normal header files can be exported to source files on other arch too. Signed-off-by: Xu Yang --- tools/perf/util/kvm-stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h index 3e9ac754c3d1..92f1191cd462 100644 --- a/tools/perf/util/kvm-stat.h +++ b/tools/perf/util/kvm-stat.h @@ -2,8 +2,6 @@ #ifndef __PERF_KVM_STAT_H #define __PERF_KVM_STAT_H -#ifdef HAVE_KVM_STAT_SUPPORT - #include "tool.h" #include "sort.h" #include "stat.h" @@ -13,6 +11,8 @@ #include #include +#ifdef HAVE_KVM_STAT_SUPPORT + #define KVM_EVENT_NAME_LEN 40 struct evsel;