diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-10-06 19:24:22 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-10-06 19:24:57 +0200 |
commit | 47f025139d1c2e75781cdab40dc9195396133754 (patch) | |
tree | d160760fdea8095f82cfd382eb7640deb95918a7 /testsuite/buildok | |
parent | 2155081e1d9888cf57334bc57abb3fff9b49d8e1 (diff) | |
download | systemtap-steved-47f025139d1c2e75781cdab40dc9195396133754.tar.gz systemtap-steved-47f025139d1c2e75781cdab40dc9195396133754.tar.xz systemtap-steved-47f025139d1c2e75781cdab40dc9195396133754.zip |
Add proc_mem tapset, functions to query memory usage of the current process.
* tapset/proc_mem.stp: New tapset.
* testsuite/buildok/proc_mem.stp
* doc/SystemTap_Tapset_Reference/tapsets.tmpl (memory_stp): Include
tapset/proc_mem.stp.
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-x | testsuite/buildok/proc_mem.stp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/buildok/proc_mem.stp b/testsuite/buildok/proc_mem.stp new file mode 100755 index 00000000..8fc2512a --- /dev/null +++ b/testsuite/buildok/proc_mem.stp @@ -0,0 +1,13 @@ +#! stap -p4 + +probe begin { + printf("%d\n", proc_mem_size()); + printf("%d\n", proc_mem_rss()); + printf("%d\n", proc_mem_shr()); + printf("%d\n", proc_mem_txt()); + printf("%d\n", proc_mem_data()); + printf("%d\n", mem_page_size()) + printf("%s\n", bytes_to_string(0)); + printf("%s\n", pages_to_string(0)); + printf("%s\n", proc_mem_string()); +} |