Re: [PATCH v5 07/10] perf record: implement -z,--compression_level=n option and compression

From: Alexey Budankov
Date: Thu Mar 07 2019 - 03:26:43 EST



On 05.03.2019 15:26, Jiri Olsa wrote:
> On Fri, Mar 01, 2019 at 06:58:32PM +0300, Alexey Budankov wrote:
>
> SNIP
>
>> +static int record__aio_enabled(struct record *rec);
>> +
>> static void record__aio_mmap_read_sync(struct record *rec)
>> {
>> int i;
>> struct perf_evlist *evlist = rec->evlist;
>> struct perf_mmap *maps = evlist->mmap;
>>
>> - if (!rec->opts.nr_cblocks)
>> + if (!record__aio_enabled(rec))
>> return;
>>
>> for (i = 0; i < evlist->nr_mmaps; i++) {
>> @@ -292,13 +294,17 @@ static int record__aio_parse(const struct option *opt,
>>
>> if (unset) {
>> opts->nr_cblocks = 0;
>> - } else {
>> - if (str)
>> - opts->nr_cblocks = strtol(str, NULL, 0);
>> - if (!opts->nr_cblocks)
>> - opts->nr_cblocks = nr_cblocks_default;
>> + return 0;
>> }
>>
>> + if (str)
>> + opts->nr_cblocks = strtol(str, NULL, 0);
>> + if (!opts->nr_cblocks)
>> + opts->nr_cblocks = nr_cblocks_default;
>> +
>> + if (opts->nr_cblocks > nr_cblocks_max)
>> + opts->nr_cblocks = nr_cblocks_max;
>> +
>> return 0;
>
> does not seem to be related to the patch, if that's the case please separate

in v7.

~Alexey

>
> jirka
>