public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "Shi, Steven" <steven.shi@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	"Rodriguez, Christian" <christian.rodriguez@intel.com>,
	"Fan, ZhijuX" <zhijux.fan@intel.com>
Subject: Re: [PATCH v2 1/1] BaseTools:Build Cache output notification message
Date: Mon, 17 Jun 2019 03:27:46 +0000	[thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16015249F@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190614114441.25468-2-steven.shi@intel.com>

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


      reply	other threads:[~2019-06-17  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08650203BA1BD64D8AD9B6D5D74A85D16015249F@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox