1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
This commit is contained in:
Jakub Jelinek
2007-07-31 13:33:18 +00:00
parent d6220e9ee3
commit 32c075e1f0
448 changed files with 13841 additions and 10982 deletions

View File

@@ -44,7 +44,7 @@ Profile memory usage of PROGRAM.
-d,--data=FILE Generate binary data file and store it in FILE
-u,--unbuffered Don't buffer output
-b,--buffer=SIZE Collect SIZE entries before writing them out
--no-timer Don't collect additional information through timer
--no-timer Don't collect additional information though timer
-m,--mmap Also trace mmap & friends
-?,--help Print this help and exit
@@ -71,12 +71,21 @@ do_version() {
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
" "2007"
" "2006"
printf $"Written by %s.
" "Ulrich Drepper"
exit 0
}
# These variables are local
buffer=
data=
memusagestat_args=
notimer=
png=
progname=
tracemmap=
# Process arguments. But stop as soon as the program name is found.
while test $# -gt 0; do
case "$1" in
@@ -213,15 +222,8 @@ datafile=
if test -n "$data"; then
datafile="$data"
elif test -n "$png"; then
datafile=$(mktemp ${TMPDIR:-/tmp}/memusage.XXXXXX 2> /dev/null)
if test $? -ne 0; then
# Lame, but if there is no `mktemp' program the user cannot expect more.
if test "$RANDOM" != "$RANDOM"; then
datafile=${TMPDIR:-/tmp}/memusage.$RANDOM
else
datafile=${TMPDIR:-/tmp}/memusage.$$
fi
fi
datafile=$(mktemp -t memusage.XXXXXX) || exit
trap 'rm -f "$datafile"; exit 1' HUP INT QUIT TERM PIPE
fi
if test -n "$datafile"; then
add_env="$add_env MEMUSAGE_OUTPUT=$datafile"