]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - scripts/profile-kpios-pre.sh
4 trap "PROFILE_KPIOS_READY=1" SIGHUP
16 RUN_REGION_NOISE
=${10}
18 RUN_THREAD_DELAY
=${12}
22 PROFILE_KPIOS_BIN
=/home
/behlendo
/src
/zfs
/scripts
/profile-kpios.sh
25 OPROFILE_LOG
=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt
26 PROFILE_PID
=${RUN_LOG_DIR}/${RUN_ID}/pid
27 RUN_ARGS
=${RUN_LOG_DIR}/${RUN_ID}/args
29 if [ "${RUN_PHASE}" != "pre" ]; then
33 rm -Rf ${RUN_LOG_DIR}/${RUN_ID}/
34 mkdir
-p ${RUN_LOG_DIR}/${RUN_ID}/
36 echo "PHASE=${RUN_PHASE}" >>${RUN_ARGS}
37 echo "LOG_DIR=${RUN_LOG_DIR}" >>${RUN_ARGS}
38 echo "ID=${RUN_ID}" >>${RUN_ARGS}
39 echo "POOL=${RUN_POOL}" >>${RUN_ARGS}
40 echo "CHUNK_SIZE=${RUN_CHUNK_SIZE}" >>${RUN_ARGS}
41 echo "REGION_SIZE=${RUN_REGION_SIZE}" >>${RUN_ARGS}
42 echo "THREAD_COUNT=${RUN_THREAD_COUNT}" >>${RUN_ARGS}
43 echo "REGION_COUNT=${RUN_REGION_COUNT}" >>${RUN_ARGS}
44 echo "OFFSET=${RUN_OFFSET}" >>${RUN_ARGS}
45 echo "REGION_NOISE=${RUN_REGION_NOISE}" >>${RUN_ARGS}
46 echo "CHUNK_NOISE=${RUN_CHUNK_NOISE}" >>${RUN_ARGS}
47 echo "THREAD_DELAY=${RUN_THREAD_DELAY}" >>${RUN_ARGS}
48 echo "FLAGS=${RUN_FLAGS}" >>${RUN_ARGS}
49 echo "RESULT=${RUN_RESULT}" >>${RUN_ARGS}
51 # XXX: Oprofile support seems to be broken when I try and start
52 # it via a user mode helper script, I suspect the setup is failing.
53 # opcontrol --init >>${OPROFILE_LOG} 2>&1
54 # opcontrol --setup --vmlinux=/boot/vmlinux >>${OPROFILE_LOG} 2>&1
56 # Start the profile script
57 ${PROFILE_KPIOS_BIN} ${RUN_PHASE} ${RUN_LOG_DIR} ${RUN_ID} &
58 echo "$!" >${PROFILE_PID}
60 # Sleep waiting for profile script to be ready, it will
61 # signal us via SIGHUP when it is ready to start profiling.
62 while [ ${PROFILE_KPIOS_READY} -eq 0 ]; do
66 # opcontrol --start-daemon >>${OPROFILE_LOG} 2>&1
67 # opcontrol --start >>${OPROFILE_LOG} 2>&1