Only compute counters is process is shown

This commit is contained in:
Hisham Muhammad 2018-02-04 08:49:15 +01:00
parent a72439c9b7
commit 709619800f
2 changed files with 2 additions and 2 deletions

View File

@ -671,7 +671,7 @@ static void LinuxProcessList_readDelayAcctData(LinuxProcessList* this, LinuxProc
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
bool _b ## Ok = false; \
uint64_t _b ## Delta = 0; \
if (flags & _flag) { \
if (flags & _flag && lp->super.show) { \
if (!_var) { \
_var = PerfCounter_new(lp->super.pid, _type, _config); \
_b ## Ok = PerfCounter_read(_var); \

View File

@ -126,7 +126,7 @@ void ProcessList_delete(ProcessList* pl);
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
bool _b ## Ok = false; \
uint64_t _b ## Delta = 0; \
if (flags & _flag) { \
if (flags & _flag && lp->super.show) { \
if (!_var) { \
_var = PerfCounter_new(lp->super.pid, _type, _config); \
_b ## Ok = PerfCounter_read(_var); \