| To: | John Hawkes <hawkes@xxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: mips64 'top' and 'vmstat' and cputimes |
| From: | Ralf Baechle <ralf@xxxxxxxxxxx> |
| Date: | Sat, 27 May 2000 01:17:37 +0200 |
| Cc: | Ulf Carlsson <ulfc@xxxxxxxxxxxxxxxxxxxx>, linux-origin <linux-origin@xxxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxx>, Kanoj Sarcar <kanoj@xxxxxxxxxxxxxxxxxxxx> |
| In-reply-to: | <02aa01bfc761$f9101880$1d70eea9@xxxxxxxxxxxxxxx>; from hawkes@xxxxxxxxxxxxxxxxxxxx on Fri, May 26, 2000 at 03:30:18PM -0700 |
| References: | <Pine.LNX.4.21.0005251802430.15277-100000@xxxxxxxxxxxxxxxxxxxx> <02aa01bfc761$f9101880$1d70eea9@xxxxxxxxxxxxxxx> |
| Sender: | owner-linux-origin@xxxxxxxxxxx |
On Fri, May 26, 2000 at 03:30:18PM -0700, John Hawkes wrote: > The problem with seeing cputime with 'vmstat', 'top', and 'ps' has to do > with a misdeclaration of __kernel_clock_t > (include/asm-mips64/posix_types.h), which is the base type of clock_t. > When I change the declaration from "typedef int" to "typedef long", > those commands produce apparently accurate reports for user, system, and > idle time. > > The mistyping results in an error in proc_pid_stat() (fs/proc/array.c) > where task->times.tms_utime (and other similar clock_t variables) are > formatted as %lu in an sprintf(), i.e., expecting those fields to be > 64-bit longs, not 32-bit ints. A 32-bit tms_utime formatted by %lu > produces a huge ascii value in /proc/<pid>/stat. > > If everyone is comfortable with this fix (i.e., if you don't think it > breaks anything when various clock_t and __kernel_clock_t fields > increase in size from 32 to 64 bits), then I'd be happy to do a CVS > checkin. Think the suggested change is good, will apply it. Thanks, Ralf |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | BUG 792099 - /sbin/init 0 gets to "System halted" then gets Oops, hawkes@xxxxxxxxxxxx |
|---|---|
| Next by Date: | Re: BUG 792099 - /sbin/init 0 gets to "System halted" then gets Oops, Ulf Carlsson |
| Previous by Thread: | Re: mips64 'top' and 'vmstat' and cputimes, John Hawkes |
| Next by Thread: | BUG 792097 - 'top', 'vmstat', 'ps' cputime all say zero, hawkes@xxxxxxxxxxxx |
| Indexes: | [Date] [Thread] [Top] [All Lists] |