From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>
Subject: Re: [PATCH] MdeModulePkg PiSmmCore: Remove unreferenced symbol for SMRAM profile
Date: Wed, 15 Mar 2017 06:59:36 +0000 [thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A904ED6@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1489482701-94868-1-git-send-email-star.zeng@intel.com>
Reviewed-by: jiewen.yao@intel.com
> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, March 14, 2017 5:12 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tian,
> Feng <feng.tian@intel.com>
> Subject: [PATCH] MdeModulePkg PiSmmCore: Remove unreferenced symbol for
> SMRAM profile
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=370
>
> Use GLOBAL_REMOVE_IF_UNREFERENCED for some SMRAM profile global
> variables,
> then their symbols could be removed when SMRAM profile is disabled.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Feng Tian <feng.tian@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c | 18
> ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
> b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
> index dda9f12a7dcd..410e0836fd16 100644
> --- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
> +++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
> @@ -1,7 +1,7 @@
> /** @file
> Support routines for SMRAM profile.
>
> - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be
> found at
> @@ -77,11 +77,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED
> MEMORY_PROFILE_CONTEXT_DATA mSmramProfileContext =
> };
> GLOBAL_REMOVE_IF_UNREFERENCED MEMORY_PROFILE_CONTEXT_DATA
> *mSmramProfileContextPtr = NULL;
>
> -BOOLEAN mSmramReadyToLock;
> -BOOLEAN mSmramProfileGettingStatus = FALSE;
> -BOOLEAN mSmramProfileRecordingEnable =
> MEMORY_PROFILE_RECORDING_DISABLE;
> -EFI_DEVICE_PATH_PROTOCOL *mSmramProfileDriverPath;
> -UINTN mSmramProfileDriverPathSize;
> +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mSmramReadyToLock;
> +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mSmramProfileGettingStatus
> = FALSE;
> +GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN
> mSmramProfileRecordingEnable = MEMORY_PROFILE_RECORDING_DISABLE;
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_PROTOCOL
> *mSmramProfileDriverPath;
> +GLOBAL_REMOVE_IF_UNREFERENCED UINTN
> mSmramProfileDriverPathSize;
>
> /**
> Dump SMRAM infromation.
> @@ -232,7 +232,7 @@ SmramProfileProtocolRecord (
> IN CHAR8 *ActionString OPTIONAL
> );
>
> -EDKII_SMM_MEMORY_PROFILE_PROTOCOL mSmmProfileProtocol = {
> +GLOBAL_REMOVE_IF_UNREFERENCED
> EDKII_SMM_MEMORY_PROFILE_PROTOCOL mSmmProfileProtocol = {
> SmramProfileProtocolGetData,
> SmramProfileProtocolRegisterImage,
> SmramProfileProtocolUnregisterImage,
> @@ -2630,7 +2630,7 @@ typedef struct {
> CHAR8 *String;
> } ACTION_STRING;
>
> -ACTION_STRING mExtActionString[] = {
> +GLOBAL_REMOVE_IF_UNREFERENCED ACTION_STRING mExtActionString[] = {
> {MEMORY_PROFILE_ACTION_LIB_ALLOCATE_PAGES,
> "Lib:AllocatePages"},
> {MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RUNTIME_PAGES,
> "Lib:AllocateRuntimePages"},
> {MEMORY_PROFILE_ACTION_LIB_ALLOCATE_RESERVED_PAGES,
> "Lib:AllocateReservedPages"},
> @@ -2654,8 +2654,6 @@ ACTION_STRING mExtActionString[] = {
> {MEMORY_PROFILE_ACTION_LIB_REALLOCATE_RESERVED_POOL,
> "Lib:ReallocateReservedPool"},
> };
>
> -GLOBAL_REMOVE_IF_UNREFERENCED CHAR8 mUserDefinedActionString[] =
> {"UserDefined-0x80000000"};
> -
> typedef struct {
> EFI_MEMORY_TYPE MemoryType;
> CHAR8 *MemoryTypeStr;
> --
> 2.7.0.windows.1
prev parent reply other threads:[~2017-03-15 6:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 9:11 [PATCH] MdeModulePkg PiSmmCore: Remove unreferenced symbol for SMRAM profile Star Zeng
2017-03-15 6:59 ` Yao, Jiewen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74D8A39837DF1E4DA445A8C0B3885C503A904ED6@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox