Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1698840
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) |
| Date | 2017-07-28 16:30 +0200 |
| Message-ID | <u8er7-4Rs-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <u2I8y-3lP-5@gated-at.bofh.it> <u2I8y-3lP-3@gated-at.bofh.it> <u2IrT-3Iw-5@gated-at.bofh.it> <u76Fl-2je-37@gated-at.bofh.it> <u8ehr-4NW-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jul 28, 2017 at 04:13:25PM +0200, Jiri Olsa wrote:
> On Tue, Jul 25, 2017 at 01:55:12PM +0200, Peter Zijlstra wrote:
>
> SNIP
>
> >
> > diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c
> > index 1b2be63c8528..c98a12f3592c 100644
> > --- a/kernel/events/callchain.c
> > +++ b/kernel/events/callchain.c
> > @@ -12,6 +12,7 @@
> > #include <linux/perf_event.h>
> > #include <linux/slab.h>
> > #include <linux/sched/task_stack.h>
> > +#include <linux/task_work.h>
> >
> > #include "internal.h"
> >
> > @@ -178,19 +179,94 @@ put_callchain_entry(int rctx)
> > put_recursion_context(this_cpu_ptr(callchain_recursion), rctx);
> > }
> >
> > +static struct perf_callchain_entry __empty = { .nr = 0, };
> > +
> > +static void perf_callchain_work(struct callback_head *work)
> > +{
> > + struct perf_event *event = container_of(work, struct perf_event, pending_callchain);
> > + struct perf_output_handle handle;
> > + struct perf_sample_data sample;
> > + size_t size;
> > + int ret;
> > +
> > + struct {
> > + struct perf_event_header header;
> > + } callchain_event = {
> > + .header = {
> > + .type = PERF_RECORD_CALLCHAIN,
> > + .misc = 0,
> > + .size = sizeof(callchain_event),
> > + },
> > + };
>
> how about we make this generic for all user space sample_type?
>
> I think we could certainly use it for PERF_SAMPLE_STACK_USER,
> maybe PERF_SAMPLE_REGS_USER would also help.. just a little ;-)
>
> I'll check on that
Right, so I put all the magic in the callchain code itself, which would
make that a wee bit harder. But yes, putting all the USER stuff in there
makes sense.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Peter Zijlstra <peterz@infradead.org> - 2017-07-25 14:00 +0200
Re: [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Jiri Olsa <jolsa@redhat.com> - 2017-07-28 16:20 +0200
Re: [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Peter Zijlstra <peterz@infradead.org> - 2017-07-28 16:30 +0200
Re: [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Andy Lutomirski <luto@amacapital.net> - 2017-07-29 05:40 +0200
Re: [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Peter Zijlstra <peterz@infradead.org> - 2017-07-29 11:30 +0200
csiph-web