From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.4160.1647665601323553016 for ; Fri, 18 Mar 2022 21:53:21 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=n5ycdlDo; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647665601; x=1679201601; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=o2d9Sim8fJfIlXrZAsl+CufNXvkE6SMkIsp12Hv26RA=; b=n5ycdlDo/QtVtrtxYnxTLUdihLuGxBwyMF2s8++SF528hNOBQUyVtBYW +iJJ4thAS/4dlPGp6dkdG1cZdZNjZOFXc/X2epEz0GtZ+yWqpy48HaTK5 5CN6eZ4CyEYXV1o9/1DlOTeeUKWRS0yO+x5WJ/TWIqJZOyKw9CcO+TKjv ejYKIXj/Om8LZdoR/ihZnjvovnE3RorVkCB75wpQ8iOiXNTNUH3gl/T+Y 5nHxLio8FKuY60HsxsE6JYDj1rRFs6QZe6vZgg5honuF7OcmNTZ0acEzp mbm0nLtowLRo4pkG3gQtsU5QAYchcuMFLtggBYNi+Jdhkkly5Qs2L14LA A==; X-IronPort-AV: E=McAfee;i="6200,9189,10290"; a="256095816" X-IronPort-AV: E=Sophos;i="5.90,192,1643702400"; d="scan'208";a="256095816" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2022 21:53:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,192,1643702400"; d="scan'208";a="517552730" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP; 18 Mar 2022 21:53:19 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Mar 2022 21:53:18 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Fri, 18 Mar 2022 21:53:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Fri, 18 Mar 2022 21:53:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kX79XEYukKqkmTsWNSruLtkcvIjp496pxidJFE+MWQgu7QEgqOPteMKrMDPwxAfsI6vQ57ZOuoVTPNbUDzEvRsH1LSRp9k2baq1PeNqwIfcQ3rTy85WbXtuuZzEmsUH4eZpAe4Z1ydRq7ixfbILBo5C8PK45nPur8ODhFrFWeoRmLI4+ZjN8Otx4q/a3hEmSw6xuRZFndVQ0uxKs5H5OVMJpAylr4CzHlaK8B5KWGHKT0FKZ3ra9X42s2qc1F+JUhepGfY13x2Y07MEkeqJoe4rW4Y80Mq8TifoaIRpyt9C0tFyurbFa6GO7U6MGXx+LWFsxOqLuF6hrfMqGUxp3rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+maeIMwC7Nt4xheYCaAcrvJGWItB7gtkH2hAJIg+T8E=; b=PiO1RTbibD95kOS6l/8eRw+z5fjUHPMWTgmNAdfZOM1JN1fqdBiycMEY9SujlM+wIPLrTVbP+t5BZjOSrRJ5X+e8uPUX2qka+XEkX/+ISOQOgn7erufVqgAPo04X0aHzzLUBwa1uOEnQY9/C3iSsEcIr4xihsPOZYheEDcpPTv+C6o1TKKy7fJd6GbxG/QH6lSGdnP44AA8U1ulGjtJP1crZcnuX/Ok7kHpINC9SvWKSCgSIHMRBJdPuN1NN3o2fzA6//QOR4NreQsC1Zswv8KeHpTauuQoCp6WnS+yLbLaIjBV8zm0CZXpCOoNr/xG4bMsGUNDbfSNrWz6OOAXHmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by DM5PR1101MB2251.namprd11.prod.outlook.com (2603:10b6:4:53::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.15; Sat, 19 Mar 2022 04:53:16 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::e5:8ef1:3d8:874]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::e5:8ef1:3d8:874%9]) with mapi id 15.20.5081.017; Sat, 19 Mar 2022 04:53:16 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Feng, Bob C" CC: "Gao, Liming" , "Chen, Christine" , "Chiu, Chasel" Subject: Re: [edk2-devel] [Patch] BaseTools: Remove the redundant __FLEXIBLE_SIZE from PcdValueInit.c Thread-Topic: [edk2-devel] [Patch] BaseTools: Remove the redundant __FLEXIBLE_SIZE from PcdValueInit.c Thread-Index: AQHYOGamaNkugNKkRUmbudPOuALb3azGKX+Q Date: Sat, 19 Mar 2022 04:53:16 +0000 Message-ID: References: <16DC8D09AF8EE7BD.28363@groups.io> In-Reply-To: <16DC8D09AF8EE7BD.28363@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b20e2d0b-ed95-4ef8-b84c-08da09646179 x-ms-traffictypediagnostic: DM5PR1101MB2251:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /F5iRmyIpiiKyVIl6fqV/PGBw4PFGr5kjk/mBWzCfkWDTOBWLujiKHyLQIL23HV6HE4AtlUidxK1+J9agiuBevAle1688aI+71O32TXN6IY10x04U0e4ofn0Tae1S7abTr/X+HTDufJiVhVOv5Z/VnMkYgGIdQNcm8CCUC6XXQu1k7YANzEO9UAAZJPyihwtn525wv4S2DuMkZMH2DEIgPXuWoiJJLZ8V53QjzXrttHDNgjnphcB1h1AZN+zpMJxrobXfta9o0Op8eruAnGY3ZBR8dxyvU21vm6XCgRePg5Yroj0rt6g1Mlj5aVSjELvI290YdaZrJELLLQdiWNlCiT039iAjCzE9xdIBcCo+QS9zRhRogn7f5nTrMnJIyyFNiFWGR9DDXvG1Sh1hlPb5gsZfx+tzyo0jQvbj85TakBzTSXBcmkKIGL4Lm7fwvUO5e1+nkKjHzscIcLjrGeOQT2muyfxq+8S5MsjELApe4TdY7FeVeEbthI/aW4BP6Tgx1fTPqGUzpzhQ2zmQS1dFHksx0QKqeo1jiclA8pGMdKdSycqlLz1mWj9Mzzx12qHerKEE4GDSdgNuqMgnRnE5/Rmk8dpF2G+sDX845sPGqwEqKBcUtHihEGGgMOUs9aEZ8DHf7mNw7Dc+wdRckOLDjWgoFLo5sTM0VZFF8DRnV7QRF4HhoNhLxvWZA2cF1xjRaUnClVnW+FctGTYldrbI2bzZKc91pTmcXYyHKmLDzoSdeoh7z+jnzDwJu7NkBYRxNGi8VUoQlF9ZeAHsEnT/HwoxpPMqa+yk5rsCfG5FAaEpobuXNRQ3A5izW3nRIjKooYiXjVz7pgj2pra5UGNcA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(86362001)(82960400001)(508600001)(38070700005)(122000001)(38100700002)(8676002)(4326008)(966005)(186003)(64756008)(66446008)(66476007)(76116006)(52536014)(66556008)(110136005)(54906003)(316002)(71200400001)(26005)(66946007)(107886003)(33656002)(53546011)(9686003)(2906002)(8936002)(6506007)(7696005)(5660300002)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qANdXKDdbE2/TDY9f0Fqvch/QLs2/wQh/YmYKJVjhd+f8RicQ2E73mzbGJw0?= =?us-ascii?Q?J2hcmrifSTc5WkXbrxgfZQerim0as0tE5Z8e3UWgcrL7U/AUOcaLCOPwFU1e?= =?us-ascii?Q?fYvDTSjsWd/csavDDqHc37UcW5r24dPho6rWxF2nDtFsg4Gx+MDVCgTLRhXX?= =?us-ascii?Q?puJcjsXPr0QrIOL1/toZDtBbuLHpKhTIVnMzflyYM0qgr/WFa7cVYZsQ8+oa?= =?us-ascii?Q?kqdri+eJFKZK8kBB0+Jd1cFp1XF7rXCrkakO9FLvCUmUuDquOJr/Un57Oaqc?= =?us-ascii?Q?YoVUDmGjEzRkE7Fw6tS0P9bdbbKx1O8biMWFQpDZtfTX03Uf4xjgvs6GsCgY?= =?us-ascii?Q?aR3zSsKySAM7zd7Gc4FepIyTY+XW6UTsqw1CXpUBgUSYZJ4vTh4tYXvmJa3c?= =?us-ascii?Q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P+kt8H9clnb3RjVZxP8C?= =?us-ascii?Q?yLo3vStzs99aqz/mb5Fou1jVHZZ0uZCi8t9fp22tUfOTaOmero3WskKiYW1B?= =?us-ascii?Q?cB0OZsleaeMiiTetZ2/0LLeoZLDfyQsoUTWu5LTMRcTRapBGYu0xdA32GgQ4?= =?us-ascii?Q?IZqvDTPdJBgkSrjlrbQFbXvTSfRn20IB?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b20e2d0b-ed95-4ef8-b84c-08da09646179 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2022 04:53:16.2613 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kHgjMxiHB1joByf5aRiOtP2xezbWaEIJ2ZNzCGr2wCzSeNHehnKb6VOGgk2BZWtsWvf/PiJlKqJl5JaX1/nMgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2251 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming, Christine Could you review this patch? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io On Behalf Of Bob Feng Sent: Tuesday, March 15, 2022 8:17 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Chen, Christine Subject: [edk2-devel] [Patch] BaseTools: Remove the redundant __FLEXIBLE_SI= ZE from PcdValueInit.c For the multiple SKU cases, basetools generates multiple redundant __FLEXIB= LE_SIZE statement that is from the same line in dsc file. This behavior causes the generated PcdValueInit.c file to have huge size, a= nd the compilation time is very long. This patch is going to fix this issue. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/Workspace/DscBuildData.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index d29b9bf13d..fc1e773417 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1874,10 +1874,11 @@ class DscBuildData(PlatformBuildClassObject): FieldName =3D FieldName.split(']', 1)[1] = FieldName =3D NewFieldName + FieldName while= '[' in FieldName and not Pcd.IsArray(): FieldName = =3D FieldName.rsplit('[', 1)[0] CApp =3D CApp + ' = __FLEXIBLE_SIZE(*Size, %s, %s, %d); // From %s Line %d Value %s\n' % (Pcd.D= atumType, FieldName.strip("."), Array_Index + 1, FieldList[FieldName_ori][1= ], FieldList[FieldName_ori][2], FieldList[FieldName_ori][0])+ flexis= bale_size_statement_cache =3D set() for skuname in Pcd.SkuOverrideV= alues: if skuname =3D=3D TAB_COMMON: continue = for defaultstorenameitem in Pcd.SkuOverrideValues[skuname]: = CApp =3D CApp + "// SkuName: %s, DefaultStoreName: %s \n" % (s= kuname, defaultstorenameitem)@@ -1886,10 +1887,14 @@ class DscBuildData(Pla= tformBuildClassObject): ActualCap.append(index) for Fi= eldList in [Pcd.SkuOverrideValues[skuname][defaultstorenameitem][index]]: = if not FieldList: contin= ue for FieldName in FieldList:+ = fieldinfo =3D tuple(FieldList[FieldName])+ = if fieldinfo in flexisbale_size_statement_cache:+ = continue+ flexisbale_size_statement_cac= he.add(fieldinfo) FieldName =3D "." + FieldName= IsArray =3D _IsFieldValueAnArray(FieldList[Fie= ldName.strip(".")][0]) if IsArray and not (Fiel= dList[FieldName.strip(".")][0].startswith('{GUID') and FieldList[FieldName.= strip(".")][0].endswith('}')): try: = Value =3D ValueExpressionEx(FieldList[FieldNam= e.strip(".")][0], TAB_VOID, self._GuidDict)(True)--=20 2.29.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87589): https://edk2.groups.io/g/devel/message/87589 Mute This Topic: https://groups.io/mt/89796157/1768742 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@intel.com] -= =3D-=3D-=3D-=3D-=3D-=3D