-
-
Save agentzh/08df635987f70a8eca21df360a46ad84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tapset/linux/proc_mem.stp b/tapset/linux/proc_mem.stp | |
index 2b152f6ae..a9048c322 100644 | |
--- a/tapset/linux/proc_mem.stp | |
+++ b/tapset/linux/proc_mem.stp | |
@@ -71,6 +71,11 @@ enum { | |
return @const("MM_ANONPAGES") | |
} | |
+@__private30 function _MM_SHMEMPAGES:long() | |
+{ | |
+ return @const("MM_SHMEMPAGES") | |
+} | |
+ | |
@__private30 function _stp_get_mm_counter:long(mm_ptr:long, member:long) | |
{ | |
mm = & @mm(mm_ptr) | |
@@ -167,7 +172,9 @@ function proc_mem_rss:long () | |
mm = @task(task)->mm | |
if (mm != 0) | |
return (_stp_get_mm_counter(mm, _MM_FILEPAGES()) | |
- + _stp_get_mm_counter(mm, _MM_ANONPAGES())) | |
+ + _stp_get_mm_counter(mm, _MM_ANONPAGES()) | |
+ + _stp_get_mm_counter(mm, _MM_SHMEMPAGES()) | |
+ ) | |
} | |
return 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment