bugGNU Time - Bugs: bug #49921, wrong value of maximum resident...

 
 

bug #49921: wrong value of maximum resident set size

Submitted by:  None
Submitted on:  Fri 23 Dec 2016 05:55:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 23 Dec 2016 05:55:05 PM UTC, original submission:

The field "maximum resident set size" returns a wrong value as reported at:
https://groups.google.com/forum/#!topic/gnu.utils.help/u1MOsHL4bhg

The following patch seems to work:

diff -ru time-1.7.orig/ChangeLog time-1.7/ChangeLog
--- time-1.7.orig/ChangeLog 1996-07-11 10:37:20.000000000 -0600
+++ time-1.7/ChangeLog 2010-10-01 16:03:09.000000000 -0600
@@ -1,3 +1,10 @@
+2010-10-01 Bob Proulx <b...@proulx.com>
+
+ The struct rusage reports ru_maxrss in kbytes not pages and
+ should not be converted through pages-to-kbytes again.
+ Reported by Sven Hartrumpf.
+ * time.c (summarize): Do not call ptok on ru_maxrss.
+
diff -ru time-1.7.orig/time.c time-1.7/time.c
--- time-1.7.orig/time.c 1996-06-13 13:38:21.000000000 -0600
+++ time-1.7/time.c 2010-10-01 15:49:11.000000000 -0600
@@ -392,7 +392,7 @@
ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
break;
case 'M': /* Maximum resident set size. */
- fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
+ fprintf (fp, "%lu", (UL) resp->ru.ru_maxrss);
break;
case 'O': /* Outputs. */
fprintf (fp, "%ld", resp->ru.ru_oublock);

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1