From fc8b8deac2d77524ff8cfe44acf95b5e1f59804e Mon Sep 17 00:00:00 2001 From: Steven Shi Date: Tue, 19 Nov 2019 16:17:00 +0800 Subject: BaseTools: Leverage compiler output to optimize binary cache Redesign the binary cache and bases on the compiler to output the dependency header files info for every module. The binary cache will directly consume the dependency header files info and doesn't parse the C source code by iteself. Also redesign the dependency files list format for module and try to share the common lib hash result as more as possible in local process. Remove the unnecessary share data access across multiprocessing. Signed-off-by: Steven Shi Cc: Liming Gao Cc: Bob Feng Reviewed-by: Bob Feng --- BaseTools/Source/Python/Common/GlobalData.py | 35 +++++++++++----------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'BaseTools/Source/Python/Common/GlobalData.py') diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py index 74c6d0079b..0b3ebe035d 100755 --- a/BaseTools/Source/Python/Common/GlobalData.py +++ b/BaseTools/Source/Python/Common/GlobalData.py @@ -104,29 +104,20 @@ gUseHashCache = None gBinCacheDest = None gBinCacheSource = None gPlatformHash = None -gPackageHash = {} -gModuleHash = {} +gPlatformHashFile = None +gPackageHash = None +gPackageHashFile = None +gModuleHashFile = None +gCMakeHashFile = None +gHashChainStatus = None +gModulePreMakeCacheStatus = None +gModuleMakeCacheStatus = None +gFileHashDict = None +gModuleAllCacheStatus = None +gModuleCacheHit = None + gEnableGenfdsMultiThread = True gSikpAutoGenCache = set() - -# Dictionary for tracking Module build status as success or failure -# Top Dict: Key: Arch Type Value: Dictionary -# Second Dict: Key: AutoGen Obj Value: 'SUCCESS'\'FAIL'\'FAIL_METAFILE' -gModuleBuildTracking = dict() - -# Dictionary of booleans that dictate whether a module or -# library can be skiped -# Top Dict: Key: Arch Type Value: Dictionary -# Second Dict: Key: Module\Library Name Value: True\False -gBuildHashSkipTracking = dict() - -# Common dictionary to share module cache intermediate result and state -gCacheIR = None -# Common lock for the module cache intermediate data -cache_lock = None # Common lock for the file access in multiple process AutoGens file_lock = None -# Common dictionary to share platform libraries' constant Pcd -libConstPcd = None -# Common dictionary to share platform libraries' reference info -Refes = None + -- cgit v1.2.3