[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnu time - ru_maxrss value

From: Jiri Pirko
Subject: gnu time - ru_maxrss value
Date: Wed, 17 Dec 2008 17:07:44 +0100


Currently I am working on patch to linux kernel which will enable
ru_maxrss field in getrusage() syscall. I was looking at the source of
GNU time util and it expects this value to be in pages and converts it
into KBs. However BSD systems are setting this value to KB inside the
kernel. It seems good to me to introduce this in linux kernel in the
same way: value in KBs. In that case, the GNU time util needs to be
changed in the following way:

--- time.c      2008-12-17 12:32:01.000000000 +0100
+++ time.c~MAXRSS       2008-12-17 17:02:10.000000000 +0100
@@ -395,7 +395,7 @@ summarize (fp, fmt, command, resp)
                       ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
            case 'M':           /* Maximum resident set size.  */
-             fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
+             fprintf (fp, "%lu", resp->ru.ru_maxrss);
            case 'O':           /* Outputs.  */
              fprintf (fp, "%ld", resp->ru.ru_oublock);

What do you think about this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]