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
> +     };
> +
> +     if (ctx->ctx_type == CONTEXT_PERF_CPU_COUNTER ||
> +         ctx->ctx_type == CONTEXT_PERF_THREAD_COUNTER) {

obviously CONTEXT_PERF_THREAD_COUNTER is UST.  Regardless, there are  some 
obvious usability issues (below).  I need to look at the code some more.

# lttng add-context -u -t perf:thread:alignment-faults
UST context perf:thread:alignment-faults added to all channels

(invalid, better error needed, also sometimes -k -t perf:thread:* succeeds 
which seems broken)
# lttng add-context -k -t perf:thread:alignment-faults
Error: perf:thread:alignment-faults: Add kernel context failed
Warning: Some command(s) went wrong



_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to