From patchwork Fri Jan 12 06:12:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzimir Bely X-Patchwork-Id: 3276 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 12 Jan 2024 07:13:08 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f58.google.com (mail-wm1-f58.google.com [209.85.128.58]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 40C6D7P4005402 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Jan 2024 07:13:07 +0100 Received: by mail-wm1-f58.google.com with SMTP id 5b1f17b1804b1-40e566259e3sf21835345e9.3 for ; Thu, 11 Jan 2024 22:13:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705039982; cv=pass; d=google.com; s=arc-20160816; b=VDb/DxZP2UWzPSjnv9PPt3BE3P6tc4uPqH/nUu+bQ04lhjVWWGqqDzOZLNiiROeeN4 2qVVcWwp/GgXaMj/Tby8SEpw4OIaO9xDyRN+faw3KNoBKw9S1Vwt7LNnhx3/pem/HFgs 4r2xHJ20CJnYdzhyQaNNGYMQIkKL0sgWF6y+3oVpyhVfFpQU94eyjTiTgx41Dos6oRFl yUgddn3DpIS9LYjoK+LOPQ5iaAjG7igBYt9qjq8zOYIrYPqawquoTIN86wZpxkbsapHd Oe8whv6ZV81fQZ+o4XMdTXEYAec8sVjSJF+QWe2diKkZQA2hDHUn1mybuM54d2lCAxy7 Cs2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=Db6Ky3bD0LNgvPLj0hz6nPbcwdPsOEhYm/6rJnWl+3Q=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=O+w9fh8zGcnAdNyv/uVyqsfvspm7Hmhtc5Xn4C4Rq29WElOdRdyN4Ixd/F7v+H0rR2 aGR57KhIQWZdhZgit+ydvYN0e1XY8HWzrSof8m05H/xWSsX4ImubyBPCan+CD2blJCe3 VCyZfahKfh1Gl0MDSKto1sBuI9ZxRV31Lk5y6DruLllSU+78MU/kAGjHCkKXWzqk9ydd f8O12DBf6A6uCo4R5P7Y3xcA19nic9WnoogQNbPWHkfCkP38AmDcebp1o/ISx3Ll7BXq YuILe3/ooq0gc4s5AwK1w76BSIWoiYDupl65I84Ab2lxdpxg9odbbRxghRZK4o9rFTru jG7A== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1705039982; x=1705644782; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=Db6Ky3bD0LNgvPLj0hz6nPbcwdPsOEhYm/6rJnWl+3Q=; b=n8ROxPqlTnNq2KcdGjBxytJPHg3o6jll5Z0qPdBqMdwVDWzPljecw2HRhoG2N0xtOW 9h2Lnkzw4mJ0MMFqrSLJ0JjKEh8q8aQrp4BvKHuYAFfoZNf+/rJNaaqvSIl4i7/G4LE+ rvb2v3JMHwK9se9QozY5S2PzVCBq+BP7WGO4OzBCmZdZgrAYgYaeJfKhCMLyVz7NkyK/ 2MD2MMPNcLkExdQzwGHfbnodDMD/LSz7FRfmruf68zsaXFIn2BW/PlVgNk7ET9ihG2xP X0XChqMrtI/7fQ8egZaVMKTR6FuQZ2EDQX8P+hGr7cgZ/YYfZMuTrMZupDqQ66d6AboY Wr9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705039982; x=1705644782; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=Db6Ky3bD0LNgvPLj0hz6nPbcwdPsOEhYm/6rJnWl+3Q=; b=MlxCwKjVUfH0Mdj2rRFlDohZ0py+KjV7zNxbOZmLizTZ4Mh4iZ2W5LF1ljNPQdle00 6IoAcgTDQZzS5pHLi3rbQSnOXXubm0Ye2s/Ky2A4P2p3cahOVuGuh2c9cp9+gH9/0WRV l+7Kik61M6MtGwfU5Xpm7/0Aq3qLONFWOXYrObs66ujsFAgMlxQPjT6SaxR2Pp1mkTs8 P80xLbShWUf6sXZg009qNsjSCDahupWJ8pfwub4W64nG/zR+nC0vxEMYUF21vIVc6SdH rNFcx5eOqmEuCGFM5uNtXVqTzx8zP1fhTCYfyj16nOKUcVrFPihd5v0VcboK/rXF3r4G XDSQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YyLPpQdhvuhQpjknxNgENsDcM592BLDnlu2qmyYZlmUONNFcBGq ptwawGR163k/0E6sheP5adg= X-Google-Smtp-Source: AGHT+IFJBHQNlnNK0MeSLTzmN5N3sMyJ7vDcopKOms+nAHHP5b5RUQW/nEhgo6JYEm2fi+eruo/yzA== X-Received: by 2002:a05:600c:3548:b0:40d:60c3:3d53 with SMTP id i8-20020a05600c354800b0040d60c33d53mr490909wmq.103.1705039981731; Thu, 11 Jan 2024 22:13:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:548c:b0:40e:62d2:6dd7 with SMTP id iv12-20020a05600c548c00b0040e62d26dd7ls406890wmb.0.-pod-prod-05-eu; Thu, 11 Jan 2024 22:13:00 -0800 (PST) X-Received: by 2002:a05:600c:34d5:b0:40e:490e:8e7b with SMTP id d21-20020a05600c34d500b0040e490e8e7bmr582438wmq.127.1705039979617; Thu, 11 Jan 2024 22:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705039979; cv=none; d=google.com; s=arc-20160816; b=EOeqXkde6jvCX8ObUcCSKvSMmveBYP/ypXe3GkLPdF2yX5xcu6xms5nWv8QTOPvfVp R/NLwTUUCn/cFc/dIvvBheGERzXZ/5831SKhHPUKJVk74ObSg/0HK8owqg7dfFElcbcj 4o2uIsBW2N+0GFhziP1FLPbTHStS8xCKPc4GpgRKa63WUeOXZqT/iGcXnkOzT8BILVmx 4yvJsTnlDqaMLIqakFGJuhWjCzDZHs5a06z/HOHaNtDQrZBa0TlBrpAOjOwiDmuOBzRU nPDTD0Xyw9lJRy/q9Hq6RQod3oDDBXly/6PU38kQ++YCCnZYIIub3KCYZtz3Sm5pL0pc C4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=aeGabEbV5jwNBmm/u2fwjHei1VbitI/1hk5H6w1VYj4=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=rNDvCmUB2nARjdRyr5WweiBRNz1sn/nm/cxjRsxEP0abNp58ZSMMBnvWsLcPPMizD3 lRVTJo+39LNqOPg/KNm2EVoIETRm4RhRJLbDyK8FoBYkJraGo8ll4No9lqGl8gBfLHia uhQBwMLq12jO66s53AD8DLs29eIfgD8XfY3q+et3n4RXcrLtOshtP3aF/lZ/hyp1yyt4 NwknndSJf/nbM1dWkzIfiyZ7T7ggFS49w6TPb13kcrnEO06w1OUn8ddm48NIzuhhYTW9 Zqe1I/M/OYk2Z2Zh+YO5BWEqsSbqh8ghxPB9czLXzLJNV0bwXzTwqpAh0DLwZ+BNIOxv z9CA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id p19-20020a05600c1d9300b0040e6467f543si28912wms.0.2024.01.11.22.12.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2024 22:12:59 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 40C6CvqS005370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Jan 2024 07:12:58 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 1/5] buildstats: Sync code base with openembedded-core 2022-04.15 Date: Fri, 12 Jan 2024 07:12:53 +0100 Message-Id: <20240112061257.22241-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240112061257.22241-1-ubely@ilbers.de> References: <20240112061257.22241-1-ubely@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= This just syncs buildstats related stuff with recent tag in LTS 'kirkstone' branch of OE core. Corresponds to OE commit eea685e1caaf. Signed-off-by: Uladzimir Bely --- meta/lib/buildstats.py | 4 ++-- scripts/pybootchartgui/pybootchartgui/draw.py | 10 +++++++++- scripts/pybootchartgui/pybootchartgui/parsing.py | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py index 8627ed3c..c52b6c3b 100644 --- a/meta/lib/buildstats.py +++ b/meta/lib/buildstats.py @@ -43,8 +43,8 @@ class SystemStats: # depends on the heartbeat event, which fires less often. self.min_seconds = 1 - self.meminfo_regex = re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)') - self.diskstats_regex = re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') + self.meminfo_regex = re.compile(rb'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)') + self.diskstats_regex = re.compile(rb'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') self.diskstats_ltime = None self.diskstats_data = None self.stat_ltimes = None diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index 29eb7505..707e7fe4 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py @@ -267,7 +267,10 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range): # avoid divide by zero if max_y == 0: max_y = 1.0 - xscale = float (chart_bounds[2]) / (max_x - x_shift) + if (max_x - x_shift): + xscale = float (chart_bounds[2]) / (max_x - x_shift) + else: + xscale = float (chart_bounds[2]) # If data_range is given, scale the chart so that the value range in # data_range matches the chart bounds exactly. # Otherwise, scale so that the actual data matches the chart bounds. @@ -555,6 +558,11 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) + + # Show elapsed time for each task + elapsed_time = f"{trace.processes[process][1] - start}s" + draw_text(ctx, elapsed_time, PROC_TEXT_COLOR, x + w + 4, y + proc_h - 4) + y = y + proc_h return curr_y diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py index b42dac6b..9d6787ec 100644 --- a/scripts/pybootchartgui/pybootchartgui/parsing.py +++ b/scripts/pybootchartgui/pybootchartgui/parsing.py @@ -128,7 +128,7 @@ class Trace: def compile(self, writer): def find_parent_id_for(pid): - if pid is 0: + if pid == 0: return 0 ppid = self.parent_map.get(pid) if ppid: