Projects
Mega-LLVM:24.03
procps-ng
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Difference Between Revision 1 and
Mega:24.03
/
procps-ng
View file
_service:tar_scm:procps-ng.spec
Changed
@@ -1,6 +1,6 @@ Name: procps-ng Version: 4.0.4 -Release: 3 +Release: 1 Summary: Utilities that provide system information. License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ URL: https://sourceforge.net/projects/procps-ng/ @@ -11,8 +11,6 @@ Patch1: openeuler-add-M-and-N-options-for-top.patch Patch2: openeuler-top-exit-with-error-when-pid-overflow.patch -Patch3: backport-library-address-remaining-cpu-distortions-stat-api.patch -Patch4: backport-uptime-fix-output-on-60-seconds.patch BuildRequires: ncurses-devel libtool autoconf automake gcc gettext-devel systemd-devel @@ -95,12 +93,6 @@ %{_mandir}/man* %changelog -* Tue Apr 23 2024 yinyongkang <yinyongkang@kylinos.cn> - 4.0.4-3 -- uptime: fix output on 60 seconds - -* Tue Apr 02 2024 Liu Chao <liuchao173@huawei.com> - 4.0.4-2 -- library: address remaining cpu distortions, <stat> api - * Wed Nov 01 2023 liweigang <weigangli99@gmail.com> - 4.0.4-1 - update to version v4.0.4
View file
_service:tar_scm:backport-library-address-remaining-cpu-distortions-stat-api.patch
Deleted
@@ -1,79 +0,0 @@ -From 6418b8c1fbcfdcda4cad8efacccceb7bcdbb1de9 Mon Sep 17 00:00:00 2001 -From: Jim Warner <james.warner@comcast.net> -Date: Wed, 20 Mar 2024 00:00:00 -0500 -Subject: PATCH library: address remaining cpu distortions, <stat> api - -When the potential cpu distortion was addressed in the -commit referenced below, the revision did not quite go -far enough. This was revealed in the merge plus issue -posts also shown. Thus a need for this final solution. - - and now that all the stat_jifs fields are verified - that TICsetH macro need not check for distortions. - -Reference(s): -https://gitlab.com/procps-ng/procps/-/merge_requests/223 -https://gitlab.com/procps-ng/procps/-/issues/321 - -. Mar, 2017 - cpu distorions relocated/improved -commit 253ac7f709412a8699767bd70faeaf98e19614f0 - -Discovered-by: Chao Liu SuperSix173 <liuchao173@huawei.com> -Signed-off-by: Jim Warner <james.warner@comcast.net> ---- - library/stat.c | 24 +++++++++++++++--------- - 1 file changed, 15 insertions(+), 9 deletions(-) - -diff --git a/library/stat.c b/library/stat.c -index c37e9b54..b04fe0a5 100644 ---- a/library/stat.c -+++ b/library/stat.c -@@ -182,9 +182,10 @@ struct stat_info { - #define SYS_set(e,t,x) setDECL(e) { \ - (void)T; R->result. t = S->new. x; } - // delta assignment -+// ( thanks to 'stat_derive_unique', this macro no longer needs to ) -+// ( protect against a negative value when a cpu is brought online ) - #define TICsetH(e,t,x) setDECL(e) { \ -- (void)S; R->result. t = ( T->new. x - T->old. x ); \ -- if (R->result. t < 0) R->result. t = 0; } -+ (void)S; R->result. t = ( T->new. x - T->old. x ); } - #define SYSsetH(e,t,x) setDECL(e) { \ - (void)T; R->result. t = ( S->new. x - S->old. x ); } - -@@ -555,6 +556,9 @@ wrap_up: - static inline void stat_derive_unique ( - struct hist_tic *this) - { -+ unsigned long long *new, *old; -+ int i; -+ - /* note: we calculate these derived values in a manner consistent with - the calculations for cgroup accounting, as nearly as possible - ( see linux sources: ./kernel/cgroup/rstat.c, root_cgroup_cputime ) */ -@@ -576,13 +580,15 @@ static inline void stat_derive_unique ( - this->new.xbsy - = this->new.xtot - this->new.xidl; - -- // don't distort deltas when cpus are taken offline or brought online -- if (this->new.xusr < this->old.xusr -- || (this->new.xsys < this->old.xsys) -- || (this->new.xidl < this->old.xidl) -- || (this->new.xbsy < this->old.xbsy) -- || (this->new.xtot < this->old.xtot)) -- memcpy(&this->old, &this->new, sizeof(struct stat_jifs)); -+ // don't distort results when cpus are brought back online -+ new = (unsigned long long *)&this->new; -+ old = (unsigned long long *)&this->old; -+ for (i = 0; i < sizeof(struct stat_jifs) / sizeof(unsigned long long); i++) { -+ if (*(new++) < *(old++)) { -+ memcpy(&this->old, &this->new, sizeof(struct stat_jifs)); -+ break; -+ } -+ } - } // end: stat_derive_unique - - --- -2.33.0 -
View file
_service:tar_scm:backport-uptime-fix-output-on-60-seconds.patch
Deleted
@@ -1,33 +0,0 @@ -From bfb0eadc38e789737dec7f14dd7a7ac00f5f0761 Mon Sep 17 00:00:00 2001 -From: Robert Malz <mail.robert.malz@gmail.com> -Date: Thu, 21 Sep 2023 16:45:49 +1000 -Subject: PATCH uptime: fix output on 60 seconds - -When procps_uptime will return 60 seconds uptime -p will not -provide any output except "up". To stay consistent with other -time units the expected output is "up 0 minutes". - -References: - #302 - -Signed-off-by: Craig Small <csmall@dropbear.xyz> ---- - library/uptime.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletion(-) - -diff --git a/library/uptime.c b/library/uptime.c -index b41538f5..5faeefca 100644 ---- a/library/uptime.c -+++ b/library/uptime.c -@@ -258,7 +258,7 @@ PROCPS_EXPORT char *procps_uptime_sprint_short(void) - comma += 1; - } - -- if (upminutes || (!upminutes && uptime_secs < 60)) { -+ if (upminutes || (!upminutes && uptime_secs <= 60)) { - pos += sprintf(shortbuf + pos, "%s%d %s", - comma > 0 ? ", " : "", upminutes, - upminutes != 1 ? "minutes" : "minute"); --- -GitLab -
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2