Re: [PATCH v2 02/18] perf test: Add workload-ctl option

From: Leo Yan

Date: Wed Jun 03 2026 - 06:42:55 EST


On Tue, Jun 02, 2026 at 03:26:44PM +0100, James Clark wrote:

[...]

> --- a/tools/perf/Documentation/perf-test.txt
> +++ b/tools/perf/Documentation/perf-test.txt
> @@ -69,3 +69,9 @@ OPTIONS
>
> --list-workloads::
> List the available workloads to use with -w/--workload.
> +
> +--workload-ctl=fifo:ctl-fifo[,ack-fifo]::
> + Write 'enable' to ctl-fifo before running the workload and 'disable'
> + before returning. If ack-fifo is provided, the workload runner waits for
> + an 'ack' response after each command. This scopes the recording to only
> + the workload if used with 'perf record -D 1 --control ...'.

This new option doesn't work on its own. I would spell out in explicit
words that it needs to communicate with perf record session:

"This option is used to communicate with a perf record session in
order to control the recording scope. When specifying this option,
the same FIFO path must be specified in the record session via:

perf record -D 1 --control=fifo:ctl-fifo[,ack-fifo] ...

The perf test sends 'enable' and 'disable' commands through ctl-fifo to
control event recording. If 'ack-fifo' is provided, the workload runner
waits for an 'ack' response after each command."

BTW, I'd say the naming "--record-ctl" might be more close to the
purpose.

Thanks,
Leo