lkml.org 
[lkml]   [2019]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 02/10] perf record: implement -f,--mmap-flush=<threshold> option
On Fri, Mar 01, 2019 at 06:41:44PM +0300, Alexey Budankov wrote:

SNIP

> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index f3f7f3100336..9b02a68e8c23 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -334,6 +334,29 @@ static int record__aio_enabled(struct record *rec)
> return rec->opts.nr_cblocks > 0;
> }
>
> +#define MMAP_FLUSH_DEFAULT 1
> +static int record__mmap_flush_parse(const struct option *opt,
> + const char *str,
> + int unset)
> +{
> + int mmap_len;
> + struct record_opts *opts = (struct record_opts *)opt->value;
> +
> + if (unset)
> + return 0;
> +
> + if (str)
> + opts->mmap_flush = strtol(str, NULL, 0);
> + if (!opts->mmap_flush)
> + opts->mmap_flush = MMAP_FLUSH_DEFAULT;
> +
> + mmap_len = perf_evlist__mmap_size(opts->mmap_pages);
> + if (opts->mmap_flush > mmap_len / 4)
> + opts->mmap_flush = mmap_len / 4;
> +

if there's point in this config option, pelase make it
configurable as the other size options we have with
the B/K/M suffixes

jirka

\
 
 \ /
  Last update: 2019-03-05 13:26    [W:0.161 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site