From nobody Fri Oct 31 03:46:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=renesas.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1756895041723454.16129264062306; Wed, 3 Sep 2025 03:24:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1108054.1458197 (Exim 4.92) (envelope-from ) id 1utkeb-0001R5-DF; Wed, 03 Sep 2025 10:23:49 +0000 Received: by outflank-mailman (output) from mailman id 1108054.1458197; Wed, 03 Sep 2025 10:23:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1utkeb-0001Qw-AD; Wed, 03 Sep 2025 10:23:49 +0000 Received: by outflank-mailman (input) for mailman id 1108054; Wed, 03 Sep 2025 10:23:47 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1utkeZ-0001Ah-Km for xen-devel@lists.xenproject.org; Wed, 03 Sep 2025 10:23:47 +0000 Received: from rein-hpcbdc09 (unknown [1.6.89.6]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 120b53b1-88b0-11f0-9809-7dc792cee155; Wed, 03 Sep 2025 12:23:45 +0200 (CEST) Received: by rein-hpcbdc09 (Postfix, from userid 1000) id 6175880C06CE; Wed, 3 Sep 2025 15:53:44 +0530 (IST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 120b53b1-88b0-11f0-9809-7dc792cee155 From: Jahan Murudi To: xen-devel@lists.xenproject.org Cc: Jahan Murudi , Anthony PERARD Subject: [PATCH v4 1/4] xentop: add pcpu header and basic infrastructure Date: Wed, 3 Sep 2025 15:53:20 +0530 Message-Id: <20250903102323.2553142-2-jahan.murudi.zg@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250903102323.2553142-1-jahan.murudi.zg@renesas.com> References: <20250903102323.2553142-1-jahan.murudi.zg@renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1756895044762124100 Content-Type: text/plain; charset="utf-8" Introduce a new header (pcpu.h) which defines the interfaces for physical CPU statistics collection. This provides the basic infrastructure needed to track per-CPU usage and will be used in subsequent patches. Signed-off-by: Jahan Murudi --- tools/xentop/pcpu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/xentop/pcpu.h diff --git a/tools/xentop/pcpu.h b/tools/xentop/pcpu.h new file mode 100644 index 0000000000..a528177476 --- /dev/null +++ b/tools/xentop/pcpu.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2025 Renesas Electronics Corporation + */ + +#ifndef __XENTOP_PCPU_H__ +#define __XENTOP_PCPU_H__ + +#include + +int update_pcpu_stats(const struct timeval *now, unsigned int delay); +int get_pcpu_count(void); +float get_pcpu_usage(int cpu_index); +int has_pcpu_data(void); +void free_pcpu_stats(void); + +#endif /* __XENTOP_PCPU_H__ */ --=20 2.34.1