refined library i/f and improved performance
Library changes readproc . added readeither to more efficiently fill both process and thread proc_t . added readproctab3, uses readeither . included task path support in: fill_cgroup_cvt, fill_cmdline_cvt, read_unvectored . QUICK_THREADS #define allows copying process info vs. repeatedly reading . simple_nexttid no longer values ppid . path var made non-static in readtask . documented 'proc_data_t' in .h file . tweaked some c comments & formatting library.map . added new readeither, readproctab3 Program changes ps . exploits readproctab3 where possible . improved args/comm compliance top . exploits readeither
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -284,7 +284,6 @@ static void lists_and_needs(void){
|
||||
}
|
||||
if(!unix_f_option){
|
||||
proc_format_needs &= ~PROC_FILLCOM;
|
||||
proc_format_needs |= PROC_EDITCMDLCVT;
|
||||
needs_for_sort &= ~PROC_FILLCOM;
|
||||
}
|
||||
// convert ARG to COM as a standard
|
||||
@ -295,7 +294,7 @@ static void lists_and_needs(void){
|
||||
if(bsd_e_option){
|
||||
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;
|
||||
@ -508,7 +507,7 @@ static void fancy_spew(void){
|
||||
}
|
||||
|
||||
if(thread_flags & TF_loose_tasks){
|
||||
pd = readproctab2(want_this_proc_nop, want_this_proc_pcpu, ptp);
|
||||
pd = readproctab3(want_this_proc_pcpu, ptp);
|
||||
}else{
|
||||
pd = readproctab2(want_this_proc_pcpu, (void*)0xdeadbeaful, ptp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user