Attilio Rao f8d9048018 - Add a function (fill_kinfo_aggregate()) which aggregates relevant
members for a kinfo entry on a process-wide system.
- Use the newly introduced function in order to fix cases like
  KERN_PROC_PROC where aggregating stats are broken because they just
  consider the first thread in the pool for each process.
  (Note, additively, that KERN_PROC_PROC is rather inaccurate on
  thread-wide informations like the 'state' of the process.  Such
  informations should maybe be invalidated and being forceably discarded
  by the consumers?).
- Simplify the logic of sysctl_out_proc() and adjust the
  fill_kinfo_thread() accordingly.
- Remove checks on the FIRST_THREAD_IN_PROC() being NULL but add
  assertives.

This patch should fix aggregate statistics for KERN_PROC_PROC.
This is one of the reasons why top doesn't use this option and now it
can be use it safely.
ps, when launched in order to display just processes, now should report
correct cpu utilization percentages and times (as opposed by the old
code).

Reviewed by:	jhb, emaste
Sponsored by:	Sandvine Incorporated
2009-02-18 21:52:13 +00:00
..
2008-11-29 14:32:14 +00:00
2008-09-23 14:25:56 +00:00
2008-08-03 21:07:19 +00:00
2008-11-27 04:40:37 +00:00
2008-09-22 10:37:02 +00:00
2008-05-12 06:42:06 +00:00
2008-05-23 04:06:49 +00:00
2007-12-14 21:30:51 +00:00
2008-07-27 21:45:20 +00:00
2009-01-26 15:32:39 +00:00
2009-02-03 07:50:41 +00:00
2009-02-11 16:28:49 +00:00
2009-01-01 20:03:22 +00:00