library: refactor and rely on modern kernels for wchan

Several Debian based distributions were recently found
to have omitted a kernel configuration option that had
the effect of rendering /proc/#/stat and /proc/#/wchan
useless for providing any 'sleeping in function' info.

That problem also prompted a reevaluation of the whole
approach to wchan matters which had grown increasingly
complex as our library evolved over the last 13 years.

The net result was a decision to rely on /proc/#/wchan
which arrived along with the 2.5 kernel. This then let
us vastly simplify the internal code plus the external
interface which will benefit both the top and ps pgms.

Reference(s):
http://www.freelists.org/post/procps/WCHAN,11
https://lkml.org/lkml/2008/11/6/12
https://bugs.debian.org/711592

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2015-06-18 00:00:00 -05:00
committed by Craig Small
parent 932f54b19d
commit 6b8dc5511f
6 changed files with 58 additions and 646 deletions

View File

@@ -40,8 +40,6 @@ global:
look_up_our_self;
lookup_wchan;
meminfo;
open_psdb;
open_psdb_message;
openproc;
page_bytes;
pretty_print_signals;