summaryrefslogtreecommitdiffstats
path: root/src/build/vpo
diff options
context:
space:
mode:
authorVan Lee <vanlee@us.ibm.com>2012-04-19 14:15:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-05-04 15:23:53 -0500
commitec60904ef97e4cdd4f547549c6380e8a5aaa09ba (patch)
tree9819c0065dfa5d5969204f79b3479efce28094fd /src/build/vpo
parent9a94e04ad4f91d72b43d42fc0a85e271085775e1 (diff)
downloadtalos-hostboot-ec60904ef97e4cdd4f547549c6380e8a5aaa09ba.tar.gz
talos-hostboot-ec60904ef97e4cdd4f547549c6380e8a5aaa09ba.zip
Fix continuous trace function losing traces in high traffic condition.
Change-Id: I9444e222e89e44017bf3039a09ecb28e9409a389 RTC: 39164 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/917 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/vpo')
-rw-r--r--[-rwxr-xr-x]src/build/vpo/do_sprint28
-rwxr-xr-xsrc/build/vpo/hb-istep10
2 files changed, 32 insertions, 6 deletions
diff --git a/src/build/vpo/do_sprint b/src/build/vpo/do_sprint
index 1d6690eb6..8e4a2af87 100755..100644
--- a/src/build/vpo/do_sprint
+++ b/src/build/vpo/do_sprint
@@ -176,6 +176,7 @@ sim_clocks=${AUTOVBU_SIMCLOCKS-2000000}
loopstart=${AUTOVBU_START-0}
loopmax=`expr $loopstart '+' ${AUTOVBU_LOOPS-2000}`
lines=${AUTOVBU_PRINTK_LINES-50}
+sample=${AUTOVBU_PRINTK_SAMPLE-30}
# If we requested checkpoints after loops or isteps, force a checkpoint after the hbitest as well
test "$chkpt_after_loops" = "--chkpt_after_loops" && chkpt_after_hbitest="--chkpt_after_hbitest"
@@ -397,6 +398,7 @@ if [ "$start_after_hbitest" != "--start_after_hbitest" ]; then
echo >$printk_tmp1
+ cat /dev/null >printk_out
if [ $loopcnt -ne 0 -a -d $AUTOVBU_TEST_DIR/trace_after_loop${loopcnt} ]; then
echo
@@ -420,12 +422,16 @@ if [ "$start_after_hbitest" != "--start_after_hbitest" ]; then
echo " export AUTOCHKPT_VERSION=$AUTOCHKPT_VERSION"
echo
+ $HB_TOOLS/hb-ContTrace --enable-cont-trace=1 --mute > /dev/null
+
while [ ! -f "$testloop_stop" -a $loopcnt -lt $loopmax ]; do
loopcnt=`expr $loopcnt + 1`
simclock $sim_clocks -quiet || exit 1
cur_cia=`GET_CIA`
echo "$loopcnt: $cur_cia"
+ $HB_TOOLS/hb-ContTrace --mute > /dev/null
+ cat hb-ContTrace.output >> tracMERG
if [ "$use_hb_trace" = "--use_hb_trace" ]; then
p8_ins_stop
$HB_TOOLS/hb-trace $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
@@ -436,13 +442,19 @@ if [ "$start_after_hbitest" != "--start_after_hbitest" ]; then
elif [ "$use_dump_l3" = "--use_dump_l3" ]; then
DUMP_L3_PRINTK ${addr} ${lines} >$printk_tmp2
else
- p8_ins_stop
- $HB_TOOLS/hb-printk $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
- p8_ins_start
+ if [ `expr $loopcnt % $sample` -eq 0 ];
+ then
+ $HB_TOOLS/hb-printk --mute > /dev/null
+ diff hb-Printk.output printk_out | sed -e 's/< //g' -e '1d'
+ mv hb-Printk.output printk_out
+ fi
+ fi
+ if [ -f $printk_tmp2 ];
+ then
+ echo >>$printk_tmp2
+ diff -a $printk_tmp1 $printk_tmp2 | egrep -a "^> " | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ mv $printk_tmp2 $printk_tmp1
fi
- echo >>$printk_tmp2
- diff -a $printk_tmp1 $printk_tmp2 | egrep -a "^> " | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
- mv $printk_tmp2 $printk_tmp1
grep 'HypeEmu: Illegal instruction' $printk_tmp1 >/dev/null
if [ $? -eq 0 ]; then
@@ -491,6 +503,10 @@ if [ "$start_after_hbitest" != "--start_after_hbitest" ]; then
simecho "Renew Tokens: `date`" -quiet
fi
done
+ $HB_TOOLS/hb-ContTrace --mute > /dev/null
+ cat hb-ContTrace.output >> tracMERG
+ $HB_TOOLS/hb-ContTrace --mute --last > /dev/null
+ cat hb-ContTrace.output >> tracMERG
date
rm -f $printk_tmp2 $printk_tmp1
diff --git a/src/build/vpo/hb-istep b/src/build/vpo/hb-istep
index 6bbcae7a3..81d96e190 100755
--- a/src/build/vpo/hb-istep
+++ b/src/build/vpo/hb-istep
@@ -132,6 +132,12 @@ my $g_SeqNum = int(rand(64));
my $pgmDir = `dirname $0`;
chomp( $pgmDir );
+my $hbToolsDir = $ENV{'HB_TOOLS'};
+if ( ! defined( $hbToolsDir) || ( $hbToolsDir eq "" ) )
+{
+ $hbToolsDir = $pgmDir; ## Set to tool directory
+}
+
my $hbDir = $ENV{'HB_IMGDIR'};
if ( ! defined( $hbDir) || ( $hbDir eq "" ) )
{
@@ -487,6 +493,8 @@ sub getSyncStatus( )
## sequence number to see if it has changed. rinse and repeat.
## Note: RunClocks will start instructions
VBU_Cacheline::RunClocks();
+ system ("$hbToolsDir/hb-ContTrace --mute > /dev/null");
+ system ("cat hb-ContTrace.output >> tracMERG");
## Stop instructions, flush L2
VBU_Cacheline::P8_Ins_Stop();
@@ -742,6 +750,8 @@ sub setMode( $ )
## advance HostBoot code by a certain # of cycles, then check the
## sequence number to see if it has changed. rinse and repeat.
VBU_Cacheline::RunClocks();
+ system ("$hbToolsDir/hb-ContTrace --mute > /dev/null");
+ system ("cat hb-ContTrace.output >> tracMERG");
## Stop instructions, flush L2
VBU_Cacheline::P8_Ins_Stop();
OpenPOWER on IntegriCloud