From: Matt Birkholz Date: Mon, 14 Aug 2017 20:54:33 +0000 (-0700) Subject: world-report: Replace thread flags with a thread name. X-Git-Tag: mit-scheme-pucked-9.2.12~87 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=51414f04e717cf58b118edef0556e2604ed43a6f;p=mit-scheme.git world-report: Replace thread flags with a thread name. --- diff --git a/src/runtime/world-report.scm b/src/runtime/world-report.scm index 2edea1b64..a1d4433b2 100644 --- a/src/runtime/world-report.scm +++ b/src/runtime/world-report.scm @@ -29,15 +29,11 @@ USA. (declare (usual-integrations)) -(define (world-report #!optional port thread-flags) +(define (world-report #!optional port) (let ((port (if (default-object? port) (current-output-port) (guarantee textual-output-port? port 'WORLD-REPORT))) - (flags (cons (cons (console-thread) "console") - (if (default-object? thread-flags) - '() - thread-flags))) (now (get-universal-time)) (cpu (process-time-clock))) (write-string "-*-Outline-*-" port) @@ -54,7 +50,7 @@ USA. (write-time-interval (- now time-world-restored) port) (newline port) (memory-report port) - (thread-report flags port))) + (thread-report port))) (define (ticks->string ticks) (parameterize* (list (cons param:flonum-unparser-cutoff '(absolute 3))) @@ -142,7 +138,7 @@ USA. (write-char #\- port) (loop (1+ n)))))))) -(define (thread-report flags port) +(define (thread-report port) (newline port) (write-string "* Threads" port) (newline port) @@ -158,17 +154,11 @@ USA. (write-string " CPU, " port) (write-time (thread/real-time thread) port) (write-string " real" port) - (for-each - (lambda (name) - (write-string ", " port) - (write-string name port)) - (append-map! (lambda (item) - (if (and (pair? item) - (string? (cdr item)) - (eq? thread (car item))) - (list (cdr item)) - '())) - flags)) + (let ((name (thread-get thread 'name))) + (if name + (begin + (write-char #\space port) + (write name port)))) (newline port))) (sort (map (lambda (t) (cons (hash t) t)) (threads-list)) (lambda (a b) (< (car a) (car b))))))