From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.9166.1597212548267995571 for ; Tue, 11 Aug 2020 23:09:08 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) IronPort-SDR: jW2dzkjVpGdohv69UGOyjgOjwjI+55sq24UwKG1JkThWP3PzphWVDRqHn03uzeDwZqmlHQxHMJ ho2HKVA7hXgA== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="171935236" X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="171935236" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 23:09:07 -0700 IronPort-SDR: uA4D7kboVBGrU/up8iNbOx4ExCwZi0FzdTKTsnieEOKryAnzZuKVDtQK1QS2ZPJQ8Bmhg2GLqC EJ/CnI7O+aMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="290934849" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by orsmga003.jf.intel.com with ESMTP; 11 Aug 2020 23:09:05 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Yuwei Chen Subject: [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for parallel Date: Wed, 12 Aug 2020 14:09:03 +0800 Message-Id: <20200812060903.23704-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit AsBuiltInf can be created during AutoGen phase. Move CreateAsBuiltInf into AutoGenWorker to make this step run in parallel. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 2 +- BaseTools/Source/Python/build/build.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py index 017f676399..0425f1ab0b 100755 --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py @@ -278,11 +278,11 @@ class AutoGenWorkerInProcess(mp.Process): else: self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, "PreMakeCache", False)) Ma.CreateCodeFile(False) Ma.CreateMakeFile(False,GenFfsList=FfsCmd.get((Ma.MetaFile.Path, Ma.Arch),[])) - + Ma.CreateAsBuiltInf() if GlobalData.gBinCacheSource and CommandTarget in [None, "", "all"]: try: CacheResult = Ma.CanSkipbyMakeCache() except: CacheResult = False diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 59ceacfed0..c4cfe38ad9 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -871,11 +871,11 @@ class Build(): if GlobalData.gUseHashCache and not GlobalData.gBinCacheDest and self.Target in [None, "", "all"]: cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, "PreMakeCache", False)) PcdMa.CreateCodeFile(False) PcdMa.CreateMakeFile(False,GenFfsList = DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.Path, PcdMa.Arch),[])) - + PcdMa.CreateAsBuiltInf() # Force cache miss for PCD driver if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]: cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, "MakeCache", False)) self.AutoGenMgr.join() @@ -1263,11 +1263,10 @@ class Build(): # build modules if BuildModule: BuildCommand = BuildCommand + [Target] LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir) - self.CreateAsBuiltInf() if GlobalData.gBinCacheDest: self.GenDestCache() elif GlobalData.gUseHashCache and not GlobalData.gBinCacheSource: # Only for --hash # Update PreMakeCacheChain files @@ -2274,11 +2273,10 @@ class Build(): # All modules have been put in build tasks queue. Tell task scheduler # to exit if all tasks are completed # ExitFlag.set() BuildTask.WaitForComplete() - self.CreateAsBuiltInf() if GlobalData.gBinCacheDest: self.GenDestCache() elif GlobalData.gUseHashCache and not GlobalData.gBinCacheSource: # Only for --hash # Update PreMakeCacheChain files -- 2.20.1.windows.1