File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ module Command = struct
88end
99
1010let ack_msg = Bytes. of_string " ack\n\000 "
11- let ack_timeout = `After (Time_ns.Span. of_int_sec 1 )
11+
12+ (* If we send a command while perf is shutting down, [ack_rx] will become ready only after
13+ perf exits, so this timeout must be at least as long as it takes perf to finish
14+ shutting down. *)
15+ let ack_timeout = `After (Time_ns.Span. of_int_sec 8 )
1216
1317type t =
1418 { mutable ctl_rx : Core_unix.File_descr .t option
@@ -56,7 +60,7 @@ let block_read_ack t =
5660 ~timeout: ack_timeout
5761 ()
5862 with
59- | { read = [] ; _ } -> failwith " Perf didn't ack snapshot within timeout"
63+ | { read = [] ; _ } -> failwith " Perf didn't ack command within timeout"
6064 | { read = [ _fd ]; _ } ->
6165 let bytes_read =
6266 Core_unix. read ~restart: true t.ack_rx ~buf: t.ack_buf ~pos: total_bytes_read
You can’t perform that action at this time.
0 commit comments