diff options
| -rw-r--r-- | tools/perf/builtin-stat.c | 5 | ||||
| -rw-r--r-- | tools/perf/util/evsel.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 30e6b374e095..f17dc601b0f3 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -1284,7 +1284,8 @@ static void uniquify_event_name(struct perf_evsel *counter) | |||
| 1284 | char *new_name; | 1284 | char *new_name; |
| 1285 | char *config; | 1285 | char *config; |
| 1286 | 1286 | ||
| 1287 | if (!counter->pmu_name || !strncmp(counter->name, counter->pmu_name, | 1287 | if (counter->uniquified_name || |
| 1288 | !counter->pmu_name || !strncmp(counter->name, counter->pmu_name, | ||
| 1288 | strlen(counter->pmu_name))) | 1289 | strlen(counter->pmu_name))) |
| 1289 | return; | 1290 | return; |
| 1290 | 1291 | ||
| @@ -1302,6 +1303,8 @@ static void uniquify_event_name(struct perf_evsel *counter) | |||
| 1302 | counter->name = new_name; | 1303 | counter->name = new_name; |
| 1303 | } | 1304 | } |
| 1304 | } | 1305 | } |
| 1306 | |||
| 1307 | counter->uniquified_name = true; | ||
| 1305 | } | 1308 | } |
| 1306 | 1309 | ||
| 1307 | static void collect_all_aliases(struct perf_evsel *counter, | 1310 | static void collect_all_aliases(struct perf_evsel *counter, |
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index d3ee3af618ef..92ec009a292d 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h | |||
| @@ -115,6 +115,7 @@ struct perf_evsel { | |||
| 115 | unsigned int sample_size; | 115 | unsigned int sample_size; |
| 116 | int id_pos; | 116 | int id_pos; |
| 117 | int is_pos; | 117 | int is_pos; |
| 118 | bool uniquified_name; | ||
| 118 | bool snapshot; | 119 | bool snapshot; |
| 119 | bool supported; | 120 | bool supported; |
| 120 | bool needs_swap; | 121 | bool needs_swap; |
