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

Only compute counters is process is shown

parent 0cbdf8ba
......@@ -665,7 +665,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); \
......
......@@ -121,7 +121,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