perf stat: Avoid SEGV on counter->name
[linux-2.6-microblaze.git] / tools / perf / util / stat-display.c
index e6035ec..73b2ff2 100644 (file)
@@ -747,7 +747,7 @@ static void uniquify_event_name(struct evsel *counter)
        int ret = 0;
 
        if (counter->uniquified_name || counter->use_config_name ||
-           !counter->pmu_name || !strncmp(counter->name, counter->pmu_name,
+           !counter->pmu_name || !strncmp(evsel__name(counter), counter->pmu_name,
                                           strlen(counter->pmu_name)))
                return;