diff options
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index d3261a5..3b2bda0 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -1714,6 +1714,31 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (inferior-eval '(when (defined? '%graft?) (%graft? #f)) inf) + ;; Load the heap-profiler + (for-each + (lambda (exp) + (inferior-eval exp inf)) + (call-with-input-file + (%search-load-path "guix-data-service/heap-profiler.scm") + (lambda (port) + (let loop ((result '())) + (let ((exp (read port))) + (if (eof-object? exp) + (reverse! result) + (loop (cons (if (eq? (car exp) 'define-module) + `(use-modules + ,@(let loop ((lst (cddr exp)) + (result '())) + (match lst + ('() result) + (('#:use-module mod rest ...) + (loop rest + (cons mod result))) + (rest + (loop (cdr lst) result))))) + exp) + result)))))))) + ;; TODO Have Guix make this easier ((@@ (guix inferior) ensure-store-bridge!) inf) (non-blocking-port ((@@ (guix inferior) inferior-bridge-socket) inf)) |