diff options
author | Zach van Rijn <me@zv.io> | 2021-10-16 01:12:16 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2021-10-16 01:12:16 +0000 |
commit | 6ca2ba5c92a7b0679a552725678a40ed5eb4ded5 (patch) | |
tree | ddc300a108dc4d10ed5ed0188175f54452e8bb0e /legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch | |
parent | aa90e62ce757fa863685f44ce23f129f56b3225f (diff) | |
parent | c0f3f757abe6ea39579119b99e9996c4e2bf0e11 (diff) | |
download | packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.gz packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.bz2 packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.xz packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.zip |
Merge branch 'master' into 'awilfox/bump/2021-09-system-abipreserve'
# Conflicts:
# system/curl/APKBUILD
Diffstat (limited to 'legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch')
-rw-r--r-- | legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch b/legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch deleted file mode 100644 index c8013403f..000000000 --- a/legacy/busybox/0016-top-handle-much-larger-VSZ-values.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9d37e0e491d53e71c2e3ede1e002790e1026b9c6 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Wed, 7 Mar 2018 03:59:52 +0100 -Subject: [PATCH 16/16] top: handle much larger VSZ values - -function old new delta -display_process_list 1018 999 -19 - -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- - procps/top.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/procps/top.c b/procps/top.c -index b777c494e..9bb3eed29 100644 ---- a/procps/top.c -+++ b/procps/top.c -@@ -607,7 +607,6 @@ static NOINLINE void display_process_list(int lines_rem, int scr_width) - }; - - top_status_t *s; -- char vsz_str_buf[8]; - unsigned long total_memory = display_header(scr_width, &lines_rem); /* or use total_vsz? */ - /* xxx_shift and xxx_scale variables allow us to replace - * expensive divides with multiply and shift */ -@@ -688,19 +687,18 @@ static NOINLINE void display_process_list(int lines_rem, int scr_width) - lines_rem = ntop - G_scroll_ofs; - s = top + G_scroll_ofs; - while (--lines_rem >= 0) { -+ char vsz_str_buf[8]; - unsigned col; -+ - CALC_STAT(pmem, (s->vsz*pmem_scale + pmem_half) >> pmem_shift); - #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE - CALC_STAT(pcpu, (s->pcpu*pcpu_scale + pcpu_half) >> pcpu_shift); - #endif - -- if (s->vsz >= 100000) -- sprintf(vsz_str_buf, "%6ldm", s->vsz/1024); -- else -- sprintf(vsz_str_buf, "%7lu", s->vsz); -+ smart_ulltoa5(s->vsz, vsz_str_buf, " mgtpezy"); - /* PID PPID USER STAT VSZ %VSZ [%CPU] COMMAND */ - col = snprintf(line_buf, scr_width, -- "\n" "%5u%6u %-8.8s %s%s" FMT -+ "\n" "%5u%6u %-8.8s %s %.5s" FMT - IF_FEATURE_TOP_SMP_PROCESS(" %3d") - IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE(FMT) - " ", -@@ -710,7 +708,7 @@ static NOINLINE void display_process_list(int lines_rem, int scr_width) - IF_FEATURE_TOP_SMP_PROCESS(, s->last_seen_on_cpu) - IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE(, SHOW_STAT(pcpu)) - ); -- if ((int)(col + 1) < scr_width) -+ if ((int)(scr_width - col) > 1) - read_cmdline(line_buf + col, scr_width - col, s->pid, s->comm); - fputs(line_buf, stdout); - /* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu, --- -2.16.2 - |