From 5375e6431c0475b1a266d481af2af5187dbf99f2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 29 Jan 2016 11:08:50 +0000 Subject: bitbake: bitbake: Set process names to be meaninful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means that when you view the process tree, the processes have meaningful names, aiding debugging: $ pstree -p 30021 bash(30021)───KnottyUI(115579)───Cooker(115590)─┬─PRServ(115592)───{PRServ Handler}(115593) ├─Worker(115630)───bash:sleep(115631)───run.do_sleep.11(115633)───sleep(115634) └─{ProcessEQueue}(115591) $ pstree -p 30021 bash(30021)───KnottyUI(117319)───Cooker(117330)─┬─Cooker(117335) ├─PRServ(117332)───{PRServ Handler}(117333) ├─Parser-1:2(117336) └─{ProcessEQueue}(117331) Applies to parse threads, PR Server, cooker, the workers and execution threads, working within the 16 character limit as best we can. Needed to tweak the bitbake-worker magic values to tell the workers apart. (Bitbake rev: 539726a3b2202249a3f148d99e08909cb61902a5) Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb/server') diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 5fca3508b1..1e2b8249a9 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -106,6 +106,7 @@ class ProcessServer(Process, BaseImplServer): # the UI and communicated to us self.quitin.close() signal.signal(signal.SIGINT, signal.SIG_IGN) + bb.utils.set_process_name("Cooker") while not self.quit: try: if self.command_channel.poll(): @@ -212,6 +213,7 @@ class ProcessEventQueue(multiprocessing.queues.Queue): def __init__(self, maxsize): multiprocessing.queues.Queue.__init__(self, maxsize) self.exit = False + bb.utils.set_process_name("ProcessEQueue") def setexit(self): self.exit = True -- cgit v1.2.3-54-g00ecf