Skip to contentSkip to conversation

perf evsel: Update the hint for the usage of the load latency event

PATCH New [email protected] 1 participant 1 message Aug 17, 2022 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf evsel: Update the hint for the usage of the load latency event

From: Kan Liang <[email protected]>

The current message is not providing enough information. It's hard for a user to figure out what's the auxiliary event.

Adding the event name of the auxiliary event in the hint. The user can simply cut & paste.

---
 tools/perf/util/evsel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/evsel.c +2 -1
index 4852089e1d79..0d1bb5c723e9 100644
@@ -3056,7 +3056,8 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
 		break;
 	case ENODATA:
 		return scnprintf(msg, size, "Cannot collect data source with the load latency event alone. "
-				 "Please add an auxiliary event in front of the load latency event.");
+				 "Please add an auxiliary event in front of the load latency event. "
+				 "For example, -e {mem-loads-aux,%s}.", evsel__name(evsel));
 	default:
 		break;
 	}
Signature · 1 line
2.35.1