From nobody Sat Nov 2 12:21:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 148948268694628.819043314038822; Tue, 14 Mar 2017 02:11:26 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 52106802A5; Tue, 14 Mar 2017 02:11:25 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 427278029B for ; Tue, 14 Mar 2017 02:11:24 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 14 Mar 2017 02:11:23 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.22]) by orsmga005.jf.intel.com with ESMTP; 14 Mar 2017 02:11:22 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,162,1486454400"; d="scan'208";a="75165844" From: Star Zeng To: edk2-devel@lists.01.org Date: Tue, 14 Mar 2017 17:11:20 +0800 Message-Id: <1489482680-28176-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [PATCH] MdeModulePkg DxeCore: Remove unreferenced symbol for memory profile X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Feng Tian , Jiewen Yao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D370 Use GLOBAL_REMOVE_IF_UNREFERENCED for some memory profile global variables, then their symbols could be removed when memory profile is disabled. Cc: Jiewen Yao Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen.yao@intel.com --- MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c b/MdeModulePkg= /Core/Dxe/Mem/MemoryProfileRecord.c index b67a17c86dff..a91a719b4de5 100644 --- a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c +++ b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c @@ -63,11 +63,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DA= TA mMemoryProfileContext }; GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DATA *mMemoryProfileC= ontextPtr =3D NULL; =20 -EFI_LOCK mMemoryProfileLock =3D EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY); -BOOLEAN mMemoryProfileGettingStatus =3D FALSE; -BOOLEAN mMemoryProfileRecordingEnable =3D MEMORY_PROFILE_RECORDING_DISABLE; -EFI_DEVICE_PATH_PROTOCOL *mMemoryProfileDriverPath; -UINTN mMemoryProfileDriverPathSize; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOCK mMemoryProfileLock =3D EFI_INITIALI= ZE_LOCK_VARIABLE (TPL_NOTIFY); +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mMemoryProfileGettingStatus =3D FALS= E; +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mMemoryProfileRecordingEnable =3D ME= MORY_PROFILE_RECORDING_DISABLE; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_PROTOCOL *mMemoryProfileDriv= erPath; +GLOBAL_REMOVE_IF_UNREFERENCED UINTN mMemoryProfileDrive= rPathSize; =20 /** Get memory profile data. @@ -209,7 +209,7 @@ ProfileProtocolRecord ( IN CHAR8 *ActionString OPTIONAL ); =20 -EDKII_MEMORY_PROFILE_PROTOCOL mProfileProtocol =3D { +GLOBAL_REMOVE_IF_UNREFERENCED EDKII_MEMORY_PROFILE_PROTOCOL mProfileProtoc= ol =3D { ProfileProtocolGetData, ProfileProtocolRegisterImage, ProfileProtocolUnregisterImage, --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel