1 Star 0 Fork 25

SuperSix173/procps-ng

forked from src-openEuler/procps-ng 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-top-adapt-to-that-guest-total-tics-change-stat-api.patch 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
From 3fb34669d3a7e1c0c013a907aeae2c4117ba617e Mon Sep 17 00:00:00 2001
From: Jim Warner <james.warner@comcast.net>
Date: Sat, 22 Jun 2024 00:00:00 -0500
Subject: [PATCH 3/3] top: adapt to that guest/total tics change, <stat> api
Signed-off-by: Jim Warner <james.warner@comcast.net>
---
man/top.1 | 5 +----
src/top/top.c | 9 ---------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/man/top.1 b/man/top.1
index 2e4f252d..067c2ef7 100644
--- a/man/top.1
+++ b/man/top.1
@@ -59,7 +59,7 @@ memory statistics and data for other users requires root privileges
.
.\" Document /////////////////////////////////////////////////////////////
.\" ----------------------------------------------------------------------
-.TH TOP 1 "August 2023" "procps-ng" "User Commands"
+.TH TOP 1 "June 2024" "procps-ng" "User Commands"
.\" ----------------------------------------------------------------------
.nh
@@ -542,9 +542,6 @@ Depending on your kernel version, the \fBst\fR field may not be shown.
\fBst\fR : time stolen from this vm by the hypervisor
.fi
-The `sy' value above also reflects the time running a virtual \*(Pu
-for guest operating systems, including those that have been niced.
-
Beyond the first tasks/threads line, there are alternate \*(PU display
modes available via the 4-way `t' \*(CT.
They show an abbreviated summary consisting of these elements:
diff --git a/src/top/top.c b/src/top/top.c
index 1383a17a..c1a08dc2 100644
--- a/src/top/top.c
+++ b/src/top/top.c
@@ -286,7 +286,6 @@ static enum stat_item Stat_items[] = {
STAT_TIC_DELTA_NICE, STAT_TIC_DELTA_IDLE,
STAT_TIC_DELTA_IOWAIT, STAT_TIC_DELTA_IRQ,
STAT_TIC_DELTA_SOFTIRQ, STAT_TIC_DELTA_STOLEN,
- STAT_TIC_DELTA_GUEST, STAT_TIC_DELTA_GUEST_NICE,
STAT_TIC_SUM_DELTA_USER, STAT_TIC_SUM_DELTA_SYSTEM,
#ifdef CORE_TYPE_NO
STAT_TIC_SUM_DELTA_TOTAL };
@@ -299,7 +298,6 @@ enum Rel_statitems {
stat_NI, stat_IL,
stat_IO, stat_IR,
stat_SI, stat_ST,
- stat_GU, stat_GN,
stat_SUM_USR, stat_SUM_SYS,
#ifdef CORE_TYPE_NO
stat_SUM_TOT };
@@ -6410,11 +6408,6 @@ static int sum_tics (struct stat_stack *this, const char *pfx, int nobuf) {
if (1 > tot_frme) idl_frme = tot_frme = 1;
scale = 100.0 / (float)tot_frme;
- /* account for VM tics not otherwise provided for ...
- ( with xtra-procps-debug.h, can't use PID_VAL w/ assignment ) */
- this->head[stat_SY].result.sl_int += rSv(stat_GU) + rSv(stat_GN);
- this->head[stat_SUM_SYS].result.sl_int += rSv(stat_GU) + rSv(stat_GN);
-
/* display some kinda' cpu state percentages
(who or what is explained by the passed prefix) */
if (Curwin->rc.graph_cpus) {
@@ -6464,8 +6457,6 @@ static int sum_unify (struct stat_stack *this, int nobuf) {
stack[stat_IR].result.sl_int += rSv(stat_IR, sl_int);
stack[stat_SI].result.sl_int += rSv(stat_SI, sl_int);
stack[stat_ST].result.sl_int += rSv(stat_ST, sl_int);
- stack[stat_GU].result.sl_int += rSv(stat_GU, sl_int);
- stack[stat_GN].result.sl_int += rSv(stat_GN, sl_int);
stack[stat_SUM_USR].result.sl_int += rSv(stat_SUM_USR, sl_int);
stack[stat_SUM_SYS].result.sl_int += rSv(stat_SUM_SYS, sl_int);
stack[stat_SUM_TOT].result.sl_int += rSv(stat_SUM_TOT, sl_int);
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/SuperSix173/procps-ng.git
git@gitee.com:SuperSix173/procps-ng.git
SuperSix173
procps-ng
procps-ng
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385