[Vm-dev] [commit][2759] CogVM source as per VMMaker.oscog-eem.312

commits at squeakvm.org commits at squeakvm.org
Thu Jul 25 23:57:09 UTC 2013


Revision: 2759
Author:   eliot
Date:     2013-07-25 16:57:06 -0700 (Thu, 25 Jul 2013)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.312

Add tracing of GCs and code compactions to primTraceLog.

Modified Paths:
--------------
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nscogsrc/vm/interp.h
    branches/Cog/nscogsrc/vm/vmCallback.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/src/vm/interp.h
    branches/Cog/src/vm/vmCallback.h

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

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1056,6 +1056,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1239,9 +1240,9 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
-_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt needGCFlag;
 _iss sqInt jmpDepth;
@@ -1978,7 +1979,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.311";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.312";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17573,6 +17574,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -18997,13 +19003,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -22318,6 +22324,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -23659,6 +23673,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -46863,6 +46885,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/nscogsrc/vm/cointerp.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1059,6 +1059,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1242,9 +1243,9 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
-_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt needGCFlag;
 _iss sqInt jmpDepth;
@@ -1981,7 +1982,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.311";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.312";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17582,6 +17583,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -19006,13 +19012,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -22327,6 +22333,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -23668,6 +23682,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -46872,6 +46894,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/nscogsrc/vm/interp.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/nscogsrc/vm/vmCallback.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 #define VM_CALLBACK_INC 1


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Thu Jul 25 11:12:49 PDT 2013
   + Thu Jul 25 16:56:39 PDT 2013

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/cointerp.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1047,6 +1047,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1229,9 +1230,9 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
-_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt needGCFlag;
 _iss sqInt jmpDepth;
@@ -1968,7 +1969,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.311]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.312]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -13498,6 +13499,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -14911,13 +14917,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -18142,6 +18148,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -19274,6 +19288,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -42345,6 +42367,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/cointerp.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 

Modified: branches/Cog/src/vm/cointerpmt.c
===================================================================
--- branches/Cog/src/vm/cointerpmt.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/cointerpmt.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreterMT VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreterMT VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1112,6 +1112,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1312,10 +1313,10 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
 _iss sqInt numThreads;
-_iss unsigned char primTraceLogIndex;
 _iss CogVMThread ** threads;
 _iss sqLong nextProfileTick;
 _iss sqInt processHasThreadId;
@@ -2067,7 +2068,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.311]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.312]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -13925,6 +13926,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -15477,13 +15483,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -18827,6 +18833,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -20003,6 +20017,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -43752,6 +43774,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/src/vm/cointerpmt.h
===================================================================
--- branches/Cog/src/vm/cointerpmt.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/cointerpmt.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/gcc3x-cointerp.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1050,6 +1050,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1232,9 +1233,9 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
-_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt needGCFlag;
 _iss sqInt jmpDepth;
@@ -1971,7 +1972,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.311]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.312]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -13507,6 +13508,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -14920,13 +14926,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -18151,6 +18157,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -19283,6 +19297,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = 0;
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -42354,6 +42376,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerpmt.c	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c	2013-07-25 23:57:06 UTC (rev 2759)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
    from
-	CoInterpreterMT VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CoInterpreterMT VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1115,6 +1115,7 @@
 void printObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void printOopShort(sqInt oop);
 void printOop(sqInt oop);
+static void printPrimLogEntryAt(sqInt i);
 void printProcessStack(sqInt aProcess);
 void printProcsOnList(sqInt procList);
 void printReferencesTo(sqInt anOop);
@@ -1315,10 +1316,10 @@
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
 _iss StackPage * mostRecentlyUsedPage;
+_iss unsigned char primTraceLogIndex;
 _iss sqInt numStackPages;
 _iss usqInt scavengeThreshold;
 _iss sqInt numThreads;
-_iss unsigned char primTraceLogIndex;
 _iss CogVMThread ** threads;
 _iss sqLong nextProfileTick;
 _iss sqInt processHasThreadId;
@@ -2070,7 +2071,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.311]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.312]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -13934,6 +13935,11 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = TraceCodeCompaction;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 
 	/* This can be called in a number of circumstances.  The instructionPointer
 	   may contain a native pc that must be relocated.  There may already be a
@@ -15486,13 +15492,13 @@
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
 		for (i = GIV(primTraceLogIndex); i <= (PrimTraceLogSize - 1); i += 1) {
-			safePrintStringOf(GIV(primTraceLog)[i]);
+			printPrimLogEntryAt(i);
 			/* begin cr */
 			printf("\n");
 		}
 	}
 	for (i = 0; i <= (GIV(primTraceLogIndex) - 1); i += 1) {
-		safePrintStringOf(GIV(primTraceLog)[i]);
+		printPrimLogEntryAt(i);
 		/* begin cr */
 		printf("\n");
 	}
@@ -18836,6 +18842,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeFull == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -20012,6 +20026,14 @@
 		GIV(traceLog)[GIV(traceLogIndex) + 2] = (0 + (((usqInt) (getVMOwner()) << 16)));
 		GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
 	}
+	if (recordPrimTrace()) {
+		traceType = (GCModeIncr == GCModeFull
+			? TraceFullGC
+			: TraceIncrementalGC);
+		/* begin fastLogPrim: */
+		GIV(primTraceLog)[GIV(primTraceLogIndex)] = traceType;
+		primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+	}
 	GIV(needGCFlag) = 0;
 	GIV(gcStartUsecs) = ioUTCMicrosecondsNow();
 	GIV(statSweepCount) = (GIV(statMarkCount) = (GIV(statMkFwdCount) = (GIV(statCompMoveCount) = 0)));
@@ -43761,6 +43783,32 @@
 	}
 }
 
+static void
+printPrimLogEntryAt(sqInt i)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt intOrSelector;
+
+	intOrSelector = GIV(primTraceLog)[i];
+	if ((intOrSelector & 1)) {
+		if (intOrSelector == TraceIncrementalGC) {
+			print("**IncrementalGC**");
+			return;
+		}
+		if (intOrSelector == TraceFullGC) {
+			print("**FullGC**");
+			return;
+		}
+		if (intOrSelector == TraceCodeCompaction) {
+			print("**CompactCode**");
+			return;
+		}
+		print("???");
+	}
+	else {
+		safePrintStringOf(intOrSelector);
+	}
+}
+
 void
 printProcessStack(sqInt aProcess)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/interp.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/src/vm/vmCallback.h
===================================================================
--- branches/Cog/src/vm/vmCallback.h	2013-07-25 18:13:19 UTC (rev 2758)
+++ branches/Cog/src/vm/vmCallback.h	2013-07-25 23:57:06 UTC (rev 2759)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.311 uuid: 1532d343-6ca3-4722-acfd-f56c1f3cc306
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.312 uuid: c3721341-0803-4acd-aa1e-48ab09aca8e3
  */
 
 #define VM_CALLBACK_INC 1



More information about the Vm-dev mailing list