ps: exploit the simplified library interface for wchan

This patch was made necessary by those library changes
in support of recently revised/simplified wchan logic.

In addition, this commit eliminates a broken alternate
'namelist' provision which was intended to allow users
to specify a System.map file to be used in translating
addresses into function names. But, the real effect of
the now defunct 'N' and '-n' options was to indirectly
force addresses (not names) to be displayed since such
user named map files could not be successfully parsed.

Besides when the required FRAME_POINTER kconfig option
is absent there is no address to translate and when it
is present /proc/PID/wchan is already translated. Thus
an alternate mapping is unnecessary and inappropriate.

[ we'll forgive POSIX for documenting '-n  namelist' ]

Reference(s):
http://www.freelists.org/post/procps/WCHAN,11

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 6b8dc5511f
commit caeebdc71f
5 changed files with 5 additions and 28 deletions

View File

@@ -311,10 +311,6 @@ static void lists_and_needs(void){
if(proc_format_needs&PROC_FILLCOM) proc_format_needs |= PROC_FILLENV;
}
/* FIXME broken filthy hack -- got to unify some stuff here */
if( ( (proc_format_needs|task_format_needs|needs_for_sort) & PROC_FILLWCHAN) && !wchan_is_number)
if (open_psdb(namelist_file)) wchan_is_number = 1;
if(thread_flags&TF_loose_tasks) needs_for_threads |= PROC_LOOSE_TASKS;
}