Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2009 21:52:13 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern kern_proc.c
Message-ID:  <200902182152.n1ILqMtu027179@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
attilio     2009-02-18 21:52:13 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_proc.c 
  Log:
  SVN rev 188764 on 2009-02-18 21:52:13Z by attilio
  
  - 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
  
  Revision  Changes    Path
  1.279     +44 -22    src/sys/kern/kern_proc.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902182152.n1ILqMtu027179>