summaryrefslogtreecommitdiff
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-09-02 09:56:43 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-14 12:50:15 -0300
commit4605eab3487dc818b1f3cbee2cd139cca3564be7 (patch)
treeb63bdd5ed951159c06f29877af81cc41294e2afd /tools/perf/tests
parent4f234f06d608635a1cff936131285a91af213b37 (diff)
tools lib api fs: Replace debugfs/tracefs objects interface with fs.c
Switching to the fs.c related filesystem framework. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Raphael Beamonte <raphael.beamonte@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1441180605-24737-14-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/openat-syscall-all-cpus.c5
-rw-r--r--tools/perf/tests/openat-syscall.c5
-rw-r--r--tools/perf/tests/parse-events.c7
3 files changed, 9 insertions, 8 deletions
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c
index a572f87e9c8d..a38adf94c731 100644
--- a/tools/perf/tests/openat-syscall-all-cpus.c
+++ b/tools/perf/tests/openat-syscall-all-cpus.c
@@ -1,3 +1,4 @@
+#include <api/fs/fs.h>
#include "evsel.h"
#include "tests.h"
#include "thread_map.h"
@@ -30,9 +31,9 @@ int test__openat_syscall_event_on_all_cpus(void)
evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
if (evsel == NULL) {
- if (tracefs_configured())
+ if (tracefs__configured())
pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
- else if (debugfs_configured())
+ 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");
diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c
index c9a37bc6b33a..8048c7d7cd67 100644
--- a/tools/perf/tests/openat-syscall.c
+++ b/tools/perf/tests/openat-syscall.c
@@ -1,3 +1,4 @@
+#include <api/fs/fs.h>
#include "thread_map.h"
#include "evsel.h"
#include "debug.h"
@@ -18,9 +19,9 @@ int test__openat_syscall_event(void)
evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
if (evsel == NULL) {
- if (tracefs_configured())
+ if (tracefs__configured())
pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
- else if (debugfs_configured())
+ 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");
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 9b6b2b6324a1..91fbfd593c4a 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -3,11 +3,10 @@
#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"
#include <linux/hw_breakpoint.h>
+#include <api/fs/fs.h>
#define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD)
@@ -1268,12 +1267,12 @@ static int count_tracepoints(void)
DIR *events_dir;
int cnt = 0;
- mountpoint = tracefs_find_mountpoint();
+ mountpoint = tracefs__mountpoint();
if (mountpoint) {
scnprintf(events_path, PATH_MAX, "%s/events",
mountpoint);
} else {
- mountpoint = debugfs_find_mountpoint();
+ mountpoint = debugfs__mountpoint();
scnprintf(events_path, PATH_MAX, "%s/tracing/events",
mountpoint);
}