mirror of https://github.com/xzeldon/htop.git
Only compute counters is process is shown
This commit is contained in:
parent
0cbdf8ba27
commit
d0fc93d82c
|
@ -665,7 +665,7 @@ static void LinuxProcessList_readDelayAcctData(LinuxProcessList* this, LinuxProc
|
||||||
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
|
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
|
||||||
bool _b ## Ok = false; \
|
bool _b ## Ok = false; \
|
||||||
uint64_t _b ## Delta = 0; \
|
uint64_t _b ## Delta = 0; \
|
||||||
if (flags & _flag) { \
|
if (flags & _flag && lp->super.show) { \
|
||||||
if (!_var) { \
|
if (!_var) { \
|
||||||
_var = PerfCounter_new(lp->super.pid, _type, _config); \
|
_var = PerfCounter_new(lp->super.pid, _type, _config); \
|
||||||
_b ## Ok = PerfCounter_read(_var); \
|
_b ## Ok = PerfCounter_read(_var); \
|
||||||
|
|
|
@ -121,7 +121,7 @@ void ProcessList_delete(ProcessList* pl);
|
||||||
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
|
#define READ_COUNTER(_b, _var, _flag, _type, _config) \
|
||||||
bool _b ## Ok = false; \
|
bool _b ## Ok = false; \
|
||||||
uint64_t _b ## Delta = 0; \
|
uint64_t _b ## Delta = 0; \
|
||||||
if (flags & _flag) { \
|
if (flags & _flag && lp->super.show) { \
|
||||||
if (!_var) { \
|
if (!_var) { \
|
||||||
_var = PerfCounter_new(lp->super.pid, _type, _config); \
|
_var = PerfCounter_new(lp->super.pid, _type, _config); \
|
||||||
_b ## Ok = PerfCounter_read(_var); \
|
_b ## Ok = PerfCounter_read(_var); \
|
||||||
|
|
Loading…
Reference in New Issue