From: "Wangnan (F)" <wangnan0@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <pi3orama@163.com>, <linux-kernel@vger.kernel.org>,
He Kuang <hekuang@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Jiri Olsa <jolsa@kernel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>, Zefan Li <lizefan@huawei.com>
Subject: Re: [PATCH v4 3/7] perf tools: Enable overwrite settings
Date: Wed, 25 May 2016 10:14:13 +0800 [thread overview]
Message-ID: <57450A75.3010403@huawei.com> (raw)
In-Reply-To: <20160524184030.GX8897@kernel.org>
On 2016/5/25 2:40, Arnaldo Carvalho de Melo wrote:
> Em Tue, May 24, 2016 at 02:29:00AM +0000, Wang Nan escreveu:
>> This patch allows following config terms and option:
>>
>> Globally setting events to overwrite;
>>
>> # perf record --overwrite ...
>>
>> Set specific events to be overwrite or no-overwrite.
>>
>> # perf record --event cycles/overwrite/ ...
>> # perf record --event cycles/no-overwrite/ ...
> So, based on this chunk of documentation in this patch:
>
> <quote>
> Perf dumps data from overwritable ring buffer when switching output (see
> --switch-output) and before terminate.
> </>
>
> I tried:
>
> No --overwrite:
>
> # perf record -e syscalls:*enter_nanosleep* usleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.019 MB perf.data (1 samples) ]
> # perf evlist -v
> syscalls:sys_enter_nanosleep: type: 2, size: 112, config: 0x132, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW, disabled: 1, inherit: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
> # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events
> # perf script
> usleep 29416 [002] 220099.782982: syscalls:sys_enter_nanosleep: rqtp: 0x7ffc21f73cc0, rmtp: 0x00000000
>
> Now I went on to try this new --overwrite thing:
>
> # perf record --overwrite -e syscalls:*enter_nanosleep* usleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.019 MB perf.data ]
> # perf evlist -v
> syscalls:sys_enter_nanosleep: type: 2, size: 112, config: 0x132, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW, disabled: 1, inherit: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, write_backward: 1
> # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events
> # perf script
> #
>
> So it hasn't recorded anything at anytime, i.e. I expected, based on the
> documentation provided, that it would get what was in its buffer, to be written,
> i.e. the single "syscalls:sys_enter_nanosleep" event that took place in that
> workload.
>
> So I'm now trying it together with --switch-output, but I just get one
> timestamp suffixed perf.data file, empty, without that event that I know took
> place.
>
> Care to ellaborate here?
Sorry, you need to apply patch 3/7 - 5/7 to enable operations described
here.
I'll reorder these patches and send again, but some important patch
would become
untestable until patch 3/7 get applied. I'll try to add a test case for
them.
Thank you.
next prev parent reply other threads:[~2016-05-25 2:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 2:28 [PATCH v4 0/7] perf tools: Support overwritable ring buffer Wang Nan
2016-05-24 2:28 ` [PATCH v4 1/7] perf evlist: Introduce aux perf evlist Wang Nan
2016-05-24 2:28 ` [PATCH v4 2/7] perf tools: Don't poll and mmap overwritable events Wang Nan
2016-06-02 6:32 ` [tip:perf/core] perf record: Robustify perf_event__synth_time_conv() tip-bot for Wang Nan
2016-06-02 6:32 ` [tip:perf/core] perf evlist: Don't poll and mmap overwritable events tip-bot for Wang Nan
2016-05-24 2:29 ` [PATCH v4 3/7] perf tools: Enable overwrite settings Wang Nan
2016-05-24 18:40 ` Arnaldo Carvalho de Melo
2016-05-24 18:41 ` Arnaldo Carvalho de Melo
2016-05-25 2:14 ` Wangnan (F) [this message]
2016-05-24 2:29 ` [PATCH v4 4/7] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan
2016-05-24 2:29 ` [PATCH v4 5/7] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-24 2:29 ` [PATCH v4 6/7] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-05-24 2:29 ` [PATCH v4 7/7] perf tools: Check write_backward during evlist config Wang Nan
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=57450A75.3010403@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.