Skip to content

Commit

Permalink
Rename ProcessList to ProcessTable throughout
Browse files Browse the repository at this point in the history
Following up with some discusson from a few months back,
where it was proposed that ProcessTable is a better name.
This data structure is definitely not a list ... if it
was one-dimensional it'd be a set, but in practice it has
much more in common with a two-dimensional table.

The Process table is a familiar operating system concept
for many people too so it resonates a little in that way
as well.
  • Loading branch information
natoscott committed Aug 31, 2023
1 parent 214166a commit b74673f
Show file tree
Hide file tree
Showing 57 changed files with 538 additions and 538 deletions.
2 changes: 1 addition & 1 deletion Action.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ in the source distribution for its full text.
#include "MainPanel.h"
#include "OpenFilesScreen.h"
#include "Process.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "ProcessLocksScreen.h"
#include "ProvideCurses.h"
#include "Scheduling.h"
Expand Down
2 changes: 1 addition & 1 deletion CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in the source distribution for its full text.
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "Settings.h"
#include "XUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ What's new in version 3.2.1
* On Solaris, fix the build
* On NetBSD, OpenBSD and Solaris ensure env buffer size is sufficient
* On Linux, resolve processes exiting interfering with sampling
* Fix ProcessList quadratic removal when scanning processes
* Fix ProcessTable quadratic removal when scanning processes
* Under LXC, limit CPU count to that given by /proc/cpuinfo
* Improve container detection for LXC
* Some minor documentation fixes
Expand Down
2 changes: 1 addition & 1 deletion ClockMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in the source distribution for its full text.

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"
#include "ProcessTable.h"


static const int ClockMeter_attributes[] = {
Expand Down
8 changes: 4 additions & 4 deletions CommandLine.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ in the source distribution for its full text.
#include "Panel.h"
#include "Platform.h"
#include "Process.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "ProvideCurses.h"
#include "ScreenManager.h"
#include "Settings.h"
Expand Down Expand Up @@ -341,9 +341,9 @@ int CommandLine_run(int argc, char** argv) {
Hashtable* ds = DynamicScreens_new();

Machine* host = Machine_new(ut, flags.userId);
ProcessList* pl = ProcessList_new(host, flags.pidMatchList);
ProcessTable* pt = ProcessTable_new(host, flags.pidMatchList);
Settings* settings = Settings_new(host->activeCPUs, dm, dc, ds);
Machine_populateTablesFromSettings(host, settings, &pl->super);
Machine_populateTablesFromSettings(host, settings, &pt->super);

Header* header = Header_new(host, 2);
Header_populateFromSettings(header);
Expand Down Expand Up @@ -402,7 +402,7 @@ int CommandLine_run(int argc, char** argv) {
Machine_scanTables(host);

if (settings->ss->allBranchesCollapsed)
Table_collapseAllBranches(&pl->super);
Table_collapseAllBranches(&pt->super);

ScreenManager_run(scr, NULL, NULL, NULL);

Expand Down
2 changes: 1 addition & 1 deletion DateMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in the source distribution for its full text.

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"
#include "ProcessTable.h"


static const int DateMeter_attributes[] = {
Expand Down
2 changes: 1 addition & 1 deletion DateTimeMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in the source distribution for its full text.

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"
#include "ProcessTable.h"


static const int DateTimeMeter_attributes[] = {
Expand Down
2 changes: 1 addition & 1 deletion DiskIOMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in the source distribution for its full text.
#include "Meter.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
2 changes: 1 addition & 1 deletion DynamicColumn.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct DynamicColumn_ {
char* description; /* displayed in setup menu (detail) */
int width; /* display width +/- for value alignment */
bool enabled; /* false == ignore this column (until enabled) */
Table* table; /* pointer to DynamicScreen or ProcessList */
Table* table; /* pointer to DynamicScreen or ProcessTable */
} DynamicColumn;

Hashtable* DynamicColumns_new(void);
Expand Down
2 changes: 1 addition & 1 deletion DynamicMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
2 changes: 1 addition & 1 deletion LoadAverageMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
40 changes: 20 additions & 20 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ myhtopsources = \
OptionItem.c \
Panel.c \
Process.c \
ProcessList.c \
ProcessLocksScreen.c \
ProcessTable.c \
Row.c \
RichString.c \
Scheduling.c \
Expand Down Expand Up @@ -141,8 +141,8 @@ myhtopheaders = \
OptionItem.h \
Panel.h \
Process.h \
ProcessList.h \
ProcessLocksScreen.h \
ProcessTable.h \
ProvideCurses.h \
ProvideTerm.h \
RichString.h \
Expand Down Expand Up @@ -178,7 +178,7 @@ linux_platform_headers = \
linux/LibSensors.h \
linux/LinuxMachine.h \
linux/LinuxProcess.h \
linux/LinuxProcessList.h \
linux/LinuxProcessTable.h \
linux/Platform.h \
linux/PressureStallMeter.h \
linux/ProcessField.h \
Expand All @@ -201,7 +201,7 @@ linux_platform_sources = \
linux/LibSensors.c \
linux/LinuxMachine.c \
linux/LinuxProcess.c \
linux/LinuxProcessList.c \
linux/LinuxProcessTable.c \
linux/Platform.c \
linux/PressureStallMeter.c \
linux/SELinuxMeter.c \
Expand All @@ -221,7 +221,7 @@ endif

freebsd_platform_headers = \
freebsd/FreeBSDMachine.h \
freebsd/FreeBSDProcessList.h \
freebsd/FreeBSDProcessTable.h \
freebsd/FreeBSDProcess.h \
freebsd/Platform.h \
freebsd/ProcessField.h \
Expand All @@ -237,7 +237,7 @@ freebsd_platform_headers = \
freebsd_platform_sources = \
freebsd/Platform.c \
freebsd/FreeBSDMachine.c \
freebsd/FreeBSDProcessList.c \
freebsd/FreeBSDProcessTable.c \
freebsd/FreeBSDProcess.c \
generic/fdstat_sysctl.c \
generic/gettime.c \
Expand All @@ -257,7 +257,7 @@ endif

dragonflybsd_platform_headers = \
dragonflybsd/DragonFlyBSDMachine.h \
dragonflybsd/DragonFlyBSDProcessList.h \
dragonflybsd/DragonFlyBSDProcessTable.h \
dragonflybsd/DragonFlyBSDProcess.h \
dragonflybsd/Platform.h \
dragonflybsd/ProcessField.h \
Expand All @@ -268,7 +268,7 @@ dragonflybsd_platform_headers = \

dragonflybsd_platform_sources = \
dragonflybsd/DragonFlyBSDMachine.c \
dragonflybsd/DragonFlyBSDProcessList.c \
dragonflybsd/DragonFlyBSDProcessTable.c \
dragonflybsd/DragonFlyBSDProcess.c \
dragonflybsd/Platform.c \
generic/fdstat_sysctl.c \
Expand All @@ -293,7 +293,7 @@ netbsd_platform_headers = \
netbsd/ProcessField.h \
netbsd/NetBSDMachine.h \
netbsd/NetBSDProcess.h \
netbsd/NetBSDProcessList.h
netbsd/NetBSDProcessTable.h

netbsd_platform_sources = \
generic/fdstat_sysctl.c \
Expand All @@ -303,7 +303,7 @@ netbsd_platform_sources = \
netbsd/Platform.c \
netbsd/NetBSDMachine.c \
netbsd/NetBSDProcess.c \
netbsd/NetBSDProcessList.c
netbsd/NetBSDProcessTable.c

if HTOP_NETBSD
myhtopplatheaders = $(netbsd_platform_headers)
Expand All @@ -318,7 +318,7 @@ openbsd_platform_headers = \
generic/hostname.h \
generic/uname.h \
openbsd/OpenBSDMachine.h \
openbsd/OpenBSDProcessList.h \
openbsd/OpenBSDProcessTable.h \
openbsd/OpenBSDProcess.h \
openbsd/Platform.h \
openbsd/ProcessField.h
Expand All @@ -328,7 +328,7 @@ openbsd_platform_sources = \
generic/hostname.c \
generic/uname.c \
openbsd/OpenBSDMachine.c \
openbsd/OpenBSDProcessList.c \
openbsd/OpenBSDProcessTable.c \
openbsd/OpenBSDProcess.c \
openbsd/Platform.c

Expand All @@ -343,7 +343,7 @@ endif
darwin_platform_headers = \
darwin/DarwinMachine.h \
darwin/DarwinProcess.h \
darwin/DarwinProcessList.h \
darwin/DarwinProcessTable.h \
darwin/Platform.h \
darwin/PlatformHelpers.h \
darwin/ProcessField.h \
Expand All @@ -361,7 +361,7 @@ darwin_platform_sources = \
darwin/PlatformHelpers.c \
darwin/DarwinMachine.c \
darwin/DarwinProcess.c \
darwin/DarwinProcessList.c \
darwin/DarwinProcessTable.c \
generic/fdstat_sysctl.c \
generic/gettime.c \
generic/hostname.c \
Expand All @@ -387,7 +387,7 @@ solaris_platform_headers = \
solaris/Platform.h \
solaris/SolarisMachine.h \
solaris/SolarisProcess.h \
solaris/SolarisProcessList.h \
solaris/SolarisProcessTable.h \
zfs/ZfsArcMeter.h \
zfs/ZfsArcStats.h \
zfs/ZfsCompressedArcMeter.h
Expand All @@ -399,7 +399,7 @@ solaris_platform_sources = \
solaris/Platform.c \
solaris/SolarisMachine.c \
solaris/SolarisProcess.c \
solaris/SolarisProcessList.c \
solaris/SolarisProcessTable.c \
zfs/ZfsArcMeter.c \
zfs/ZfsCompressedArcMeter.c

Expand All @@ -426,7 +426,7 @@ pcp_platform_headers = \
pcp/PCPDynamicScreen.h \
pcp/PCPMachine.h \
pcp/PCPProcess.h \
pcp/PCPProcessList.h \
pcp/PCPProcessTable.h \
zfs/ZfsArcMeter.h \
zfs/ZfsArcStats.h \
zfs/ZfsCompressedArcMeter.h
Expand All @@ -444,7 +444,7 @@ pcp_platform_sources = \
pcp/PCPDynamicScreen.c \
pcp/PCPMachine.c \
pcp/PCPProcess.c \
pcp/PCPProcessList.c \
pcp/PCPProcessTable.c \
zfs/ZfsArcMeter.c \
zfs/ZfsCompressedArcMeter.c

Expand All @@ -463,14 +463,14 @@ unsupported_platform_headers = \
unsupported/ProcessField.h \
unsupported/UnsupportedMachine.h \
unsupported/UnsupportedProcess.h \
unsupported/UnsupportedProcessList.h
unsupported/UnsupportedProcessTable.h

unsupported_platform_sources = \
generic/gettime.c \
unsupported/Platform.c \
unsupported/UnsupportedMachine.c \
unsupported/UnsupportedProcess.c \
unsupported/UnsupportedProcessList.c
unsupported/UnsupportedProcessTable.c

if HTOP_UNSUPPORTED
myhtopplatsources = $(unsupported_platform_sources)
Expand Down
2 changes: 1 addition & 1 deletion NetworkIOMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "Object.h"
#include "Platform.h"
#include "Process.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
8 changes: 4 additions & 4 deletions Process.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Macros.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProcessTable.h"
#include "DynamicColumn.h"
#include "RichString.h"
#include "Scheduling.h"
Expand Down Expand Up @@ -826,9 +826,9 @@ static bool Process_matchesFilter(const Process* this, const Table* table) {
if (incFilter && !String_contains_i(Process_getCommand(this), incFilter, true))
return true;

const ProcessList* pl = (const ProcessList*) host->activeTable;
assert(Object_isA((const Object*) pl, (const ObjectClass*) &ProcessList_class));
if (pl->pidMatchList && !Hashtable_get(pl->pidMatchList, Process_getThreadGroup(this)))
const ProcessTable* pt = (const ProcessTable*) host->activeTable;
assert(Object_isA((const Object*) pt, (const ObjectClass*) &ProcessTable_class));
if (pt->pidMatchList && !Hashtable_get(pt->pidMatchList, Process_getThreadGroup(this)))
return true;

return false;
Expand Down
59 changes: 0 additions & 59 deletions ProcessList.h

This file was deleted.

Loading

0 comments on commit b74673f

Please sign in to comment.