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:
12
ps/parser.c
12
ps/parser.c
@ -406,12 +406,6 @@ static const char *parse_sysv_option(void){
|
||||
/* note that AIX shows 2 lines for a normal process */
|
||||
thread_flags |= TF_U_m;
|
||||
break;
|
||||
case 'n': /* end */
|
||||
trace("-n sets namelist file\n");
|
||||
arg=get_opt_arg();
|
||||
if(!arg) return _("alternate System.map file must follow -n");
|
||||
namelist_file = arg;
|
||||
return NULL; /* can't have any more options */
|
||||
case 'o': /* end */
|
||||
/* Unix98 has gross behavior regarding this. From the following: */
|
||||
/* ps -o pid,nice=NICE,tty=TERMINAL,comm */
|
||||
@ -573,12 +567,6 @@ static const char *parse_bsd_option(void){
|
||||
trace("M MacOS X thread display, like AIX/Tru64\n");
|
||||
thread_flags |= TF_B_m;
|
||||
break;
|
||||
case 'N': /* end */
|
||||
trace("N specify namelist file\n");
|
||||
arg=get_opt_arg();
|
||||
if(!arg) return _("alternate System.map file must follow N");
|
||||
namelist_file = arg;
|
||||
return NULL; /* can't have any more options */
|
||||
case 'O': /* end */
|
||||
trace("O like o + defaults, add new columns after PID, also sort\n");
|
||||
arg=get_opt_arg();
|
||||
|
Reference in New Issue
Block a user