Skip to content

Commit c03b002

Browse files
committed
Memory: drop track_global_reachable
can be expensive and easy to misuse intention was to use for debugging only (and then no need for super-easy helper, can still call new_stats manually)
1 parent 2a789e8 commit c03b002

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

memory.ml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ let (add_stats,new_stats,log_stats,get_stats) =
130130
let get_stats () = List.map (fun f -> f ()) !f_get in
131131
(tuck f_print), (tuck f_get), log_stats, get_stats
132132

133-
let track_global = ref []
134-
let show_global_reachable () =
135-
let l = List.map (fun (name,repr) -> sprintf "%s %s" name (Action.caml_words @@ Obj.reachable_words repr)) !track_global in
136-
sprintf "reachable: %s" (String.concat " " l)
137-
let track_global name var = tuck track_global (name,Obj.repr var)
138-
139133
let show_c_info () = sprintf "%s. %s" (show_vm_info ()) (!show_crt_info ())
140134

141135
let show_all_info () =
@@ -150,4 +144,3 @@ let log_all_info () = show_all_info () |> List.iter log#info_s
150144
let () = new_stats show_c_info
151145
let () = new_stats show_gc_info
152146
let () = new_stats show_lwt_info
153-
let () = new_stats show_global_reachable

0 commit comments

Comments
 (0)