mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
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.
This commit is contained in:
@@ -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=$?
|
||||
|
||||
Reference in New Issue
Block a user