X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-perf-counters.c;fp=lttng-context-perf-counters.c;h=c6f73037a10d4af1dd7a21fa3d8e94286fde5427;hb=54de85a41d9c61aaf1a3fd2ad6dc01d01ccb4360;hp=56e0d25035ae7f6a09eec09114ced55524b81159;hpb=457501638fe38f96d90598a6284befec5f949ce4;p=lttng-modules.git diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index 56e0d250..c6f73037 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -36,7 +36,7 @@ void perf_counter_record(struct lttng_ctx_field *field, uint64_t value; event = field->u.perf_counter.e[ctx->cpu]; - if (likely(event)) { + if (likely(event) && likely(event->pmu)) { event->pmu->read(event); value = local64_read(&event->count); } else {