From nobody Mon Feb 9 00:19:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44501+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44501+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564389920; cv=none; d=zoho.com; s=zohoarc; b=TobusPZIt2vZDZmYRXLHqFvHEK699FpAjbuIb2nTxMrrK4A1A4evN2V9EVvwAo1/rqyzy0K6iR/5Cby6cROv71Q3V/7NKNlOR+fpKZPCVrQP0wHVx0Be3azyDrbNrC846WKpxcMSZJ/G3D6oRW1uJEQLCqgm9z8MbmySaTwyQ7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564389920; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Rs4RynZb8G6dlATf1NSgCuNQZaSGSoXWc2MG7sIUwDc=; b=jpp0SXN3pmCNouAN3jaDCqKyK9ynRnNeclOlymiWfyZ2eqzdNaNf+wCto6hTEmFGqMsPbiTkxPUTONa1FuBJQ9a6Q334ynFbSmZhBdobRZwqJUAk4E0WMy9hnnLebKrCHjEOYZYM0wa5lXfhchVT3VhG8rJC531QHM9t3rgBvds= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44501+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564389920442433.6734699567479; Mon, 29 Jul 2019 01:45:20 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Mon, 29 Jul 2019 01:45:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2019 01:45:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,322,1559545200"; d="scan'208";a="322786695" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga004.jf.intel.com with ESMTP; 29 Jul 2019 01:45:18 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Bob Feng Subject: [edk2-devel] [Patch 10/11] BaseTools: Enable block queue log agent. Date: Mon, 29 Jul 2019 16:44:55 +0800 Message-Id: <20190729084456.18844-11-bob.c.feng@intel.com> In-Reply-To: <20190729084456.18844-1-bob.c.feng@intel.com> References: <20190729084456.18844-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564389920; bh=ipbH6vqMusjP4MRrOZbw0Tgw8sj6WAxgv+N81W+22XI=; h=Cc:Date:From:Reply-To:Subject:To; b=g3evVMuE5L2t73eswh23V4QxUpTbvmsUd9DrEU3M4IeGnrdZtWmImfuiOetuIOyYPk+ sQfspioklAc83lhvwrqf1J4Aa8Ttv5GqVZXeSxeENUeUvDJi9U8l7+XPdeXTtOFhianF/ j7VNOIOF+IMYZ1uu1xCwwBhJxCWjsGXWSPk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1875 To support Ctrl+S and Ctrl+Q, we enable block queue for log. Cc: Liming Gao Signed-off-by: Bob Feng --- BaseTools/Source/Python/Common/EdkLogger.py | 10 ++++++---- BaseTools/Source/Python/build/build.py | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/Common/EdkLogger.py b/BaseTools/Source= /Python/Common/EdkLogger.py index 15fd1458a95a..06da4a9d0a1d 100644 --- a/BaseTools/Source/Python/Common/EdkLogger.py +++ b/BaseTools/Source/Python/Common/EdkLogger.py @@ -93,11 +93,13 @@ except: """ try: self.enqueue(self.prepare(record)) except Exception: self.handleError(record) - +class BlockQueueHandler(QueueHandler): + def enqueue(self, record): + self.queue.put(record,True) ## Log level constants DEBUG_0 =3D 1 DEBUG_1 =3D 2 DEBUG_2 =3D 3 DEBUG_3 =3D 4 @@ -290,23 +292,23 @@ def LogClientInitialize(log_q): # Since we use different format to log different levels of message int= o different # place (stdout or stderr), we have to use different "Logger" objects = to do this. # # For DEBUG level (All DEBUG_0~9 are applicable) _DebugLogger.setLevel(INFO) - _DebugChannel =3D QueueHandler(log_q) + _DebugChannel =3D BlockQueueHandler(log_q) _DebugChannel.setFormatter(_DebugFormatter) _DebugLogger.addHandler(_DebugChannel) =20 # For VERBOSE, INFO, WARN level _InfoLogger.setLevel(INFO) - _InfoChannel =3D QueueHandler(log_q) + _InfoChannel =3D BlockQueueHandler(log_q) _InfoChannel.setFormatter(_InfoFormatter) _InfoLogger.addHandler(_InfoChannel) =20 # For ERROR level _ErrorLogger.setLevel(INFO) - _ErrorCh =3D QueueHandler(log_q) + _ErrorCh =3D BlockQueueHandler(log_q) _ErrorCh.setFormatter(_ErrorFormatter) _ErrorLogger.addHandler(_ErrorCh) =20 ## Set log level # diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index 4125b2832946..603d3aa6dad4 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2046,14 +2046,15 @@ class Build(): for m in Pa.GetAllModuleInfo: mqueue.put(m) data_pipe_file =3D os.path.join(Pa.BuildDir, "GlobalVa= r_%s_%s.bin" % (str(Pa.Guid),Pa.Arch)) Pa.DataPipe.dump(data_pipe_file) autogen_rt =3D self.StartAutoGen(mqueue, Pa.DataPipe, = self.SkipAutoGen, PcdMaList,self.share_data) - self.Progress.Stop("done!") - self.AutoGenTime +=3D int(round((time.time() - AutoGen= Start))) + if not autogen_rt: return + self.AutoGenTime +=3D int(round((time.time() - AutoGenStar= t))) + self.Progress.Stop("done!") for Arch in Wa.ArchList: MakeStart =3D time.time() for Ma in BuildModules: # Generate build task for the module if not Ma.IsBinaryModule: @@ -2294,17 +2295,18 @@ def LogBuildTime(Time): # if it's executed successfully or not. # # @retval 0 Tool was successful # @retval 1 Tool failed # +LogQMaxSize =3D 60 def Main(): StartTime =3D time.time() =20 # # Create a log Queue # - LogQ =3D mp.Queue() + LogQ =3D mp.Queue(LogQMaxSize) # Initialize log system EdkLogger.LogClientInitialize(LogQ) GlobalData.gCommand =3D sys.argv[1:] # # Parse the options and args --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44501): https://edk2.groups.io/g/devel/message/44501 Mute This Topic: https://groups.io/mt/32640237/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-