Skip to content

Commit 75b5fb7

Browse files
committed
Control listings in print_accessible_headers
1 parent ba741fe commit 75b5fb7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arrayjit/lib/tnode.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,13 +755,13 @@ let get_values tn =
755755
let padding = Option.map ~f:fst (Lazy.force tn.padding) in
756756
Nd.(retrieve_flat_values ?padding @@ Option.value_exn ~here:[%here] @@ Lazy.force tn.array)
757757

758-
let print_accessible_headers () =
758+
let print_accessible_headers ?(pred = fun _ -> true) () =
759759
Stdio.printf "Tnode: collecting accessible arrays...%!\n";
760760
Stdlib.Gc.full_major ();
761-
Registry.iter (fun arr -> Stdio.print_endline @@ header arr) registry;
761+
Registry.iter (fun arr -> if pred arr then Stdio.print_endline @@ header arr) registry;
762762
Stdio.printf "Tnode: Finished printing headers.%!\n"
763763
764-
let%debug_sexp log_accessible_headers () =
764+
let%debug_sexp log_accessible_headers ?(pred = fun _ -> true) () =
765765
Stdlib.Gc.full_major ();
766-
Registry.iter (fun _arr -> [%log header _arr]) registry;
766+
Registry.iter (fun arr -> if pred arr then [%log header arr]) registry;
767767
()

0 commit comments

Comments
 (0)