|
@@ -2754,8 +2754,14 @@ bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
|
|
(paranoid = perf_event_paranoid()) > 1) {
|
|
(paranoid = perf_event_paranoid()) > 1) {
|
|
const char *name = perf_evsel__name(evsel);
|
|
const char *name = perf_evsel__name(evsel);
|
|
char *new_name;
|
|
char *new_name;
|
|
|
|
+ const char *sep = ":";
|
|
|
|
|
|
- if (asprintf(&new_name, "%s%su", name, strchr(name, ':') ? "" : ":") < 0)
|
|
|
|
|
|
+ /* Is there already the separator in the name. */
|
|
|
|
+ if (strchr(name, '/') ||
|
|
|
|
+ strchr(name, ':'))
|
|
|
|
+ sep = "";
|
|
|
|
+
|
|
|
|
+ if (asprintf(&new_name, "%s%su", name, sep) < 0)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
if (evsel->name)
|
|
if (evsel->name)
|