Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1207156
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface |
| Date | 2015-08-13 22:50 +0200 |
| Message-ID | <pX7BL-62s-11@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <pQJsv-Qu-9@gated-at.bofh.it> <pUsjo-dn-25@gated-at.bofh.it> <pWvG9-1ge-1@gated-at.bofh.it> <pWzTr-7EY-7@gated-at.bofh.it> <pX6Z4-5jk-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 13, 2015 at 01:04:28PM -0700, Sukadev Bhattiprolu wrote:
> | > | +static int perf_read_group(struct perf_event *event,
> | > | + u64 read_format, char __user *buf)
> | > | +{
> | > | + struct perf_event *leader = event->group_leader, *child;
> | > | + struct perf_event_context *ctx = leader->ctx;
> | > | + int ret = leader->read_size;
> One other question, We return leader->read_size but allocate/copy_to_user
> the sibling's event->read_size. We consistently use read_format from the
> 'event' being read, rather than its 'group_leader', so we are ok in terms
> of what we copy into values[] for each event in the group.
>
> But, can the leader's read_format (and hence its read_size) differ from
> its sibling's read_size? If so, in the current code, we return the event's
> read_size but in the new code, we return the leader's read_size.
Hmm, good spotting that. I'm fairly sure I didn't do that on purpose.
I think we should use event->read_size there too and have the lot
consistent. I don't think we require read_format to be uniform across
siblings.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface Peter Zijlstra <peterz@infradead.org> - 2015-08-06 14:20 +0200
Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-08-12 06:20 +0200
Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface Peter Zijlstra <peterz@infradead.org> - 2015-08-12 10:50 +0200
Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-08-13 22:10 +0200
Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface Peter Zijlstra <peterz@infradead.org> - 2015-08-13 22:50 +0200
csiph-web