From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 9290A21164C63 for ; Sat, 27 Oct 2018 00:26:48 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Oct 2018 00:26:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,430,1534834800"; d="scan'208";a="244787129" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 27 Oct 2018 00:26:47 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 27 Oct 2018 00:26:47 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 27 Oct 2018 00:26:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.117]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.199]) with mapi id 14.03.0415.000; Sat, 27 Oct 2018 15:26:44 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Rollback Filter out unused structure pcds Thread-Index: AQHUbTkS9mz1coFpN0SQd4a4MW5TiaUyslZQ Date: Sat, 27 Oct 2018 07:26:43 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E360721@SHSMSX104.ccr.corp.intel.com> References: <20181026143452.25036-1-bob.c.feng@intel.com> In-Reply-To: <20181026143452.25036-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTI0OWU3YzctYWQzNy00YWI4LWE5Y2UtOGVjYTgzMzkwNDNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVUpNS2R4QXdDSlduUVQyVENhdFUrbVJkYnVMaDNrdHZOanlhcjROMTZiMVdBa25QRTdtcUU3UUxSbWlXTFwvSkwifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Rollback Filter out unused structure pcds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 07:26:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Feng, Bob C > Sent: Friday, October 26, 2018 10:35 PM > To: edk2-devel@lists.01.org > Cc: Feng, Bob C ; Gao, Liming > Subject: [Patch] BaseTools: Rollback Filter out unused structure pcds >=20 > This reverts commit 51d17bb7b0da0d9c9e91c226f1982d7020f43795. > commit 51d17bb7b0da0d9c9e91c226f1982d7020f43795 adds new check > of Pcds in the platform unused library INF files. > It breaks the existing platform. > To avoid the impact, roll back this change first. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob C Feng > Cc: Liming Gao > --- > .../Source/Python/Workspace/DscBuildData.py | 19 ------------------- > 1 file changed, 19 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTool= s/Source/Python/Workspace/DscBuildData.py > index 9882a36df8..6d596b2b54 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -280,11 +280,10 @@ class DscBuildData(PlatformBuildClassObject): > self._RFCLanguages =3D None > self._ISOLanguages =3D None > self._VpdToolGuid =3D None > self._MacroDict =3D None > self.DefaultStores =3D None > - self.UsedStructurePcd =3D None >=20 > ## handle Override Path of Module > def _HandleOverridePath(self): > RecordList =3D self._RawData[MODEL_META_DATA_COMPONENT, self._Ar= ch] > for Record in RecordList: > @@ -1468,11 +1467,10 @@ class DscBuildData(PlatformBuildClassObject): > if str_pcd_obj.Type in [self._PCD_TYPE_STRING_[M= ODEL_PCD_DYNAMIC_HII], > self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX_HII]]: > str_pcd_obj_str.DefaultFromDSC =3D {skuname:= {defaultstore: > str_pcd_obj.SkuInfoList[skuname].DefaultStoreDict.get(defaultstore, str_p= cd_obj.SkuInfoList[skuname].HiiDefaultValue) for defaultstore > in DefaultStores} for skuname in str_pcd_obj.SkuInfoList} > else: > str_pcd_obj_str.DefaultFromDSC =3D {skuname:= {defaultstore: > str_pcd_obj.SkuInfoList[skuname].DefaultStoreDict.get(defaultstore, str_p= cd_obj.SkuInfoList[skuname].DefaultValue) for defaultstore in > DefaultStores} for skuname in str_pcd_obj.SkuInfoList} > S_pcd_set[Pcd] =3D str_pcd_obj_str > - self.FilterStrcturePcd(S_pcd_set) > if S_pcd_set: > GlobalData.gStructurePcd[self.Arch] =3D S_pcd_set > for stru_pcd in S_pcd_set.values(): > for skuid in SkuIds: > if skuid in stru_pcd.SkuOverrideValues: > @@ -1564,27 +1562,10 @@ class DscBuildData(PlatformBuildClassObject): > elif TAB_DEFAULT in pcd.SkuInfoList and TAB_COMMON in pc= d.SkuInfoList: > del pcd.SkuInfoList[TAB_COMMON] >=20 > map(self.FilterSkuSettings, [Pcds[pcdkey] for pcdkey in Pcds if = Pcds[pcdkey].Type in DynamicPcdType]) > return Pcds > - #Filter the StrucutrePcd that is not used by any module in dsc file = and fdf file. > - def FilterStrcturePcd(self, S_pcd_set): > - if not self.UsedStructurePcd: > - FdfInfList =3D [] > - if GlobalData.gFdfParser: > - FdfInfList =3D GlobalData.gFdfParser.Profile.InfList > - FdfModuleList =3D [PathClass(NormPath(Inf), GlobalData.gWork= space, Arch=3Dself._Arch) for Inf in FdfInfList] > - AllModulePcds =3D set() > - ModuleSet =3D set(self._Modules.keys() + self.LibraryInstanc= es + FdfModuleList) > - for ModuleFile in ModuleSet: > - ModuleData =3D self._Bdb[ModuleFile, self._Arch, self._T= arget, self._Toolchain] > - AllModulePcds =3D AllModulePcds | set(ModuleData.Pcds.ke= ys()) > - > - self.UsedStructurePcd =3D AllModulePcds > - UnusedStruPcds =3D set(S_pcd_set.keys()) - self.UsedStructurePcd > - for (Token, TokenSpaceGuid) in UnusedStruPcds: > - del S_pcd_set[(Token, TokenSpaceGuid)] >=20 > ## Retrieve non-dynamic PCD settings > # > # @param Type PCD type > # > -- > 2.18.0.windows.1