-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BaseTools: Improve the cache hit in the edk2 build cache
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927 Current cache hash algorithm does not parse and generate the makefile to get the accurate dependency files for a module. It instead use the platform and package meta files to get the module depenedency in a quick but over approximate way. These meta files are monolithic and involve many redundant dependency for the module, which cause the module build cache miss easily. This patch introduces one more cache checkpoint and a new hash algorithm besides the current quick one. The new hash algorithm leverages the module makefile to achieve more accurate and precise dependency info for a module. When the build cache miss with the first quick hash, the Basetool will caculate new one after makefile is generated and then check again. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
- Loading branch information
1 parent
8113281
commit 0e7e7a2
Showing
7 changed files
with
865 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## @file | ||
# Build cache intermediate result and state | ||
# | ||
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
class ModuleBuildCacheIR(): | ||
def __init__(self, Path, Arch): | ||
self.ModulePath = Path | ||
self.ModuleArch = Arch | ||
self.ModuleFilesHashDigest = None | ||
self.ModuleFilesHashHexDigest = None | ||
self.ModuleFilesChain = [] | ||
self.PreMakefileHashHexDigest = None | ||
self.CreateCodeFileDone = False | ||
self.CreateMakeFileDone = False | ||
self.MakefilePath = None | ||
self.AutoGenFileList = None | ||
self.DependencyHeaderFileSet = None | ||
self.MakeHeaderFilesHashChain = None | ||
self.MakeHeaderFilesHashDigest = None | ||
self.MakeHeaderFilesHashChain = [] | ||
self.MakeHashDigest = None | ||
self.MakeHashHexDigest = None | ||
self.MakeHashChain = [] | ||
self.PreMakeCacheHit = False | ||
self.MakeCacheHit = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.