summaryrefslogtreecommitdiffstats
path: root/tools/lib/api
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-07-06 17:46:15 +0200
committerIngo Molnar <mingo@kernel.org>2015-07-06 17:46:15 +0200
commit60cd37eb100c4880b28078a47f3062fac7572095 (patch)
tree5cb03265f2ab74735f8d479d7bb7d85d8aa9e092 /tools/lib/api
parentebf2d2689de551d90965090bb991fc640a0c0d41 (diff)
parentab85785aa13c36440a91a8e9f7616357de411a1f (diff)
downloadlinux-60cd37eb100c4880b28078a47f3062fac7572095.tar.bz2
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Take tracefs into account when reporting errors about accessing tracepoint information in tools like 'perf trace' (Arnaldo Carvalho de Melo) - Let user have timestamps with per-thread recording in 'perf record' (Adrian Hunter) Infrastructure changes: - Introduce series of functions to build event filters so that we can set them in just one ioctl call, useful to set up common_pid, raw_syscalls:sys_{enter,exit}'s "id" filters to use with 'perf trace' (Arnaldo Carvalho de Melo) - Delete an unnecessary check before calling strfilter__delete() (Markus Elfring) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib/api')
-rw-r--r--tools/lib/api/fs/debugfs.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
index 8305b3e9d48e..eb7cf4d18f8a 100644
--- a/tools/lib/api/fs/debugfs.c
+++ b/tools/lib/api/fs/debugfs.c
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include "debugfs.h"
+#include "tracefs.h"
#ifndef DEBUGFS_DEFAULT_PATH
#define DEBUGFS_DEFAULT_PATH "/sys/kernel/debug"
@@ -94,11 +95,21 @@ int debugfs__strerror_open(int err, char *buf, size_t size, const char *filename
"Hint:\tIs the debugfs filesystem mounted?\n"
"Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'");
break;
- case EACCES:
+ case EACCES: {
+ const char *mountpoint = debugfs_mountpoint;
+
+ if (!access(debugfs_mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) {
+ const char *tracefs_mntpoint = tracefs_find_mountpoint();
+
+ if (tracefs_mntpoint)
+ mountpoint = tracefs_mntpoint;
+ }
+
snprintf(buf, size,
"Error:\tNo permissions to read %s/%s\n"
"Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n",
- debugfs_mountpoint, filename, debugfs_mountpoint);
+ debugfs_mountpoint, filename, mountpoint);
+ }
break;
default:
snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf)));