[Vm-dev] [commit][3127] Have the Unix & Mac VMs print the process id and working directory when blocking

commits at squeakvm.org commits at squeakvm.org
Mon Nov 10 18:12:11 UTC 2014


Revision: 3127
Author:   eliot
Date:     2014-11-10 10:12:05 -0800 (Mon, 10 Nov 2014)
Log Message:
-----------
Have the Unix & Mac VMs print the process id and working directory when blocking
on error or assert fail.  Add scripts for the ARM VM archives.

Modified Paths:
--------------
    branches/Cog/platforms/Mac OS/vm/sqMacMain.c
    branches/Cog/platforms/unix/vm/sqUnixMain.c

Added Paths:
-----------
    branches/Cog/scripts/mkARMstackvmarchives
    branches/Cog/scripts/uploadARMvms

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Wed Nov  5 12:46:58 PST 2014
   + Mon Nov 10 10:11:51 PST 2014

Modified: branches/Cog/platforms/Mac OS/vm/sqMacMain.c
===================================================================
--- branches/Cog/platforms/Mac OS/vm/sqMacMain.c	2014-11-05 20:48:12 UTC (rev 3126)
+++ branches/Cog/platforms/Mac OS/vm/sqMacMain.c	2014-11-10 18:12:05 UTC (rev 3127)
@@ -287,8 +287,10 @@
 static void
 block()
 { struct timespec while_away_the_hours;
+  char pwd[PATH_MAX+1];
 
 	printf("blocking e.g. to allow attaching debugger\n");
+	printf("pid: %d pwd: %s vm:%s\n", (int)getpid(), argVec[0], getpw(pwd));
 	while (1) {
 		while_away_the_hours.tv_sec = 3600;
 		nanosleep(&while_away_the_hours, 0);

Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMain.c	2014-11-05 20:48:12 UTC (rev 3126)
+++ branches/Cog/platforms/unix/vm/sqUnixMain.c	2014-11-10 18:12:05 UTC (rev 3127)
@@ -909,8 +909,10 @@
 static void
 block()
 { struct timespec while_away_the_hours;
+  char pwd[MAXPATHLEN+1];
 
 	printf("blocking e.g. to allow attaching debugger\n");
+	printf("pid: %d pwd: %s vm:%s\n", (int)getpid(), argVec[0], getpw(pwd));
 	while (1) {
 		while_away_the_hours.tv_sec = 3600;
 		nanosleep(&while_away_the_hours, 0);

Added: branches/Cog/scripts/mkARMstackvmarchives
===================================================================
--- branches/Cog/scripts/mkARMstackvmarchives	                        (rev 0)
+++ branches/Cog/scripts/mkARMstackvmarchives	2014-11-10 18:12:05 UTC (rev 3127)
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Create the ARM Stack VM archives in products.  Output a check of version numbers
+# etc to products/MASVALOG
+IFS="	
+"
+
+case `uname -m` in
+   armv6* )  armarch="v6";;
+   armv7* )  armarch="v7";;
+        * )  echo "Error: this script is for ARM only."
+             exit 1;;
+esac
+
+cd `dirname $0`/../products
+SQB=squeak.stack.v3
+REV=
+TAG=
+EXES=
+
+while [ -n "$1" ]; do
+	case $1 in
+	-r)		shift;REV="$1";;
+	-t)		shift;TAG="$1";;
+	-?|-h)  echo usage: $0 [-r REV -t TAG]
+			exit 0
+	esac
+	shift
+done
+
+test -n "$REV" || REV=`grep 'SvnRawRevisionString.*Rev:' ../platforms/Cross/vm/sqSCCSVersion.h \
+	| sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
+test -n "$TAG" || TAG=`date +%g.%U.`$REV
+echo REV=$REV TAG=$TAG
+
+for archive in stklinuxhtARM stkspurlinuxhtARM; do
+	rm -rf $archive$armarch-$TAG.tgz
+	echo $archive '=>' $archive$armarch-$TAG.tgz
+	COPYFILE_DISABLE=1 tar czf $archive$armarch-$TAG.tgz $archive
+	EXES="$EXES	$archive/lib/squeak/[0-9.-]*/squeak"
+done
+
+for vm in $EXES
+do
+	echo
+	echo checking $vm version
+#	strings - $vm | egrep '\$Rev: |Interp.*VMMaker|Cogit.*VMMaker| built on ' | grep -v 'Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__' | sed 's/ uuid:.*//'
+	strings - $vm | egrep '\$Rev: |Interp.*VMMaker|Cogit.*VMMaker| built on ' | sed 's/ uuid:.*//'
+	echo checking $vm for asserts
+	strings - $vm | grep "assert[^0-9]*[0-9][0-9][0-9]"
+done 2>&1 | tee MASVALOG


Property changes on: branches/Cog/scripts/mkARMstackvmarchives
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/scripts/uploadARMvms
===================================================================
--- branches/Cog/scripts/uploadARMvms	                        (rev 0)
+++ branches/Cog/scripts/uploadARMvms	2014-11-10 18:12:05 UTC (rev 3127)
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Upload archives from products to a web/ftp site via ssh.
+RemoteUser=eliotmiranda at highland-park.dreamhost.com
+RemoteRoot=mirandabanda.org/files/Cog/VM
+IFS="	
+"
+
+case `uname -m` in
+   armv6* )  ARMARCH="v6";;
+   armv7* )  ARMARCH="v7";;
+        * )  echo "Error: this script is for ARM only."
+             exit 1;;
+esac
+
+REV=
+TAG=
+cd `dirname $0`/../products
+VERBOSE=
+
+while [ -n "$1" ]; do
+	case $1 in
+	-r)		shift;REV="$1";;
+	-t)		shift;TAG="$1";;
+	-?|-h)  echo usage: $0 [-r REV -t TAG]; exit 0;;
+	*)	echo usage: $0 [-r REV -t TAG]; exit 1;;
+	esac
+	shift
+done
+
+if [ -z "$REV" ]; then
+	REV="`svnversion .. | sed 's/^.*://'`"
+	case $REV in
+	*M)	echo -n "source tree is modified, are you sure you want to continue? "
+		read a
+		case $a in
+		y|Y)	;;
+		*)		exit 1
+		esac
+		REV="`svnversion | sed 's/^.*://' | sed 's/M//'`";;
+	esac
+fi
+
+if [ -z "$TAG" ]; then
+	TAG=`date +%g.%U.`$REV
+fi
+echo REV=$REV TAG=$TAG
+
+ARCHIVES="stklinuxhtARM$ARMARCH-$TAG.tgz	stkspurlinuxhtARM$ARMARCH-$TAG.tgz"
+
+for a in $ARCHIVES; do
+	echo upload $a
+done
+
+
+ssh -x $RemoteUser mkdir $RemoteRoot/VM.r$REV
+
+echo scp -p $ARCHIVES "$@" $RemoteUser:$RemoteRoot/VM.r$REV
+scp -p $ARCHIVES "$@" $RemoteUser:$RemoteRoot/VM.r$REV
+echo ssh $RemoteUser chmod a-w $RemoteRoot/VM.r$REV/* \\\; ls -al $RemoteRoot/VM.r$REV
+ssh $RemoteUser chmod a-w $RemoteRoot/VM.r$REV/* \; ls -al $RemoteRoot/VM.r$REV
+


Property changes on: branches/Cog/scripts/uploadARMvms
___________________________________________________________________
Added: svn:executable
   + *



More information about the Vm-dev mailing list