From: Adrian Hunter <adrian.hunter@intel.com>
To: David Ahern <dsahern@gmail.com>
Cc: acme@ghostprotocols.net, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH] perf tool: Round mmap pages to power 2
Date: Mon, 11 Nov 2013 09:55:45 +0200 [thread overview]
Message-ID: <52808D81.70308@intel.com> (raw)
In-Reply-To: <527CF7FF.7060001@gmail.com>
On 08/11/13 16:41, David Ahern wrote:
> On 11/8/13, 2:11 AM, Adrian Hunter wrote:
>> This prevents:
>>
>> --out-pages=0
>>
>> from working e.g.
>>
>> tools/perf/perf record -vv --out-pages=0 uname
>> rounding mmap pages size to 4096 (1 pages)
>>
>> Although without this patch:
>>
>> tools/perf/perf record -vv --out-pages=0 uname
>> --mmap_pages/-m value must be a power of two.
>> usage: perf record [<options>] [<command>]
>> or: perf record [<options>] -- <command> [<options>]
>>
>> --out-pages <pages>
>> Number of pages or size with units to use for
>> output (default 64M)
>>
>> Also there is:
>>
>> tools/perf/perf record -vv --no-out-pages uname
>> Segmentation fault (core dumped)
>
> This is problem with perf_evlist__parse_mmap_pages(); same thing happens
> with --no-map-pages.
>
> With the attached both round a 0 up to 1 page:
>
> [daahern@nxos-vdc-dev3 perf]$ perf record --out-pages 0 uname
> rounding mmap pages size to 4096 (1 pages)
Your code looks like out_pages = 0 selects write() instead of mmap().
So it you can't set out_pages = 0, how do you select write()?
> Linux
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.008 MB perf.data (~339 samples) ]
>
> [daahern@nxos-vdc-dev3 perf]$ perf record --mmap-pages 0 uname
> rounding mmap pages size to 4096 (1 pages)
> Linux
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.008 MB perf.data (~339 samples) ]
>
> [daahern@nxos-vdc-dev3 perf]$ perf record --no-mmap-pages uname
>
> usage: perf record [<options>] [<command>]
> or: perf record [<options>] -- <command> [<options>]
>
> -m, --mmap-pages <pages>
> number of mmap data pages
> David
>
next prev parent reply other threads:[~2013-11-11 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 4:36 [PATCH] perf tool: Round mmap pages to power 2 David Ahern
2013-11-08 9:11 ` Adrian Hunter
2013-11-08 14:41 ` David Ahern
2013-11-11 7:55 ` Adrian Hunter [this message]
2013-11-11 11:27 ` Ingo Molnar
2013-11-11 14:59 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52808D81.70308@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox