Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mx_proc: Add sum_rss_anon to struct mx_proc_info
  • Loading branch information
donald committed Apr 2, 2022
1 parent b70ace5 commit faf0990
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mx_proc.c
Expand Up @@ -167,6 +167,7 @@ static void mx_proc_tree_update_parent_pinfo(struct mx_proc_tree_node *this, str
return;

this->pinfo.sum_rss += pinfo->sum_rss;
this->pinfo.sum_rss_anon += pinfo->sum_rss_anon;

mx_proc_tree_update_parent_pinfo(this->parent, pinfo);
}
Expand Down Expand Up @@ -269,6 +270,7 @@ static struct mx_proc_tree_node *mx_proc_tree_add(struct mx_proc_tree *pt, struc

new->pinfo.pstat = pps;
new->pinfo.sum_rss = pps->rss;
new->pinfo.sum_rss_anon = pps->rss_anon;

if (!(pt->root)) {
pt->root = new;
Expand Down
1 change: 1 addition & 0 deletions mx_proc.h
Expand Up @@ -7,6 +7,7 @@ struct mx_proc_info {
struct mx_proc_pid_stat *pstat;

unsigned long long int sum_rss;
unsigned long long int sum_rss_anon;
};

struct mx_proc_tree {
Expand Down

0 comments on commit faf0990

Please sign in to comment.