summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-02-04 08:49:15 +0100
committerHisham Muhammad <hisham@gobolinux.org>2018-02-26 20:13:09 -0300
commit709619800f0f5cea14c185fe453ac469e5ef590e (patch)
treeea0cfc1860dec04861052ff45c4ed0abec78170c
parenta72439c9b73fbd6255dcec844332356ab3028a6d (diff)
Only compute counters is process is shown
-rw-r--r--linux/LinuxProcessList.c2
-rw-r--r--linux/LinuxProcessList.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 2a450f5b..b89477eb 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -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); \
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index 102d2f94..c635b074 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -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); \

© 2014-2024 Faster IT GmbH | imprint | privacy policy