diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-02-04 08:49:15 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-02-17 15:30:15 -0200 |
commit | d0fc93d82c96b2b590caec90cb39635179629ff7 (patch) | |
tree | 34476420d8d3e4b112b8742aa4140991045a3fcc | |
parent | 0cbdf8ba271d874d2efd3171cff0d4ebeabc087f (diff) |
Only compute counters is process is shown
-rw-r--r-- | linux/LinuxProcessList.c | 2 | ||||
-rw-r--r-- | linux/LinuxProcessList.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index e72a023d..357bbff0 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -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); \ diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h index 310f5dfd..16de2335 100644 --- a/linux/LinuxProcessList.h +++ b/linux/LinuxProcessList.h @@ -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); \ |