public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 0/1] BaseTools:Build Cache output notification message
@ 2019-06-14 11:44 Steven Shi
  2019-06-14 11:44 ` [PATCH v2 1/1] " Steven Shi
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Shi @ 2019-06-14 11:44 UTC (permalink / raw)
  To: devel; +Cc: liming.gao, bob.c.feng, christian.rodriguez, zhijux.fan

V2:
Only output message for the driver module and not for library, which can
filter duplicated library messages from different driver modules, and
make the cache messages look more concise.

V1:
Initial fix from Zhiju 

Steven Shi (1):
  BaseTools:Build Cache output notification message

 BaseTools/Source/Python/build/build.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.17.1.windows.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/1] BaseTools:Build Cache output notification message
  2019-06-14 11:44 [PATCH v2 0/1] BaseTools:Build Cache output notification message Steven Shi
@ 2019-06-14 11:44 ` Steven Shi
  2019-06-17  3:27   ` Bob Feng
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Shi @ 2019-06-14 11:44 UTC (permalink / raw)
  To: devel; +Cc: liming.gao, bob.c.feng, christian.rodriguez, zhijux.fan

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@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Zhiju.Fan <zhijux.fan@intel.com>
Signed-off-by: Steven Shi <steven.shi@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] BaseTools:Build Cache output notification message
  2019-06-14 11:44 ` [PATCH v2 1/1] " Steven Shi
@ 2019-06-17  3:27   ` Bob Feng
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Feng @ 2019-06-17  3:27 UTC (permalink / raw)
  To: Shi, Steven, devel@edk2.groups.io
  Cc: Gao, Liming, Rodriguez, Christian, Fan, ZhijuX

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Shi, Steven 
Sent: Friday, June 14, 2019 7:45 PM
To: devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Rodriguez, Christian <christian.rodriguez@intel.com>; Fan, ZhijuX <zhijux.fan@intel.com>
Subject: [PATCH v2 1/1] BaseTools:Build Cache output notification message

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@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Zhiju.Fan <zhijux.fan@intel.com>
Signed-off-by: Steven Shi <steven.shi@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-17  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14 11:44 [PATCH v2 0/1] BaseTools:Build Cache output notification message Steven Shi
2019-06-14 11:44 ` [PATCH v2 1/1] " Steven Shi
2019-06-17  3:27   ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox