From 39879292b8365cea9a8a9839897c606a803ae7bb Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 29 Apr 2016 15:23:38 -0700 Subject: [PATCH] glib: fiddle %trace messages --- src/glib/glib-thread.scm | 6 ++++++ src/glib/glibio.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/glib/glib-thread.scm b/src/glib/glib-thread.scm index be84aa7eb..4518bc531 100644 --- a/src/glib/glib-thread.scm +++ b/src/glib/glib-thread.scm @@ -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)) diff --git a/src/glib/glibio.c b/src/glib/glibio.c index 729297c91..8866aa038 100644 --- a/src/glib/glibio.c +++ b/src/glib/glibio.c @@ -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, -- 2.25.1