Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
d0fc93d8
Commit
d0fc93d8
authored
Feb 04, 2018
by
Hisham Muhammad
Browse files
Only compute counters is process is shown
parent
0cbdf8ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
linux/LinuxProcessList.c
View file @
d0fc93d8
...
...
@@ -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); \
...
...
linux/LinuxProcessList.h
View file @
d0fc93d8
...
...
@@ -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); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment