about summary refs log tree commit diff
path: root/malloc/memusage.sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-05-01 19:15:46 +0000
committerUlrich Drepper <drepper@redhat.com>2002-05-01 19:15:46 +0000
commit94eb5b361c13426d57c5fc2bbd4a1de080c39d7e (patch)
tree943389b4a72e398feb0753113509bf92d70604d3 /malloc/memusage.sh
parent531bafd8a6384b15f1ddc7f2360bb55a4542856a (diff)
downloadglibc-94eb5b361c13426d57c5fc2bbd4a1de080c39d7e.tar.gz
glibc-94eb5b361c13426d57c5fc2bbd4a1de080c39d7e.tar.xz
glibc-94eb5b361c13426d57c5fc2bbd4a1de080c39d7e.zip
Update.
2002-05-01  Ulrich Drepper  <drepper@redhat.com>

	* malloc/memusage.c: Add support for tracking mmap & friends.
	* malloc/memusage.sh: Implement -m/--mmap option.
Diffstat (limited to 'malloc/memusage.sh')
-rwxr-xr-xmalloc/memusage.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index 0c383268c6..877c17be4e 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -44,6 +44,7 @@ Profile memory usage of PROGRAM.
    -u,--unbuffered        Don't buffer output
    -b,--buffer=SIZE       Collect SIZE entries before writing them out
       --no-timer          Don't collect additional information though timer
+   -m,--mmap              Also trace mmap & friends
 
    -?,--help              Print this help and exit
       --usage             Give a short usage message
@@ -134,6 +135,9 @@ while test $# -gt 0; do
   --n | --no | --no- | --no-t | --no-ti | --no-tim | --no-time | --no-timer)
     notimer=yes
     ;;
+  -m | --m | --mm | --mma | --mmap)
+    tracemmap=yes
+    ;;
   -t | --tim | --time | --time- | --time-b | --time-ba | --time-bas | --time-base | --time-based)
     memusagestat_args="$memusagestat_args -t"
     ;;
@@ -234,6 +238,11 @@ if test -n "$notimer"; then
   add_env="$add_env MEMUSAGE_NO_TIMER=yes"
 fi
 
+# Trace mmap.
+if test -n "$tracemmap"; then
+  add_env="$add_env MEMUSAGE_TRACE_MMAP=yes"
+fi
+
 # Execute the program itself.
 eval $add_env '"$@"'
 result=$?