perf tools: Add hint for 'Too many events are opened.' error message
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / evsel.c
index c886b9f7a48d01b31c0eb541961faa4c02df3179..a3e36fc634dc40005e77f7b228ec8ffb5ad001af 100644 (file)
@@ -2149,7 +2149,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
        case EMFILE:
                return scnprintf(msg, size, "%s",
                         "Too many events are opened.\n"
-                        "Try again after reducing the number of events.");
+                        "Probably the maximum number of open file descriptors has been reached.\n"
+                        "Hint: Try again after reducing the number of events.\n"
+                        "Hint: Try increasing the limit with 'ulimit -n <limit>'");
        case ENODEV:
                if (target->cpu_list)
                        return scnprintf(msg, size, "%s",