[edk2-devel] [PATCH v2 1/1] BaseTools:Build Cache output notification message

Steven Shi steven.shi at intel.com
Fri Jun 14 11:44:41 UTC 2019


BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1868

Build need output the cache miss or hit notification
message when consume the build cache. Current build does not
output any message which is not clear for user to know
whether the module built result is from cache or not.

This patch adds message about the cache miss or hit when
build consumes the cache.

Cc: Liming Gao <liming.gao at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Zhiju.Fan <zhijux.fan at intel.com>
Signed-off-by: Steven Shi <steven.shi at intel.com>
---
 BaseTools/Source/Python/build/build.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 0855d4561c..2dca3c7b34 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1815,7 +1815,12 @@ class Build():
                             MaList.append(Ma)
                             if Ma.CanSkipbyHash():
                                 self.HashSkipModules.append(Ma)
+                                if GlobalData.gBinCacheSource:
+                                    EdkLogger.quiet("cache hit: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))
                                 continue
+                            else:
+                                if GlobalData.gBinCacheSource:
+                                    EdkLogger.quiet("cache miss: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))
                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
                                 # for target which must generate AutoGen code and makefile
@@ -2004,7 +2009,12 @@ class Build():
                             continue
                         if Ma.CanSkipbyHash():
                             self.HashSkipModules.append(Ma)
+                            if GlobalData.gBinCacheSource:
+                                EdkLogger.quiet("cache hit: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))
                             continue
+                        else:
+                            if GlobalData.gBinCacheSource:
+                                EdkLogger.quiet("cache miss: %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))
 
                         # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
                         if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
-- 
2.17.1.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42435): https://edk2.groups.io/g/devel/message/42435
Mute This Topic: https://groups.io/mt/32062806/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list