From: Harald Hoyer Date: Fri, 12 Aug 2011 11:24:25 +0000 (+0200) Subject: dracut: add "--profile" option for profiling X-Git-Tag: 013~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57258a2c64233a0b862ca230fbc953770dc64876;p=platform%2Fupstream%2Fdracut.git dracut: add "--profile" option for profiling --- diff --git a/dracut b/dracut index 9f70b5f..cf27b23 100755 --- a/dracut +++ b/dracut @@ -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" ]] && \