Re: [lttng-dev] [RFC lttng-tools] Do not list or allow unsupported perf events

2015-09-13 Thread Mathieu Desnoyers
CCing Jeremie. - On Sep 10, 2015, at 8:15 PM, Tony Jones to...@suse.de wrote: > On 09/10/2015 12:21 PM, Tony Jones wrote: > >> +static int is_event_supported(const struct ctx_opts *ctx) >> +{ >> +int fd; >> +struct perf_event_attr attr = { >> +.type = ctx->u.perf.type,

Re: [lttng-dev] [RFC lttng-tools] Do not list or allow unsupported perf events

2015-09-13 Thread Mathieu Desnoyers
CCing the new lttng-tools maintainer, Jérémie. More below, - On Sep 10, 2015, at 3:21 PM, Tony Jones to...@suse.com wrote: > Query the perf api to determine the list of events that are actually > supported by the PMU. Reject events that are not supported. On an > AMD Opteron 6128 the

Re: [lttng-dev] [RFC lttng-tools] Do not list or allow unsupported perf events

2015-09-10 Thread Tony Jones
On 09/10/2015 12:21 PM, Tony Jones wrote: > +static int is_event_supported(const struct ctx_opts *ctx) > +{ > + int fd; > + struct perf_event_attr attr = { > + .type = ctx->u.perf.type, > + .config = ctx->u.perf.config, > + .disabled = 1 > + }; > +