Re: [PATCH v4 10/10] perf record: introduce --ctl-fd[-ack] options

From: Adrian Hunter
Date: Wed Jun 03 2020 - 11:44:39 EST


On 3/06/20 3:52 pm, Alexey Budankov wrote:
>
> On 03.06.2020 15:05, Adrian Hunter wrote:
>> On 25/05/20 5:23 pm, Alexey Budankov wrote:
>>>
>>> Introduce --ctl-fd[-ack] options to pass open file descriptors numbers
>>> from command line. Extend perf-record.txt file with --ctl-fd[-ack]
>>> options description. Document possible usage model introduced by
>>> --ctl-fd[-ack] options by providing example bash shell script.
>>>
>>> Signed-off-by: Alexey Budankov <alexey.budankov@xxxxxxxxxxxxxxx>
>>> ---
>>> tools/perf/Documentation/perf-record.txt | 39 ++++++++++++++++++++++++
>>> tools/perf/builtin-record.c | 10 ++++++
>>> tools/perf/util/record.h | 2 ++
>>> 3 files changed, 51 insertions(+)
>>>
>>> diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
>>> index c2c4ce7ccee2..5c012cfe68a4 100644
>>> --- a/tools/perf/Documentation/perf-record.txt
>>> +++ b/tools/perf/Documentation/perf-record.txt
>>> @@ -614,6 +614,45 @@ appended unit character - B/K/M/G
>>> The number of threads to run when synthesizing events for existing processes.
>>> By default, the number of threads equals 1.
>>>
>>> +--ctl-fd::
>>> +--ctl-fd-ack::
>>> +Listen on ctl-fd descriptor for command to control measurement ('enable': enable events,
>>> +'disable': disable events. Optionally send control command completion ('ack') to fd-ack
>>> +descriptor to synchronize with the controlling process.
>>
>> You should also explain the use of --delay=-1 here.
>
> Well, possibly like this:
>
> "Listen on ctl-fd descriptor for command to control measurement ('enable': enable events,
> 'disable': disable events). Measurements can be started paused using --delay=-1 option.

Instead of:

"Measurements can be started paused using --delay=-1 option."

perhaps:

"To start with events disabled, the --delay=-1 option can be used."

> Optionally send control command completion ('ack') to fd-ack descriptor to synchronize
> with the controlling process. Example of bash shell script to enable and disable events
> during measurements:"
>