Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4605eab3 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

tools lib api fs: Replace debugfs/tracefs objects interface with fs.c



Switching to the fs.c related filesystem framework.

Signed-off-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4f234f06
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
#include <unistd.h>
#include <sys/mount.h>

#include "debugfs.h"
#include "fs.h"

#define _STR(x) #x
+7 −8
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "debugfs.h"
#include "tracefs.h"
#include "fs.h"

#include "tracing_path.h"

@@ -29,7 +28,7 @@ static const char *tracing_path_tracefs_mount(void)
{
	const char *mnt;

	mnt = tracefs_mount(NULL);
	mnt = tracefs__mount();
	if (!mnt)
		return NULL;

@@ -42,7 +41,7 @@ static const char *tracing_path_debugfs_mount(void)
{
	const char *mnt;

	mnt = debugfs_mount(NULL);
	mnt = debugfs__mount();
	if (!mnt)
		return NULL;

@@ -96,7 +95,7 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename)
		 * want some tracepoint which wasn't compiled in your kernel.
		 * - jirka
		 */
		if (debugfs_configured() || tracefs_configured()) {
		if (debugfs__configured() || tracefs__configured()) {
			snprintf(buf, size,
				 "Error:\tFile %s/%s not found.\n"
				 "Hint:\tPerhaps this kernel misses some CONFIG_ setting to enable this feature?.\n",
@@ -110,13 +109,13 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename)
			 "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'");
		break;
	case EACCES: {
		const char *mountpoint = debugfs_find_mountpoint();
		const char *mountpoint = debugfs__mountpoint();

		if (!access(mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) {
			const char *tracefs_mntpoint = tracefs_find_mountpoint();
			const char *tracefs_mntpoint = tracefs__mountpoint();

			if (tracefs_mntpoint)
				mountpoint = tracefs_find_mountpoint();
				mountpoint = tracefs__mountpoint();
		}

		snprintf(buf, size,
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#include "util/parse-options.h"
#include "util/trace-event.h"
#include "util/debug.h"
#include <api/fs/debugfs.h>
#include "util/tool.h"
#include "util/stat.h"
#include "util/top.h"
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@
#include "util/strfilter.h"
#include "util/symbol.h"
#include "util/debug.h"
#include <api/fs/debugfs.h>
#include "util/parse-options.h"
#include "util/probe-finder.h"
#include "util/probe-event.h"
+3 −2
Original line number Diff line number Diff line
#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");
Loading