[Parallel-Build] Better error logging for failed match

This commit is contained in:
Kevin Tew 2010-11-18 07:39:35 -07:00
parent 14bdcda9a9
commit cc69ceed6b

View File

@ -25,7 +25,11 @@
['DONE ['DONE
(when (or (not (zero? (string-length out))) (not (zero? (string-length err)))) (when (or (not (zero? (string-length out))) (not (zero? (string-length err))))
((collects-queue-append-error jobqueue) cc "making" null out err "output"))]) ((collects-queue-append-error jobqueue) cc "making" null out err "output"))])
(when last ((collects-queue-printer jobqueue) (current-output-port) "made" "~a" cc-name )))])) (when last ((collects-queue-printer jobqueue) (current-output-port) "made" "~a" cc-name )))]
[else
(eprintf "work-done match cc failed.\n")
(eprintf "trying to match:\n~a\n" (list work msg))]))
;; assigns a collection to each worker to be compiled ;; assigns a collection to each worker to be compiled
;; when it runs out of collections, steals work from other workers collections ;; when it runs out of collections, steals work from other workers collections
(define (get-job jobqueue workerid) (define (get-job jobqueue workerid)
@ -70,7 +74,11 @@
(build-job cc file #t)] (build-job cc file #t)]
[(cons (list cc (cons file ft) subs) tail) [(cons (list cc (cons file ft) subs) tail)
(hash-set! w-hash id (cons (list cc ft subs) tail)) (hash-set! w-hash id (cons (list cc ft subs) tail))
(build-job cc file #f)])) (build-job cc file #f)]
[else
(eprintf "get-job match cc failed.\n")
(eprintf "trying to match:\n~a\n" cc)]))
(match (hash-ref!/true w-hash workerid take-cc) (match (hash-ref!/true w-hash workerid take-cc)
[#f [#f
(match (hash/first-pair w-hash) (match (hash/first-pair w-hash)