Re: [PATCH v13 3/3]: perf record: extend trace writing to multi AIO

From: Jiri Olsa
Date: Fri Oct 12 2018 - 10:17:43 EST


On Thu, Oct 11, 2018 at 09:59:19PM +0300, Alexey Budankov wrote:

SNIP

> @@ -1490,6 +1514,13 @@ static int perf_record_config(const char *var, const char *value, void *cb)
> var = "call-graph.record-mode";
> return perf_default_config(var, value, cb);
> }
> +#ifdef HAVE_AIO_SUPPORT
> + if (!strcmp(var, "record.aio")) {
> + rec->opts.nr_cblocks = strtol(value, NULL, 0);
> + if (!rec->opts.nr_cblocks)
> + rec->opts.nr_cblocks = 1;
> + }
> +#endif
>
> return 0;
> }
> @@ -1882,8 +1913,8 @@ static struct option __record_options[] = {
> OPT_BOOLEAN(0, "dry-run", &dry_run,
> "Parse options then exit"),
> #ifdef HAVE_AIO_SUPPORT
> - OPT_CALLBACK_NOOPT(0, "aio", &record.opts,
> - NULL, "Enable asynchronous trace writing mode",
> + OPT_CALLBACK(0, "aio", &record.opts,
> + "n", "Use <n> control blocks in asynchronous trace writing mode (default: 1, max: 4)",
> record__aio_parse),

it stoped work with no argument:

[jolsa@krava perf]$ ./perf record --aio ls
Error:
You may not have permission to collect system-wide stats.

jirka