Commit 70961980 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Only compute counters is process is shown

parent a72439c9
......@@ -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); \
......
......@@ -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); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment