From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 ECE5D803D5 for ; Tue, 14 Mar 2017 23:59:27 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 14 Mar 2017 23:59:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,167,1486454400"; d="scan'208";a="1122717781" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 14 Mar 2017 23:59:27 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Mar 2017 23:59:27 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 14 Mar 2017 23:59:27 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 15 Mar 2017 14:59:25 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Tian, Feng" Thread-Topic: [PATCH] MdeModulePkg DxeCore: Remove unreferenced symbol for memory profile Thread-Index: AQHSnKL62mEB0sbfrkOlgB2t4dJDX6GVeg1Q Date: Wed, 15 Mar 2017 06:59:23 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A904EC8@shsmsx102.ccr.corp.intel.com> References: <1489482680-28176-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1489482680-28176-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Wed, 15 Mar 2017 06:59:28 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Tuesday, March 14, 2017 5:11 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen ;= Tian, > Feng > Subject: [PATCH] MdeModulePkg DxeCore: Remove unreferenced symbol for > memory profile >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D370 >=20 > Use GLOBAL_REMOVE_IF_UNREFERENCED for some memory profile global > variables, > then their symbols could be removed when memory profile is disabled. >=20 > Cc: Jiewen Yao > Cc: Feng Tian > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > 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_DATA mMemoryProfileContext > }; > GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DATA > *mMemoryProfileContextPtr =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_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY); > +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN > mMemoryProfileGettingStatus =3D FALSE; > +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN > mMemoryProfileRecordingEnable =3D MEMORY_PROFILE_RECORDING_DISABLE; > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_PROTOCOL > *mMemoryProfileDriverPath; > +GLOBAL_REMOVE_IF_UNREFERENCED UINTN > mMemoryProfileDriverPathSize; >=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 > mProfileProtocol =3D { > ProfileProtocolGetData, > ProfileProtocolRegisterImage, > ProfileProtocolUnregisterImage, > -- > 2.7.0.windows.1