From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: steven.shi@intel.com) Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Fri, 14 Jun 2019 04:44:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 04:44:57 -0700 X-ExtLoop1: 1 Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.215.177]) by orsmga008.jf.intel.com with ESMTP; 14 Jun 2019 04:44:55 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com, zhijux.fan@intel.com Subject: [PATCH v2 1/1] BaseTools:Build Cache output notification message Date: Fri, 14 Jun 2019 19:44:41 +0800 Message-Id: <20190614114441.25468-2-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190614114441.25468-1-steven.shi@intel.com> References: <20190614114441.25468-1-steven.shi@intel.com> 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 Cc: Bob Feng Cc: Zhiju.Fan Signed-off-by: Steven Shi --- 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