[Vm-dev] [commit][3406]
Provide optional logging along the input event processing chain.
commits at squeakvm.org
commits at squeakvm.org
Thu Jul 16 20:00:52 UTC 2015
Revision: 3406
Author: eliot
Date: 2015-07-16 13:00:51 -0700 (Thu, 16 Jul 2015)
Log Message:
-----------
Provide optional logging along the input event processing chain.
Modified Paths:
--------------
branches/Cog/platforms/Cross/vm/sq.h
branches/Cog/platforms/Cross/vm/sqExternalSemaphores.c
branches/Cog/platforms/unix/vm/sqUnixEvent.c
branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/platforms/Cross/vm/sq.h
===================================================================
--- branches/Cog/platforms/Cross/vm/sq.h 2015-07-16 18:54:51 UTC (rev 3405)
+++ branches/Cog/platforms/Cross/vm/sq.h 2015-07-16 20:00:51 UTC (rev 3406)
@@ -513,6 +513,14 @@
/* Retrieve the next input event from the OS. */
sqInt ioGetNextEvent(sqInputEvent *evt);
+/* Log the event procesing chain. */
+#if defined(DEBUG_EVENT_CHAIN)
+# define LogEventChain(parms) fprintf parms
+# define dbgEvtChF stderr
+#else
+# define LogEventChain(parms) 0
+#endif
+
/* Image file and VM path names. */
extern char imageName[];
char *getImageName(void);
Modified: branches/Cog/platforms/Cross/vm/sqExternalSemaphores.c
===================================================================
--- branches/Cog/platforms/Cross/vm/sqExternalSemaphores.c 2015-07-16 18:54:51 UTC (rev 3405)
+++ branches/Cog/platforms/Cross/vm/sqExternalSemaphores.c 2015-07-16 20:00:51 UTC (rev 3406)
@@ -136,6 +136,7 @@
/* An index of zero should be and is silently ignored. */
assert(index >= 0 && index <= numSignalRequests);
+ LogEventChain((dbgEvtChF,"sSWI(%d)%c.",index,(unsigned)i >= numSignalRequests?'-':'+'));
if ((unsigned)i >= numSignalRequests)
return 0;
@@ -193,6 +194,7 @@
checkSignalRequests = 0;
sqLowLevelMFence();
+ LogEventChain((dbgEvtChF,"dSES(%d).",externalSemaphoreTableSize));
if (useTideA) {
useTideA = 0;
sqLowLevelMFence();
@@ -203,6 +205,7 @@
while (signalRequests[i].responses != signalRequests[i].requests) {
if (doSignalSemaphoreWithIndex(i+1))
switched = 1;
+ LogEventChain((dbgEvtChF,"dSSI(%d):%c.",i+1,switched?'!':'_'));
++signalRequests[i].responses;
}
lowTideA = (unsigned long)-1 >> 1, highTideA = -1;
@@ -217,6 +220,7 @@
while (signalRequests[i].responses != signalRequests[i].requests) {
if (doSignalSemaphoreWithIndex(i+1))
switched = 1;
+ LogEventChain((dbgEvtChF,"dSSI(%d):%c.",i+1,switched?'!':'_'));
++signalRequests[i].responses;
}
lowTideB = (unsigned long)-1 >> 1, highTideB = -1;
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Thu Jul 16 08:25:14 PDT 2015
+ Thu Jul 16 13:00:11 PDT 2015
Modified: branches/Cog/platforms/unix/vm/sqUnixEvent.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixEvent.c 2015-07-16 18:54:51 UTC (rev 3405)
+++ branches/Cog/platforms/unix/vm/sqUnixEvent.c 2015-07-16 20:00:51 UTC (rev 3406)
@@ -266,6 +266,7 @@
{
if (iebEmptyP())
ioProcessEvents();
+ LogEventChain((dbgEvtChF,"ioGNE%s",iebEmptyP()?"_":"!\n"));
if (iebEmptyP())
return false;
*evt= inputEventBuffer[iebOut];
Modified: branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c 2015-07-16 18:54:51 UTC (rev 3405)
+++ branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c 2015-07-16 20:00:51 UTC (rev 3406)
@@ -4834,6 +4834,7 @@
static sqInt display_ioProcessEvents(void)
{
+ LogEventChain((dbgEvtChF,"ioPE."));
handleEvents();
aioPoll(0);
return 0;
More information about the Vm-dev
mailing list