bin/124591: top gets TIME wrong for threaded processes
Stephen Montgomery-Smith
stephen at math.missouri.edu
Sat Jun 14 18:40:02 UTC 2008
>Number: 124591
>Category: bin
>Synopsis: top gets TIME wrong for threaded processes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 14 18:40:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Stephen Montgomery-Smith
>Release: FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
FreeBSD laptop3.gateway.2wire.net 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Wed Jun 11 23:17:45 CDT 2008 stephen at laptop3.gateway.2wire.net:/usr/obj/usr/src/sys/LAPTOP3 i386
>Description:
When running a threaded program, top picks randomly one of the threads from which to report TIME. It would be better if it totalled them.
>How-To-Repeat:
>Fix:
--- usr.bin/top/machine.c-orig 2008-06-12 23:06:08.000000000 -0500
+++ usr.bin/top/machine.c 2008-06-12 23:06:51.000000000 -0500
@@ -725,6 +725,7 @@
prev_pp = pp;
} else {
prev_pp->ki_pctcpu += pp->ki_pctcpu;
+ prev_pp->ki_runtime += pp->ki_runtime;
}
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list