dracut: add "--profile" option for profiling

master
Harald Hoyer 2011-08-12 13:24:25 +02:00
parent 1610a566c6
commit 57258a2c64
1 changed files with 8 additions and 0 deletions

8
dracut
View File

@ -61,6 +61,7 @@ Creates initial ramdisk images for preloading modules
--nolvmconf Do not include local /etc/lvm/lvm.conf
-h, --help This message
--debug Output debug information of the build process
--profile Output profile information of the build process
-L, --stdlog [0-6] Specify logging level (to standard error)
0 - suppress any messages
1 - only fatal errors
@ -222,6 +223,7 @@ while (($# > 0)); do
--lvmconf) lvmconf_l="yes";;
--nolvmconf) lvmconf_l="no";;
--debug) debug="yes";;
--profile) profile="yes";;
-v|--verbose) ((verbosity_mod_l++));;
-q|--quiet) ((verbosity_mod_l--));;
-l|--local) allowlocal="yes" ;;
@ -269,6 +271,12 @@ export PATH
set -x
}

[[ $profile ]] && {
export PS4='+ $(date "+%s.%N") ${BASH_SOURCE}@${LINENO}: ';
set -x
debug=yes
}

[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut

[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && \