Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mxqps: show rss_anon instead of rss
  • Loading branch information
donald committed Apr 2, 2022
1 parent faf0990 commit f593d69
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mxqps.c
Expand Up @@ -18,17 +18,13 @@ int filter(const struct dirent *d)
return 1;
}

#define MX_PROC_TREE_NODE_IS_KERNEL_THREAD(x) ((x)->pinfo.pstat->ppid == 0 && (x)->pinfo.sum_rss == 0)
#define MX_PROC_TREE_NODE_IS_KERNEL_THREAD(x) ((x)->pinfo.pstat->ppid == 0 && (x)->pinfo.sum_rss_anon == 0)

int mx_proc_tree_node_print_debug(struct mx_proc_tree_node *ptn, int lvl)
{
assert(ptn);

struct mx_proc_tree_node *current;
long pagesize;

pagesize = sysconf(_SC_PAGESIZE);
assert(pagesize);

for (current = ptn; current; current=current->next) {
if (MX_PROC_TREE_NODE_IS_KERNEL_THREAD(current))
Expand All @@ -39,8 +35,8 @@ int mx_proc_tree_node_print_debug(struct mx_proc_tree_node *ptn, int lvl)
current->pinfo.pstat->ppid,
current->pinfo.pstat->pgrp,
current->pinfo.pstat->session,
current->pinfo.pstat->rss*pagesize/1024,
current->pinfo.sum_rss*pagesize/1024,
current->pinfo.pstat->rss_anon/1024,
current->pinfo.sum_rss_anon/1024,
current->pinfo.pstat->num_threads);

if (lvl>0)
Expand Down

0 comments on commit f593d69

Please sign in to comment.