diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-09-21 12:40:45 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-11-25 20:49:39 +0100 |
commit | 9b31ee5b63f2559d102a743082fe97440e5dc895 (patch) | |
tree | 3816d5841e59ce201b871cc49205dfd5590acda8 /linux/LinuxProcessList.c | |
parent | c88c80e3bd0c858e4909412743064a4a1ed211b5 (diff) |
Drop taskstats conditional
taskstats is only checked on runtime if the column RCHAR, WCHAR, SYSCR,
SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE or IO_RATE is
selected.
taskstats is currently enabled by default.
Drop the taskstats configuration switch, to reduce the maintenance cost.
Diffstat (limited to 'linux/LinuxProcessList.c')
-rw-r--r-- | linux/LinuxProcessList.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 506bea66..35fa8787 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -410,8 +410,6 @@ static bool LinuxProcessList_statProcessDir(Process* process, const char* dirnam return true; } -#ifdef HAVE_TASKSTATS - static void LinuxProcessList_readIoFile(LinuxProcess* process, const char* dirname, const char* name, unsigned long long now) { char filename[MAX_NAME + 1]; filename[MAX_NAME] = '\0'; @@ -481,10 +479,6 @@ static void LinuxProcessList_readIoFile(LinuxProcess* process, const char* dirna } } -#endif - - - static bool LinuxProcessList_readStatmFile(LinuxProcess* process, const char* dirname, const char* name) { char filename[MAX_NAME + 1]; xSnprintf(filename, sizeof(filename), "%s/%s/statm", dirname, name); @@ -1130,14 +1124,11 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char* const struct dirent* entry; const Settings* settings = pl->settings; - #ifdef HAVE_TASKSTATS - unsigned long long now = tv.tv_sec * 1000LL + tv.tv_usec / 1000LL; - #endif - dir = opendir(dirname); if (!dir) return false; + unsigned long long now = tv.tv_sec * 1000ULL + tv.tv_usec / 1000ULL; int cpus = pl->cpuCount; bool hideKernelThreads = settings->hideKernelThreads; bool hideUserlandThreads = settings->hideUserlandThreads; @@ -1200,10 +1191,8 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char* continue; } - #ifdef HAVE_TASKSTATS if (settings->flags & PROCESS_FLAG_IO) LinuxProcessList_readIoFile(lp, dirname, name, now); - #endif if (! LinuxProcessList_readStatmFile(lp, dirname, name)) goto errorReadingProcess; |