File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,9 @@ module Recording = struct
393
393
in
394
394
if debug_print_perf_commands then Core. printf " %s\n %!" (String. concat ~sep: " " argv);
395
395
(* Perf prints output we don't care about and --quiet doesn't work for some reason *)
396
- if debug_print_pid then Core. printf " Passed PIDs to perf: %s\n %!" (String. concat~sep: " " pid_opt);
396
+ if debug_print_pid
397
+ then Core. printf " Passed PIDs to perf: %s\n %!" (String. concat ~sep: " " pid_opt);
398
+ (* No need to format `pid_opt` again, since it already is a list of comma separated PIDs *)
397
399
let perf_pid = perf_fork_exec ~env: perf_env ~prog: " perf" ~argv () in
398
400
(* This detaches the perf process from our "process group" but not our session. This
399
401
makes it so that when Ctrl-C is sent to magic_trace in the terminal to end an attach
Original file line number Diff line number Diff line change @@ -77,7 +77,10 @@ let debug_print_perf_commands =
77
77
78
78
let debug_print_pid =
79
79
let open Command.Param in
80
- flag " -z-print-pid" no_arg ~doc: " Prints the PIDs of the processes magic-trace attaches to."
80
+ flag
81
+ " -z-print-pid"
82
+ no_arg
83
+ ~doc: " Prints the PIDs of the processes magic-trace attaches to."
81
84
|> debug_flag
82
85
;;
83
86
@@ -492,7 +495,14 @@ module Make_commands (Backend : Backend_intf.S) = struct
492
495
return pid
493
496
;;
494
497
495
- let attach_and_record record_opts ~elf ~debug_print_perf_commands ~debug_print_pid ~collection_mode pids =
498
+ let attach_and_record
499
+ record_opts
500
+ ~elf
501
+ ~debug_print_perf_commands
502
+ ~debug_print_pid
503
+ ~collection_mode
504
+ pids
505
+ =
496
506
let % bind.Deferred. Or_error attachment =
497
507
attach
498
508
record_opts
You can’t perform that action at this time.
0 commit comments