glib: fiddle %trace messages
authorMatt Birkholz <puck@birchwood-abbey.net>
Fri, 29 Apr 2016 22:23:38 +0000 (15:23 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Fri, 29 Apr 2016 22:23:38 +0000 (15:23 -0700)
src/glib/glib-thread.scm
src/glib/glibio.c

index be84aa7ebaa51a8caf0e991153599ca047844aa1..4518bc53146da1963742f5dfb5ff58b50607bd79 100644 (file)
@@ -57,11 +57,15 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
                     (let ((gc-tick (car (gc-timestamp))))
                       (if (fix:< done-tick gc-tick)
                           (begin
+                            (%trace ";run-glib cleaning up\n")
                             (run-glib-cleanups)
+                            (%trace ";run-glib clean up done\n")
                             (set! done-tick gc-tick)))
                       (if (fix:< next-secondary-tick gc-tick)
                           (begin
+                            (%trace ";run-glib secondary-gc daemons\n")
                             (trigger-secondary-gc-daemons!)
+                            (%trace ";run-glib secondary-gc daemons done\n")
                             (set! next-secondary-tick
                                   (fix:+ gc-tick secondary-gc-rate)))))))
                  (with-thread-timer-stopped
@@ -73,7 +77,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
                       (%trace ";run-glib until "time"\n")
                       (run-glib (select-registry-handle io-registry) time)
                       (%trace ";run-glib done at "(real-time-clock)"\n"))))
+                 (%trace ";run-glib yields\n")
                  (yield-current-thread)
+                 (%trace ";run-glib loops\n")
                  (glib-thread-loop))))))
   (detach-thread glib-thread))
 
index 729297c91300e89d35a308b1753064353f2f2288..8866aa038969175be9a701c24e2a745581bdb1e6 100644 (file)
@@ -161,7 +161,7 @@ scheme_source_check (GSource * source)
             src->runnable ? "thread"
             : interrupts_p () ? "interrupt"
             : OS_process_any_status_change () ? "subprocess"
-            : src->time_limit == 0.0 ? "" : "i/o");
+            : src->time_limit == 0.0 ? "" : "io");
       return (TRUE);
     }
   if (src->time_limit == -1.0)
@@ -197,7 +197,7 @@ pending_io (SchemeSource * src)
          GPollFD * gfd = scan->data;
          if (gfd->revents != 0)
            {
-             fprintf (stderr, ";scheme_source_check: i/o ready on %d\n",
+             fprintf (stderr, ";scheme_source_check: io ready on %d\n",
                       gfd->fd);
            }
          scan = scan->next;
@@ -377,9 +377,9 @@ void
 run_glib (unsigned long registry, double time)
 {
   /* Return to the toolkit with the scheme_source set up to dispatch
-     to Scheme again when I/O is ready, or a certain TIME has passed.
-     If TIME has already passed, the I/O registry is ignored and
-     Scheme is ready to run again immediately.  If I/O is empty, the
+     to Scheme again when IO is ready, or a certain TIME has passed.
+     If TIME has already passed, the IO registry is ignored and
+     Scheme is ready to run again immediately.  If IO is empty, the
      simulated poll should not re-enter Scheme until TIME. */
 
   set_registry (scheme_source,