Add check for perf counter
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Jun 2011 03:28:52 +0000 (23:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Jun 2011 03:28:52 +0000 (23:28 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-context-perf-counters.c

index 56e0d25035ae7f6a09eec09114ced55524b81159..c6f73037a10d4af1dd7a21fa3d8e94286fde5427 100644 (file)
@@ -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 {
This page took 0.027141 seconds and 4 git commands to generate.