-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
file=${1} | ||
OLDIFS=$IFS | ||
echo "------------------------" | ||
echo -n "malloc: " | ||
grep -ni allocated ${file} | wc -l | ||
echo "------------------------" | ||
echo -n "mfree: " | ||
grep -ni freeing ${file} | wc -l | ||
echo "------------------------" | ||
echo "Inconsistent alloced to free: " | ||
tools/mm_trace.sh ${file} | grep \:1 | ||
echo "------------------------" | ||
echo -n "Warns: " | ||
warns=`grep -ni "WARN - " ${file}` | ||
let i=0 | ||
IFS=$'\n' | ||
for j in ${warns}; do | ||
let i+=1 | ||
done | ||
echo ${i} | ||
if [ "${i}" -gt "0" ]; then | ||
for j in ${warns}; do | ||
echo ${j} | ||
done | ||
fi | ||
echo "------------------------" | ||
echo -n "Nops: " | ||
grep -ni "Sent NOP" ${file} | wc -l | ||
echo "------------------------" | ||
echo -n "KeepAlives: " | ||
grep -ni "keepalive - Woke up" ${file} | wc -l | ||
echo "------------------------" | ||
echo -n "Execs: " | ||
grep -ni "mdm_device_exec" ${file} | grep -i start| wc -l | ||
echo "------------------------" | ||
echo -n "73xx Execs: " | ||
grep 73xx_exec ${file} | grep -vi pre | grep -vi post | grep -i start | grep -vi got | wc -l | ||
echo "------------------------" | ||
echo -n "8426 Execs: " | ||
grep 8426_exec ${file} | grep -vi pre | grep -vi post | grep -i start | grep -vi got | wc -l | ||
echo "------------------------" | ||
echo -n "9xxx Execs: " | ||
grep 9xxx_exec ${file} | grep -vi pre | grep -vi post | grep -i start | grep -vi got | wc -l | ||
echo "------------------------" | ||
echo -n "Errors: " | ||
errors=`grep -n "ERROR - " ${file}` | ||
let i=0 | ||
for j in ${errors}; do | ||
let i+=1 | ||
done | ||
echo ${i} | ||
if [ "${i}" -gt "0" ]; then | ||
for j in ${errors}; do | ||
echo ${j} | ||
done | ||
fi | ||
echo "------------------------" | ||
IFS=$OLDIFS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file=${1} | ||
grep -i allocated ${file} | cut -d'x' -f3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file=${1} | ||
grep -i freeing ${file} | cut -d'x' -f3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
tools/mm_debug_get_freed.sh > /tmp/freed | ||
tools/mm_debug_get_allocated.sh > /tmp/allocated | ||
for i in `cat /tmp/freed`; do grep ${i} /tmp/allocated > /dev/null; echo ${i}\:${?}; done | grep \:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
tools/mm_debug_get_freed.sh > /tmp/freed | ||
tools/mm_debug_get_allocated.sh > /tmp/allocated | ||
for i in `cat /tmp/allocated`; do grep ${i} /tmp/freed > /dev/null; echo ${i}\:${?}; done | grep \:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
file=${1} | ||
tools/mm_debug_get_freed.sh ${file} > /tmp/freed | ||
tools/mm_debug_get_allocated.sh ${file} > /tmp/allocated | ||
for i in `cat /tmp/allocated | sort -u`; do | ||
echo -n "A:${i}:" | ||
total=`grep ${i} ${file} | wc -l | tr -d "\t"` | ||
echo -n "$total:" | ||
mod=$(($total % 2)) | ||
if [ ! "${mod}" -eq "0" ]; then | ||
echo "1" | ||
else | ||
echo "0" | ||
fi | ||
done | ||
for i in `cat /tmp/freed | sort -u`; do | ||
echo -n "F:${i}:" | ||
total=`grep ${i} ${file} | wc -l | tr -d "\t"` | ||
echo -n "$total:" | ||
mod=$(($total % 2)) | ||
if [ ! "${mod}" -eq "0" ]; then | ||
echo "1" | ||
else | ||
echo "0" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
rm /tmp/runall.tmp | ||
touch /tmp/runall.tmp | ||
|
||
let i=1 | ||
while [ "${i}" -le "${2}" ]; do | ||
echo Alcatel: $i | ||
time php example_Alcatel_73xx.php ${1} 34000 30000 300000 2>&1>>/tmp/runall.tmp& | ||
echo ZTE8426: $i | ||
time php example_ZTE_8426.php ${1} 34000 30000 300000 2>&1>>/tmp/runall.tmp& | ||
echo ZTE9xxx: $i | ||
time php example_ZTE_9xxx.php ${1} 34000 30000 300000 2>&1>>/tmp/runall.tmp& | ||
let i+=1 | ||
done |