From faf0990a24ceaba62d0f8b53b5844c03ce9cb6ad Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sat, 2 Apr 2022 18:50:03 +0200 Subject: [PATCH] mx_proc: Add sum_rss_anon to struct mx_proc_info --- mx_proc.c | 2 ++ mx_proc.h | 1 + 2 files changed, 3 insertions(+) diff --git a/mx_proc.c b/mx_proc.c index 7d402ebc..00b37a6b 100644 --- a/mx_proc.c +++ b/mx_proc.c @@ -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); } @@ -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; diff --git a/mx_proc.h b/mx_proc.h index c9006a9f..428620df 100644 --- a/mx_proc.h +++ b/mx_proc.h @@ -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 {