Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341950
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 16/48] perf core: Add backward attribute to perf event |
| Date | 2016-02-24 14:10 +0100 |
| Message-ID | <r5Hmy-4ZE-15@gated-at.bofh.it> (permalink) |
| References | <r4UOR-3pt-3@gated-at.bofh.it> <r4V8g-3zg-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 22, 2016 at 09:10:43AM +0000, Wang Nan wrote:
SNIP
> + if (is_write_backward(output_event) != is_write_backward(event))
> + goto out;
> +
> + /*
> * If both events generate aux data, they must be on the same PMU
> */
> if (has_aux(event) && has_aux(output_event) &&
> diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
> index 37c11c6..80b1fa7 100644
> --- a/kernel/events/ring_buffer.c
> +++ b/kernel/events/ring_buffer.c
> @@ -233,6 +233,8 @@ out:
> int perf_output_begin(struct perf_output_handle *handle,
> struct perf_event *event, unsigned int size)
> {
> + if (unlikely(is_write_backward(event)))
> + return __perf_output_begin(handle, event, size, true);
> return __perf_output_begin(handle, event, size, false);
could this be just:
return __perf_output_begin(handle, event, size,
is_write_backward(event))
also not sure if it's worth to have __perf_output_begin
if the only difference to perf_output_begin is 'backward'
argument that could be figured out from the event argument
anyway
jirka
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 16/48] perf core: Add backward attribute to perf event Jiri Olsa <jolsa@redhat.com> - 2016-02-24 14:10 +0100 Re: [PATCH 16/48] perf core: Add backward attribute to perf event Jiri Olsa <jolsa@redhat.com> - 2016-02-24 14:30 +0100
csiph-web