+let profile_start_stop _ label =
+ let label,extra =
+ match Str.bounded_split (Str.regexp "\n") label 2 with
+ | [label;extra] -> label,extra
+ | _ ->
+ raise (Invalid_argument ("Profiler 'stop' with a bad label:" ^ label))
+ in
+ let start = start label in
+ let stop = stop label extra in
+ "let _ = " ^ start ^ " in " ^ stop
+;;
+
+let profile_show _ prefix =