diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7931597c6..721060d95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: os: - ubuntu-latest ocaml-version: - - 4.13.1 + - 4.14.0 runs-on: ${{ matrix.os }} steps: diff --git a/core/elf.ml b/core/elf.ml index fe02cf273..8c9efa97f 100644 --- a/core/elf.ml +++ b/core/elf.ml @@ -262,7 +262,7 @@ let all_symbols ?(select = `File_or_func) t = symbol tables. *) (match Hashtbl.add res ~key:name ~data:symbol with | `Ok | `Duplicate -> ()))); - String.Table.to_alist res + Hashtbl.to_alist res ;; let all_file_selections t symbol = diff --git a/core/perf_map.ml b/core/perf_map.ml index d519bc572..496d571ee 100644 --- a/core/perf_map.ml +++ b/core/perf_map.ml @@ -215,13 +215,13 @@ module Table = struct ;; let load_by_files files = - Deferred.List.map files ~f:(fun filename -> + Deferred.List.map files ~how:`Sequential ~f:(fun filename -> load filename |> Deferred.map ~f:(fun map -> pid_of_filename filename, map)) >>| create ;; let load_by_pids pids = - Deferred.List.map pids ~f:(fun pid -> + Deferred.List.map pids ~how:`Sequential ~f:(fun pid -> load (default_filename ~pid) |> Deferred.map ~f:(fun map -> pid, map)) >>| create ;; diff --git a/magic-trace.opam b/magic-trace.opam index 4802f6a18..463cfaed7 100644 --- a/magic-trace.opam +++ b/magic-trace.opam @@ -10,7 +10,7 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "4.12"} + "ocaml" {>= "4.14"} "async" "cohttp" "cohttp_static_handler" diff --git a/src/for_range.ml b/src/for_range.ml index 5ddf0b0ff..4181efe47 100644 --- a/src/for_range.ml +++ b/src/for_range.ml @@ -21,7 +21,7 @@ end let range_hit_times ~decode_events ~range_symbols = let open Deferred.Or_error.Let_syntax in let%bind { Decode_result.events; _ } = decode_events () in - Deferred.List.map events ~f:(fun events -> + Deferred.List.map events ~how:`Sequential ~f:(fun events -> let { Trace_filter.start_symbol; stop_symbol } = range_symbols in let is_start symbol = String.(Symbol.display_name symbol = start_symbol) in let is_stop symbol = String.(Symbol.display_name symbol = stop_symbol) in diff --git a/src/perf_tool_backend.ml b/src/perf_tool_backend.ml index bbff13630..efdf1dbfe 100644 --- a/src/perf_tool_backend.ml +++ b/src/perf_tool_backend.ml @@ -207,7 +207,7 @@ module Recording = struct Sys.readdir record_dir |> Deferred.bind ~f: - (Deferred.Array.iter ~f:(fun file -> + (Deferred.Array.iter ~how:`Sequential ~f:(fun file -> if String.is_prefix file ~prefix:"perf.data" then Sys.remove (record_dir ^/ file) else Deferred.return ())) @@ -482,7 +482,7 @@ let decode_events >>| List.filter ~f:(String.is_prefix ~prefix:"perf.data") in let%map result = - Deferred.List.map files ~f:(fun perf_data_file -> + Deferred.List.map files ~how:`Sequential ~f:(fun perf_data_file -> let itrace_opts = match collection_mode with | Intel_processor_trace _ -> [ "--itrace=bep" ] diff --git a/src/trace.ml b/src/trace.ml index 4411041ff..575ab234f 100644 --- a/src/trace.ml +++ b/src/trace.ml @@ -175,7 +175,7 @@ let write_trace_from_events Trace_writer.write_event writer ?events_writer ev in let%bind () = - Deferred.List.iteri events ~f:(fun index events -> + Deferred.List.iteri events ~how:`Sequential ~f:(fun index events -> Pipe.iter_without_pushback events ~f:(process_event index)) in (match events_writer with diff --git a/vendor/tracing/src/parser.ml b/vendor/tracing/src/parser.ml index 5091218df..47cc994d0 100644 --- a/vendor/tracing/src/parser.ml +++ b/vendor/tracing/src/parser.ml @@ -166,12 +166,12 @@ let lookup_string_exn t ~index = if index = 0 then "" else ( - try Int.Table.find_exn t.string_table index with + try Hashtbl.find_exn t.string_table index with | _ -> raise String_not_found) ;; let lookup_thread_exn t ~index = - try Int.Table.find_exn t.thread_table index with + try Hashtbl.find_exn t.thread_table index with | _ -> raise Thread_not_found ;; @@ -216,7 +216,7 @@ let parse_metadata_record t = let provider_name = consume_tail_padded_string_exn t.cur_record ~len:(name_len + padding) in - Int.Table.set t.provider_name_by_id ~key:provider_id ~data:provider_name; + Hashtbl.set t.provider_name_by_id ~key:provider_id ~data:provider_name; t.current_provider <- Some provider_id | 2 (* Provider section metadata *) -> let provider_id = extract_field header ~pos:20 ~size:32 in @@ -268,7 +268,7 @@ let parse_string_record t = let interned_string = consume_tail_padded_string_exn t.cur_record ~len:(str_len + padding) in - Int.Table.set t.string_table ~key:string_index ~data:interned_string; + Hashtbl.set t.string_table ~key:string_index ~data:interned_string; Some (Record.Interned_string { index = string_index; value = interned_string })) ;; @@ -286,12 +286,12 @@ let parse_thread_record t = let thread = { Thread.pid = process_koid ; tid = thread_koid - ; process_name = Int.Table.find t.process_names process_koid + ; process_name = Hashtbl.find t.process_names process_koid ; thread_name = - Thread_kernel_object.Table.find t.thread_names (process_koid, thread_koid) + Hashtbl.find t.thread_names (process_koid, thread_koid) } in - Int.Table.set t.thread_table ~key:thread_index ~data:thread; + Hashtbl.set t.thread_table ~key:thread_index ~data:thread; Some (Record.Interned_thread { index = thread_index; value = thread })) ;; @@ -348,9 +348,9 @@ let parse_kernel_object_record t = match obj_type with | 1 (* process *) -> let koid = consume_int64_trunc_exn t.cur_record in - Int.Table.set t.process_names ~key:koid ~data:name_str; + Hashtbl.set t.process_names ~key:koid ~data:name_str; (* Update the name of any matching process in the process table. *) - Int.Table.iter t.thread_table ~f:(fun thread -> + Hashtbl.iter t.thread_table ~f:(fun thread -> if thread.pid = koid then thread.process_name <- Some name_str); if num_args > 0 then t.warnings.num_unparsed_args <- t.warnings.num_unparsed_args + num_args; @@ -368,12 +368,12 @@ let parse_kernel_object_record t = then ( consume_int32_exn t.cur_record |> (ignore : int -> unit); let process_koid = consume_int64_trunc_exn t.cur_record in - Thread_kernel_object.Table.set + Hashtbl.set t.thread_names ~key:(process_koid, koid) ~data:name_str; (* Update the name of any matching thread in the thread table. *) - Int.Table.iter t.thread_table ~f:(fun thread -> + Hashtbl.iter t.thread_table ~f:(fun thread -> if thread.pid = process_koid && thread.tid = koid then thread.thread_name <- Some name_str); (* Mark any remaining arguments as unparsed. *)