frysk.sys.Stat can be enhanced to read thread-specific information from the /proc filesystem. This information can be used to display to the user which threads have used more jiffies, memory, and other useful information.
frysk-sys/frysk/sys/proc: 2006-09-06 mcvet <mcvet@redhat.com> * Stat.java (tid): Refactored from the int pid. More correct variable name. (refreshThread): Added - supports reading proc stat information for threads belonging to a process. * cni/Stat.cxx (refreshThread): Added. Nearly identical to refresh() but handles individual threads belonging to a process. (refresh): Updated to use new variable tid. * cni/slurp.cxx (slurp_thread): Added. Reads from /proc/PID/task/TID/stat. * cni/slurp.hxx (slurp_thread): Added header for above function. frysk-gui/frysk/gui: 2006-09-06 mcvet <mcvet@redhat.com> * glade/procpop.glade: Added the tidColumnDialog dialog window. * glade/processpicker.glade: Changed layout of header so that it is displayed properly. frysk-gui/frysk/gui/monitor: 2006-09-06 mcvet <mcvet@redhat.com> * TIDColumnDialog.java: Added. Almost identical to the PIDColumnDialog, but needed because of the extra glade reference. * ThreadMenu.java (ThreadMenu): Removed static reference, turned into dynamic menu like ProcMenu. Added entries to deal with thread view customization like the process viewer. (getMenu): Removed. * StatusWidget.java (StatusWidget): Commented out some unneeded mouse listeners. * SessionProcTreeView.java (SessionProcTreeView): Addressing #3160. Added new variables to handle extended thread information. Uses the new dynamic ThreadMenu. Added new listeners for procPid and threadTidColumnDialogs. (mountThreadModel): Added listeners for all the new thread columns. (threadViewInit): Initialized and added information for all the new thread columns. (refreshProcTree): Refactored from refreshTree(). (refreshThreadTree): Added. (setProcCols): Refactored from setCols(). (setThreadCols): Added. (getProcColNames): Refactored from getColNames(). (getThreadColNames): Added. (getSelectedProc): Uses update getTidDC() method from the SessionProcDataModel. (save): Saves for the thread dialog as well. (load): Loads for the thread dialog as well. * SessionProcDataModel.java (tidDC): Refactored from pidDC. (statRead): Changed parameters to now accept a Task, since frysk.sys.Stat now handles reading thread information from /proc. Added a check to handle new input. (refreshProcRead): Refactored from refreshRead(). (refreshThreadRead): Added. (addTask): Now reads from Stat. (getTidDC): Refactored from getPidDC(). * ProcMenu.java (.menuItemEvent): Updated reference to the refactored refreshProcTree(). * PIDColumnDialog.java (save): Updated reference to the refactored getProcColNames(). (load): Ditto.