perf: Have perf become tracefs aware
v3 cover perf: Have perf become tracefs aware
As I'm trying to move the tracing directory from debugfs, perf needs to be aware of this as system admins will now be able to mount the tracing directory without needing to mount debugfs. This patch series addresses this and makes perf aware of tracefs.
You can also get this series from my repo as stated below.
Changes since v2:
o Fixed directory name to /sys/kernel/tracing as per Namhyung Kim's comment
Changes since v1:
o Added a patch to nuke the debugfs_valid_mountpoint.
Well, it doesn't totally nuke it. It still uses that function (static though) to test if the "default" debugfs locations may already contain a debugfs file system. I also have tracefs do the same.
o Fixed setting of debugfs_found and tracefs_found
o Moved STR macro and PATH_MAX macros from debugfs.h to findfs.h
o Changed debugfs_configured() and tracefs_configured() to use find_mountpoint() to see if they are configured.
Internal SHA1: 51c77ca617b3a592e0d658127b5c61dd12225db1
Steven Rostedt (Red Hat) (6):
perf: Do not check debugfs MAGIC for tracing files tools lib fs: Add helper to find mounted file systems tools lib api fs: Add tracefs mount helper functions tools lib api fs: Add DEBUGFS_DEFAULT_PATH macro tools lib api fs: Add {tracefs,debugfs}_configured() functions
perf: Make perf aware of tracefs
----
tools/lib/api/Makefile | 4 ++ tools/lib/api/fs/debugfs.c | 69 +++++++++------------------- tools/lib/api/fs/debugfs.h | 13 +----- tools/lib/api/fs/findfs.c | 63 ++++++++++++++++++++++++++ tools/lib/api/fs/findfs.h | 23 ++++++++++ tools/lib/api/fs/tracefs.c | 78 ++++++++++++++++++++++++++++++++ tools/lib/api/fs/tracefs.h | 21 +++++++++ tools/perf/tests/open-syscall-all-cpus.c | 7 ++- tools/perf/tests/open-syscall.c | 7 ++- tools/perf/tests/parse-events.c | 13 +++++- tools/perf/util/cache.h | 1 + tools/perf/util/evlist.c | 1 - tools/perf/util/parse-events.c | 19 -------- tools/perf/util/parse-events.h | 2 +- tools/perf/util/probe-event.c | 24 ++++++---- tools/perf/util/util.c | 60 +++++++++++++++++++----- tools/perf/util/util.h | 1 + 17 files changed, 304 insertions(+), 102 deletions(-)
PATCH v3 1/6 perf: Do not check debugfs MAGIC for tracing files
From: "Steven Rostedt (Red Hat)" <[email protected]>
It's rather strange to be checking the debugfs MAGIC number for the tracing directory. A system admin may want to have a custom set of events to trace and it should be allowed to let the admin make a temp file (even for tracing virtual boxes, this is useful).
Also with the coming tracefs, the files may not even be under debugfs, so checking the debugfs MAGIC number is pointless.
--- tools/lib/api/fs/debugfs.c | 28 ++++++++++++++-------------- tools/lib/api/fs/debugfs.h | 1 - tools/perf/util/parse-events.c | 19 ------------------- 3 files changed, 14 insertions(+), 34 deletions(-)
tools/lib/api/fs/debugfs.c +14 -14
@@ -20,6 +20,20 @@ static const char * const debugfs_known_mountpoints[] = {static bool debugfs_found; +/* verify that a mountpoint is actually a debugfs instance */ + +static int debugfs_valid_mountpoint (const char *debugfs) +{ +struct statfs st_fs; + +if (statfs (debugfs, &st_fs) <0 ) +return -ENOENT ; +else if ((long )st_fs.f_type != (long )DEBUGFS_MAGIC ) +return -ENOENT ; + +return 0 ; +} +/* find the path to the mounted debugfs */ const char *debugfs_find_mountpoint (void ) {
@@ -60,20 +74,6 @@ const char *debugfs_find_mountpoint(void)return debugfs_mountpoint; } -/* verify that a mountpoint is actually a debugfs instance */ - -int debugfs_valid_mountpoint (const char *debugfs) -{ -struct statfs st_fs; - -if (statfs (debugfs, &st_fs) <0 ) -return -ENOENT ; -else if ((long )st_fs.f_type != (long )DEBUGFS_MAGIC ) -return -ENOENT ; - -return 0 ; -} -/* mount the debugfs somewhere if it's not mounted */ char *debugfs_mount (const char *mountpoint) {
tools/lib/api/fs/debugfs.h +0 -1
@@ -21,7 +21,6 @@#endif const char *debugfs_find_mountpoint (void ); -int debugfs_valid_mountpoint (const char *debugfs);char *debugfs_mount (const char *mountpoint);extern char debugfs_mountpoint[];
tools/perf/util/parse-events.c +0 -19
@@ -175,9 +175,6 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config)char evt_path[MAXPATHLEN ];char dir_path[MAXPATHLEN ]; -if (debugfs_valid_mountpoint (tracing_events_path)) -return NULL ; - sys_dir =opendir (tracing_events_path);if (!sys_dir)return NULL ;
@@ -473,12 +470,6 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,int parse_events_add_tracepoint (struct list_head *list,int *idx,char *sys,char *event) { -int ret; - - ret =debugfs_valid_mountpoint (tracing_events_path); -if (ret) -return ret; -if (strpbrk (sys,"*?" ))return add_tracepoint_multi_sys (list, idx, sys, event);else
@@ -1109,13 +1100,6 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob,struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;char evt_path[MAXPATHLEN ];char dir_path[MAXPATHLEN ]; -char sbuf[STRERR_BUFSIZE ]; - -if (debugfs_valid_mountpoint (tracing_events_path)) { -printf (" [ Tracepoints not available: %s ]\n" , -strerror_r (errno, sbuf,sizeof (sbuf))); -return ; - } sys_dir =opendir (tracing_events_path);if (!sys_dir)
@@ -1163,9 +1147,6 @@ int is_valid_tracepoint(const char *event_string)char evt_path[MAXPATHLEN ];char dir_path[MAXPATHLEN ]; -if (debugfs_valid_mountpoint (tracing_events_path)) -return 0 ; - sys_dir =opendir (tracing_events_path);if (!sys_dir)return 0 ;
Signature · 1 line
2.1.4
PATCH v3 2/6 tools lib fs: Add helper to find mounted file systems
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
In preparation for adding tracefs for perf to use, create a findfs helper utility that find_debugfs uses instead of hard coding the search in the code. This will allow for a find_tracefs to be used as well.
--- tools/lib/api/Makefile | 2 ++ tools/lib/api/fs/debugfs.c | 51 ++++++------------------------------- tools/lib/api/fs/debugfs.h | 11 +------- tools/lib/api/fs/findfs.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/api/fs/findfs.h | 21 ++++++++++++++++ 5 files changed, 94 insertions(+), 54 deletions(-) create mode 100644 tools/lib/api/fs/findfs.c create mode 100644 tools/lib/api/fs/findfs.h
tools/lib/api/Makefile +2 -0
@@ -9,11 +9,13 @@ LIB_H= LIB_OBJS= LIB_H += fs/debugfs.h +LIB_H += fs/findfs.h LIB_H += fs/fs.h # See comment below about piggybacking... LIB_H += fd/array.h LIB_OBJS += $(OUTPUT)fs/debugfs.o +LIB_OBJS += $(OUTPUT)fs/findfs.o LIB_OBJS += $(OUTPUT)fs/fs.o # XXX piggybacking here, need to introduce libapikfd, or rename this # to plain libapik.a and make it have it all api goodies
tools/lib/api/fs/debugfs.c +7 -44
65 lines not on this page · raw message
tools/lib/api/fs/debugfs.h +1 -10
@@ -1,16 +1,7 @@#ifndef __API_DEBUGFS_H__#define __API_DEBUGFS_H__ -#define _STR (x) #x -#define STR (x) _STR(x) - -/* -* On most systems <limits.h> would have given us this, but not on some systems -* (e.g. GNU/Hurd). -*/ -#ifndef PATH_MAX -#define PATH_MAX 4096 -#endif +#include "findfs.h" #ifndef DEBUGFS_MAGIC #define DEBUGFS_MAGIC 0x64626720
tools/lib/api/fs/findfs.c new file +63 -0
63 lines not on this page · raw message
tools/lib/api/fs/findfs.h new file +21 -0
@@ -0,0 +1,21 @@ +#ifndef __API_FINDFS_H__ +#define __API_FINDFS_H__ + +#define _STR (x) #x +#define STR (x) _STR(x) + +/* +* On most systems <limits.h> would have given us this, but not on some systems +* (e.g. GNU/Hurd). +*/ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + +const char *find_mountpoint (const char *fstype,long magic, +char *mountpoint,int len, +const char *const *known_mountpoints); + +int valid_mountpoint (const char *mount,long magic); + +#endif /* __API_FINDFS_H__ */
Signature · 1 line
2.1.4
PATCH v3 3/6 tools lib api fs: Add tracefs mount helper functions
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
Since tracefs will now hold the event directory for perf, and even though by default, debugfs still mounts tracefs on the debugfs/tracing directory, the system admin may now choose to not mount debugfs and instead just mount tracefs instead.
Having tracefs helper functions will facilitate having perf look for tracefs first, and then try debugfs as a fallback.
--- tools/lib/api/Makefile | 2 ++ tools/lib/api/fs/tracefs.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/api/fs/tracefs.h | 20 +++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 tools/lib/api/fs/tracefs.c create mode 100644 tools/lib/api/fs/tracefs.h
tools/lib/api/Makefile +2 -0
@@ -9,12 +9,14 @@ LIB_H= LIB_OBJS= LIB_H += fs/debugfs.h +LIB_H += fs/tracefs.h LIB_H += fs/findfs.h LIB_H += fs/fs.h # See comment below about piggybacking... LIB_H += fd/array.h LIB_OBJS += $(OUTPUT)fs/debugfs.o +LIB_OBJS += $(OUTPUT)fs/tracefs.o LIB_OBJS += $(OUTPUT)fs/findfs.o LIB_OBJS += $(OUTPUT)fs/fs.o # XXX piggybacking here, need to introduce libapikfd, or rename this
tools/lib/api/fs/tracefs.c new file +70 -0
70 lines not on this page · raw message
tools/lib/api/fs/tracefs.h new file +20 -0
@@ -0,0 +1,20 @@ +#ifndef __API_TRACEFS_H__ +#define __API_TRACEFS_H__ + +#include "findfs.h" + +#ifndef TRACEFS_MAGIC +#define TRACEFS_MAGIC 0x74726163 +#endif + +#ifndef PERF_TRACEFS_ENVIRONMENT +#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" +#endif + +const char *tracefs_find_mountpoint (void ); +int tracefs_valid_mountpoint (const char *debugfs); +char *tracefs_mount (const char *mountpoint); + +extern char tracefs_mountpoint[]; + +#endif /* __API_DEBUGFS_H__ */
Signature · 1 line
2.1.4
PATCH v3 4/6 tools lib api fs: Add DEBUGFS_DEFAULT_PATH macro
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
Instead of hard coding "/sys/kernel/debug" everywhere, create a macro to hold where the default path exists.
--- tools/lib/api/fs/debugfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
tools/lib/api/fs/debugfs.c +7 -3
@@ -10,10 +10,14 @@#include "debugfs.h" -char debugfs_mountpoint[PATH_MAX +1 ] ="/sys/kernel/debug" ; +#ifndef DEBUGFS_DEFAULT_PATH +#define DEBUGFS_DEFAULT_PATH "/sys/kernel/debug" +#endif + +char debugfs_mountpoint[PATH_MAX +1 ] =DEBUGFS_DEFAULT_PATH ;static const char *const debugfs_known_mountpoints[] = { -"/sys/kernel/debug" , +DEBUGFS_DEFAULT_PATH ,"/debug" ,0 , };
@@ -50,7 +54,7 @@ char *debugfs_mount(const char *mountpoint) mountpoint =getenv (PERF_DEBUGFS_ENVIRONMENT );/* if no environment variable, use default */ if (mountpoint ==NULL ) - mountpoint ="/sys/kernel/debug" ; + mountpoint =DEBUGFS_DEFAULT_PATH ; }if (mount (NULL , mountpoint,"debugfs" ,0 ,NULL ) <0 )
Signature · 1 line
2.1.4
PATCH v3 5/6 tools lib api fs: Add {tracefs,debugfs}_configured() functions
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
Add tracefs_configured() to return true if tracefs is configured in the kernel (succeeds to find tracefs), and debugfs_configured() if debugfs is configured in the kernel (succeeds to find debugfs).
--- tools/lib/api/fs/debugfs.c | 8 ++++++++ tools/lib/api/fs/debugfs.h | 1 + tools/lib/api/fs/findfs.h | 2 ++ tools/lib/api/fs/tracefs.c | 8 ++++++++ tools/lib/api/fs/tracefs.h | 1 + 5 files changed, 20 insertions(+)
tools/lib/api/fs/debugfs.c +8 -0
@@ -3,8 +3,11 @@#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <stdbool.h> #include <sys/vfs.h> +#include <sys/types.h> +#include <sys/stat.h> #include <sys/mount.h> #include <linux/kernel.h>
@@ -24,6 +27,11 @@ static const char * const debugfs_known_mountpoints[] = {static bool debugfs_found; +bool debugfs_configured (void ) +{ +return debugfs_find_mountpoint () !=NULL ; +} +/* find the path to the mounted debugfs */ const char *debugfs_find_mountpoint (void ) {
tools/lib/api/fs/debugfs.h +1 -0
@@ -11,6 +11,7 @@#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"#endif +bool debugfs_configured (void );const char *debugfs_find_mountpoint (void );char *debugfs_mount (const char *mountpoint);
tools/lib/api/fs/findfs.h +2 -0
@@ -1,6 +1,8 @@#ifndef __API_FINDFS_H__#define __API_FINDFS_H__ +#include <stdbool.h> +#define _STR (x) #x#define STR (x) _STR(x)
tools/lib/api/fs/tracefs.c +8 -0
@@ -2,8 +2,11 @@#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <stdbool.h> #include <sys/vfs.h> +#include <sys/types.h> +#include <sys/stat.h> #include <sys/mount.h> #include <linux/kernel.h>
@@ -25,6 +28,11 @@ static const char * const tracefs_known_mountpoints[] = {static bool tracefs_found; +bool tracefs_configured (void ) +{ +return tracefs_find_mountpoint () !=NULL ; +} +/* find the path to the mounted tracefs */ const char *tracefs_find_mountpoint (void ) {
tools/lib/api/fs/tracefs.h +1 -0
@@ -11,6 +11,7 @@#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"#endif +bool tracefs_configured (void );const char *tracefs_find_mountpoint (void );int tracefs_valid_mountpoint (const char *debugfs);char *tracefs_mount (const char *mountpoint);
Signature · 1 line
2.1.4
PATCH v3 6/6 perf: Make perf aware of tracefs
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
As tracefs may be mounted instead of debugfs to get to the event directories, have perf know about tracefs, and use that file system over debugfs if it is present.
--- tools/perf/tests/open-syscall-all-cpus.c | 7 +++- tools/perf/tests/open-syscall.c | 7 +++- tools/perf/tests/parse-events.c | 13 +++++-- tools/perf/util/cache.h | 1 + tools/perf/util/evlist.c | 1 - tools/perf/util/parse-events.h | 2 +- tools/perf/util/probe-event.c | 24 ++++++++----- tools/perf/util/util.c | 60 ++++++++++++++++++++++++++------ tools/perf/util/util.h | 1 + 9 files changed, 91 insertions(+), 25 deletions(-)
tools/perf/tests/open-syscall-all-cpus.c +6 -1
@@ -29,7 +29,12 @@ int test__open_syscall_event_on_all_cpus(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) { -pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" ); +if (tracefs_configured ()) +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" ); +else if (debugfs_configured ()) +pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" ); +else +pr_debug ("Neither tracefs or debugfs is enabled in this kernel\n" ); goto out_thread_map_delete; }
tools/perf/tests/open-syscall.c +6 -1
@@ -18,7 +18,12 @@ int test__open_syscall_event(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) { -pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" ); +if (tracefs_configured ()) +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" ); +else if (debugfs_configured ()) +pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" ); +else +pr_debug ("Neither tracefs or debugfs is enabled in this kernel\n" ); goto out_thread_map_delete; }
tools/perf/tests/parse-events.c +11 -2
@@ -3,6 +3,7 @@#include "evsel.h" #include "evlist.h" #include <api/fs/fs.h> +#include <api/fs/tracefs.h> #include <api/fs/debugfs.h> #include "tests.h" #include "debug.h"
@@ -1192,11 +1193,19 @@ static int count_tracepoints(void) {char events_path[PATH_MAX ];struct dirent *events_ent; +const char *mountpoint;DIR *events_dir;int cnt =0 ; -scnprintf (events_path,PATH_MAX ,"%s/tracing/events" , -debugfs_find_mountpoint ()); + mountpoint =tracefs_find_mountpoint (); +if (mountpoint) { +scnprintf (events_path,PATH_MAX ,"%s/events" , + mountpoint); + }else { + mountpoint =debugfs_find_mountpoint (); +scnprintf (events_path,PATH_MAX ,"%s/tracing/events" , + mountpoint); + } events_dir =opendir (events_path);
tools/perf/util/cache.h +1 -0
@@ -17,6 +17,7 @@#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"#define DEFAULT_PERF_DIR_ENVIRONMENT ".perf"#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" +#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"typedef int (*config_fn_t )(const char *,const char *,void *);extern int perf_default_config (const char *,const char *,void *);
tools/perf/util/evlist.c +0 -1
@@ -7,7 +7,6 @@* Released under the GPL v2. (and only v2, not any later version) */ #include "util.h" -#include <api/fs/debugfs.h> #include <api/fs/fs.h> #include <poll.h> #include "cpumap.h"
tools/perf/util/parse-events.h +1 -1
@@ -122,6 +122,6 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob,int print_hwcache_events (const char *event_glob,bool name_only);extern int is_valid_tracepoint (const char *event_string); -extern int valid_debugfs_mount (const char *debugfs); +int valid_event_mount (const char *eventfs);#endif /* __PERF_PARSE_EVENTS_H */
tools/perf/util/probe-event.c +16 -8
@@ -41,6 +41,7 @@#include "symbol.h" #include "thread.h" #include <api/fs/debugfs.h> +#include <api/fs/tracefs.h> #include "trace-event.h" /* For __maybe_unused */ #include "probe-event.h" #include "probe-finder.h"
@@ -1805,7 +1806,7 @@ static void print_open_warning(int err, bool is_kprobe)" - please rebuild kernel with %s.\n" , is_kprobe ? 'k' : 'u', config); }else if (err == -ENOTSUP ) -pr_warning ("Debugfs is not mounted.\n" ); +pr_warning ("Tracefs or debugfs is not mounted.\n" );else pr_warning("Failed to open %cprobe_events: %s\n", is_kprobe ? 'k' : 'u',
@@ -1816,7 +1817,7 @@ static void print_both_open_warning(int kerr, int uerr) {/* Both kprobes and uprobes are disabled, warn it. */ if (kerr == -ENOTSUP && uerr == -ENOTSUP ) -pr_warning ("Debugfs is not mounted.\n" ); +pr_warning ("Tracefs or debugfs is not mounted.\n" );else if (kerr == -ENOENT && uerr == -ENOENT )pr_warning ("Please rebuild kernel with CONFIG_KPROBE_EVENTS " "or/and CONFIG_UPROBE_EVENTS.\n" );
@@ -1833,13 +1834,20 @@ static int open_probe_events(const char *trace_file, bool readwrite) {char buf[PATH_MAX ];const char *__debugfs; +const char *tracing_dir ="" ;int ret; - __debugfs =debugfs_find_mountpoint (); -if (__debugfs ==NULL ) -return -ENOTSUP ; + __debugfs =tracefs_find_mountpoint (); +if (__debugfs ==NULL ) { + tracing_dir ="tracing/" ; - ret =e_snprintf (buf,PATH_MAX ,"%s/%s" , __debugfs, trace_file); + __debugfs =debugfs_find_mountpoint (); +if (__debugfs ==NULL ) +return -ENOTSUP ; + } + + ret =e_snprintf (buf,PATH_MAX ,"%s/%s%s" , + __debugfs, tracing_dir, trace_file);if (ret >=0 ) {pr_debug ("Opening %s write=%d\n" , buf, readwrite);if (readwrite && !probe_event_dry_run)
@@ -1855,12 +1863,12 @@ static int open_probe_events(const char *trace_file, bool readwrite)static int open_kprobe_events (bool readwrite) { -return open_probe_events ("tracing/kprobe_events" , readwrite); +return open_probe_events ("kprobe_events" , readwrite); }static int open_uprobe_events (bool readwrite) { -return open_probe_events ("tracing/uprobe_events" , readwrite); +return open_probe_events ("uprobe_events" , readwrite); }/* Get raw string list of current kprobe_events or uprobe_events */
tools/perf/util/util.c +49 -11
98 lines not on this page · raw message
tools/perf/util/util.h +1 -0
@@ -75,6 +75,7 @@#include <linux/types.h> #include <sys/ttydefaults.h> #include <api/fs/debugfs.h> +#include <api/fs/tracefs.h> #include <termios.h> #include <linux/bitops.h> #include <termios.h>
Signature · 1 line
2.1.4
If you already applied v2, here's the patch that changes v3.
-- Steve
Quoted 1 line
From
55989e0e3e9c15d755a9cf0d8c6a899a0de7d1ebMon Sep 17 00:00:00 2001
From: "Steven Rostedt (Red Hat)" <[email protected]>
Date: Mon, 9 Feb 2015 10:42:59 -0500
Subject: [PATCH] perf: Fix directory name in error message for tracefs
If tracefs is configured, but not mounted, the error message should ask if it is mounted at /sys/kernel/tracing and not at /sys/kernel/debug.
--- tools/perf/tests/open-syscall-all-cpus.c | 2 +- tools/perf/tests/open-syscall.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/tests/open-syscall-all-cpus.c +1 -1
@@ -30,7 +30,7 @@ int test__open_syscall_event_on_all_cpus(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) {if (tracefs_configured ()) -pr_debug ("is tracefs mounted on /sys/kernel/debug?\n" ); +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" );else if (debugfs_configured ())pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" );else
tools/perf/tests/open-syscall.c +1 -1
@@ -19,7 +19,7 @@ int test__open_syscall_event(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) {if (tracefs_configured ()) -pr_debug ("is tracefs mounted on /sys/kernel/debug?\n" ); +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" );else if (debugfs_configured ())pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" );else
Signature · 1 line
2.1.4
Namhyung Kim
maintainerHi,
Quoted 1 line · Steven Rostedt
If you already applied v2, here's the patch that changes v3.
In any case, please feel free to add my ACKs to this series.
Thanks,
Namhyung
Quoted 49 lines
-- Steve
From
55989e0e3e9c15d755a9cf0d8c6a899a0de7d1ebMon Sep 17 00:00:00 2001
From: "Steven Rostedt (Red Hat)" <[email protected]>
Date: Mon, 9 Feb 2015 10:42:59 -0500
Subject: [PATCH] perf: Fix directory name in error message for tracefsIf tracefs is configured, but not mounted, the error message should ask if it is mounted at
/sys/kernel/tracingand not at/sys/kernel/debug.Reported-by Namhyung Kim <[email protected]>Signed-off-by Steven Rostedt <[email protected]>--- tools/perf/tests/open-syscall-all-cpus.c | 2 +- tools/perf/tests/open-syscall.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/perf/tests/open-syscall-all-cpus.c +1
-1@@ -30,7 +30,7 @@ int test__open_syscall_event_on_all_cpus(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) {if (tracefs_configured ()) -pr_debug ("is tracefs mounted on /sys/kernel/debug?\n" ); +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" );else if (debugfs_configured ())pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" );else tools/perf/tests/open-syscall.c +1
-1@@ -19,7 +19,7 @@ int test__open_syscall_event(void) evsel =perf_evsel__newtp ("syscalls" ,"sys_enter_open" );if (evsel ==NULL ) {if (tracefs_configured ()) -pr_debug ("is tracefs mounted on /sys/kernel/debug?\n" ); +pr_debug ("is tracefs mounted on /sys/kernel/tracing?\n" );else if (debugfs_configured ())pr_debug ("is debugfs mounted on /sys/kernel/debug?\n" );else Signature · 1 line
2.1.4