Expand dump-functions for excluding user/unused memory (This is rebase commit for merging to development)

This commit is contained in:
Katsuya Horigome
2017-08-02 10:29:10 +09:00
committed by Ken Sato
parent 325082a571
commit a05b6e1ba8
171 changed files with 11516 additions and 1615 deletions

View File

@@ -0,0 +1,47 @@
#!/bin/sh
VMLINUX=/usr/lib/debug/lib/modules/3.10.0-693.1.1.el7.x86_64/vmlinux
if [ $# -lt 1 ]; then
echo "Error: too few arguments"
echo "usage: `basename $0` <vmcore> [outfile]"
exit 1
fi
VMCORE=$1
OUTFILE=$2
echo "***** vmcore file info ******************************"
ls -lh ${VMCORE}
if [ "X${OUTFILE}" = "X" ]; then
ext_opt=""
else
ext_opt="-o ${OUTFILE}"
fi
if [ ! -f "${VMCORE}" ]; then
echo "Error: vmcore (${VMCORE}) is not found" >&2
exit 1
fi
echo "***** Extract mcdump from vmcore *******************"
/usr/bin/expect -c "
set timeout -1
spawn /usr/bin/crash $VMLINUX $VMCORE
expect \"crash>\"
send \"mod -s ihk_smp_x86 $MCMOD_DIR/kmod/ihk-smp-x86.ko\n\"
expect \"crash>\"
send \"extend $MCMOD_DIR/lib/ldump2mcdump.so\n\"
expect \"crash>\"
send \"ldump2mcdump 0 $ext_opt\n\"
expect \"crash>\"
send \"extend -u $MCMOD_DIR/lib/ldump2mcdump.so\n\"
expect \"crash>\"
send \"quit\n\"
"
echo ""

View File

@@ -0,0 +1,16 @@
#!/bin/sh
NUMAS=$1
MEM_SIZE=$2
REP=$3
CHUNKS=""
for numa in ${NUMAS}
do
for rep in `seq 1 ${REP}`
do
CHUNKS="${CHUNKS}${MEM_SIZE}@${numa},"
done
done
echo ${CHUNKS%,}

10
test/dump/utils/kill_mcexec.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
count=`pgrep -c -f 'mcexec '`
if [ ${count} -gt 0 ]
then
echo "kill process :" ${count}
pgrep -l -f 'mcexec '
pgrep -f 'mcexec ' | xargs kill -9
fi

View File

@@ -0,0 +1,9 @@
#!/bin/sh
sleep 3
export TERM=xterm-256color
export DUMP_TEST_HOME=$(cd `dirname $0`/.. && pwd -P)
cd ${DUMP_TEST_HOME}
./go_linux_dump_test.sh

50
test/dump/utils/show_mckdump.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/bin/sh
#source ./config
export MCKERNEL=${MCMOD_DIR}/smp-x86/kernel/mckernel.img
export INFILE=$1
if [ "X$INFILE" = X -o "X$2" != X ]; then
echo "usage: `basename $0` <mckdump>" >&2
exit 1
fi
if [ ! -f "${INFILE}" ]; then
echo "Error: mckdump is not found" >&2
exit 1
fi
if [ ! -e "${MCKERNEL}" ]; then
echo "Error: mckernel.img is not found"
exit 1
fi
echo "***** dump_file info *************************"
ls -lh ${INFILE}
echo "***** Result of readelf -a ********************"
readelf -a ${INFILE}
echo ""
echo "***** Result of eclair ************************"
expect -c "
set timeout 20
spawn ${MCMOD_DIR}/bin/eclair -d $INFILE -k $MCKERNEL -l
expect \"(eclair)\"
send \"set pagination 0\n\"
expect \"(eclair)\"
send \"info threads\n\"
expect \"(eclair)\"
send \"info register\n\"
expect \"(eclair)\"
send \"bt\n\"
expect \"(eclair)\"
send \"quit\n\
"
echo "**********************************************"
exit 0