Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311913
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf core: Introduce new ioctl options to pause and resume ring buffer |
| Date | 2016-01-19 04:00 +0100 |
| Message-ID | <qSuGu-1nT-7@gated-at.bofh.it> (permalink) |
| References | <qQ7XI-23e-15@gated-at.bofh.it> <qSgDw-7n-15@gated-at.bofh.it> <qSgNb-rq-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016/1/18 20:02, Peter Zijlstra wrote:
> On Mon, Jan 18, 2016 at 11:52:01AM +0000, Wang Nan wrote:
>
>> +#define PERF_EVENT_IOC_PAUSE_OUTPUT _IO ('$', 9)
>> +#define PERF_EVENT_IOC_RESUME_OUTPUT _IO ('$', 10)
> Would not a single IOCTL with a 'boolean' parameter make more sense?
Good suggestion.
>> +++ b/kernel/events/ring_buffer.c
>> @@ -125,7 +125,7 @@ int perf_output_begin(struct perf_output_handle *handle,
>> if (unlikely(!rb))
>> goto out;
>>
>> - if (unlikely(!rb->nr_pages))
>> + if (unlikely(rb->paused))
>> goto out;
> Should we increment rb->lost in this case?
Not sure about this. The ring buffer is paused deliberately, shall we
consider the
events we miss as losted events? However I'll try it in next version.
Thank you.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf core: Introduce new ioctl options to pause and resume ring buffer Wang Nan <wangnan0@huawei.com> - 2016-01-18 13:00 +0100
Re: [PATCH] perf core: Introduce new ioctl options to pause and resume ring buffer Peter Zijlstra <peterz@infradead.org> - 2016-01-18 13:10 +0100
Re: [PATCH] perf core: Introduce new ioctl options to pause and resume ring buffer "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-19 04:00 +0100
[PATCH 0/6] perf core: Read from overwrite ring buffer Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 1/6] perf core: Introduce new ioctl options to pause and resume ring buffer Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 6/6] perf/core: Put size of a sample at the end of it by PERF_SAMPLE_TAILSIZE Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 2/6] perf core: Set event's default overflow_handler Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 5/6] perf core: Reduce perf event output overhead by setting overwrite handler Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 4/6] perf core: Add backwork attribute to perf event Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:20 +0100
[PATCH 3/6] perf core: Prepare writing into ring buffer from end Wang Nan <wangnan0@huawei.com> - 2016-01-19 12:30 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer Namhyung Kim <namhyung@kernel.org> - 2016-01-19 15:10 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer pi3orama <pi3orama@163.com> - 2016-01-19 15:20 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-19 18:50 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-20 02:40 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-20 03:30 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-21 08:00 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-22 03:30 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-22 04:30 +0100
Re: [PATCH 0/6] perf core: Read from overwrite ring buffer "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-22 05:50 +0100
csiph-web