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:
		| @@ -5,9 +5,7 @@ | ||||
|  | ||||
| EXTERN_C_BEGIN | ||||
|  | ||||
| extern const char * lookup_wchan(unsigned KLONG address, unsigned pid); | ||||
| extern int   open_psdb(const char *__restrict override); | ||||
| extern int   open_psdb_message(const char *__restrict override, message_fn message); | ||||
| extern const char * lookup_wchan (int pid); | ||||
|  | ||||
| EXTERN_C_END | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user