From 9675cf654d86464344e56705db7a71ea17f76c6f Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:21 +0200 Subject: Imported Upstream version 0.6.6+svn20070915 --- ProcessList.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h index b38cefc..8707ce4 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -39,11 +39,11 @@ in the source distribution for its full text. #endif #ifndef PROCSTATFILE -#define PROCSTATFILE "/proc/stat" +#define PROCSTATFILE PROCDIR "/stat" #endif #ifndef PROCMEMINFOFILE -#define PROCMEMINFOFILE "/proc/meminfo" +#define PROCMEMINFOFILE PROCDIR "/meminfo" #endif #ifndef MAX_NAME @@ -54,9 +54,13 @@ in the source distribution for its full text. #define MAX_READ 2048 #endif +#ifndef PER_PROCESSOR_FIELDS +#define PER_PROCESSOR_FIELDS 20 +#endif + -#ifdef DEBUG +#ifdef DEBUG_PROC typedef int(*vxscanf)(void*, const char*, va_list); #endif @@ -71,16 +75,27 @@ typedef struct ProcessList_ { int totalTasks; int runningTasks; + // Must match number of PER_PROCESSOR_FIELDS constant unsigned long long int* totalTime; unsigned long long int* userTime; unsigned long long int* systemTime; + unsigned long long int* systemAllTime; unsigned long long int* idleTime; unsigned long long int* niceTime; + unsigned long long int* ioWaitTime; + unsigned long long int* irqTime; + unsigned long long int* softIrqTime; + unsigned long long int* stealTime; unsigned long long int* totalPeriod; unsigned long long int* userPeriod; unsigned long long int* systemPeriod; + unsigned long long int* systemAllPeriod; unsigned long long int* idlePeriod; unsigned long long int* nicePeriod; + unsigned long long int* ioWaitPeriod; + unsigned long long int* irqPeriod; + unsigned long long int* softIrqPeriod; + unsigned long long int* stealPeriod; unsigned long long int totalMem; unsigned long long int usedMem; @@ -102,13 +117,14 @@ typedef struct ProcessList_ { bool treeView; bool highlightBaseName; bool highlightMegabytes; - #ifdef DEBUG + bool expandSystemTime; + #ifdef DEBUG_PROC FILE* traceFile; #endif } ProcessList; -#ifdef DEBUG +#ifdef DEBUG_PROC #define ProcessList_read(this, buffer, format, ...) ProcessList_xread(this, (vxscanf) vsscanf, buffer, format, ## __VA_ARGS__ ) #define ProcessList_fread(this, file, format, ...) ProcessList_xread(this, (vxscanf) vfscanf, file, format, ## __VA_ARGS__ ) -- cgit v1.2.3