Commit cd0cfad7 authored by Borislav Petkov's avatar Borislav Petkov Committed by Arnaldo Carvalho de Melo

perf tools: Move fs.* to lib/api/fs/

Move to generic library and kill magic.h as it is needed only in fs.h.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <rric@kernel.org>
Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386605664-24041-3-git-send-email-bp@alien8.deSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c9b951c4
...@@ -9,8 +9,10 @@ LIB_H= ...@@ -9,8 +9,10 @@ LIB_H=
LIB_OBJS= LIB_OBJS=
LIB_H += fs/debugfs.h LIB_H += fs/debugfs.h
LIB_H += fs/fs.h
LIB_OBJS += $(OUTPUT)fs/debugfs.o LIB_OBJS += $(OUTPUT)fs/debugfs.o
LIB_OBJS += $(OUTPUT)fs/fs.o
LIBFILE = libapikfs.a LIBFILE = libapikfs.a
......
/* TODO merge/factor in debugfs.c here */
/* TODO merge/factor into tools/lib/lk/debugfs.c */ #include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <sys/vfs.h>
#include "util.h" #include "debugfs.h"
#include "util/fs.h" #include "fs.h"
static const char * const sysfs__fs_known_mountpoints[] = { static const char * const sysfs__fs_known_mountpoints[] = {
"/sys", "/sys",
......
#ifndef _PERF_LINUX_MAGIC_H_ #ifndef __API_FS__
#define _PERF_LINUX_MAGIC_H_ #define __API_FS__
#ifndef DEBUGFS_MAGIC
#define DEBUGFS_MAGIC 0x64626720
#endif
#ifndef SYSFS_MAGIC #ifndef SYSFS_MAGIC
#define SYSFS_MAGIC 0x62656572 #define SYSFS_MAGIC 0x62656572
...@@ -13,4 +9,6 @@ ...@@ -13,4 +9,6 @@
#define PROC_SUPER_MAGIC 0x9fa0 #define PROC_SUPER_MAGIC 0x9fa0
#endif #endif
#endif const char *sysfs__mountpoint(void);
const char *procfs__mountpoint(void);
#endif /* __API_FS__ */
...@@ -218,7 +218,6 @@ LIB_H += util/include/linux/ctype.h ...@@ -218,7 +218,6 @@ LIB_H += util/include/linux/ctype.h
LIB_H += util/include/linux/kernel.h LIB_H += util/include/linux/kernel.h
LIB_H += util/include/linux/list.h LIB_H += util/include/linux/list.h
LIB_H += util/include/linux/export.h LIB_H += util/include/linux/export.h
LIB_H += util/include/linux/magic.h
LIB_H += util/include/linux/poison.h LIB_H += util/include/linux/poison.h
LIB_H += util/include/linux/prefetch.h LIB_H += util/include/linux/prefetch.h
LIB_H += util/include/linux/rbtree.h LIB_H += util/include/linux/rbtree.h
...@@ -244,7 +243,6 @@ LIB_H += util/cache.h ...@@ -244,7 +243,6 @@ LIB_H += util/cache.h
LIB_H += util/callchain.h LIB_H += util/callchain.h
LIB_H += util/build-id.h LIB_H += util/build-id.h
LIB_H += util/debug.h LIB_H += util/debug.h
LIB_H += util/fs.h
LIB_H += util/pmu.h LIB_H += util/pmu.h
LIB_H += util/event.h LIB_H += util/event.h
LIB_H += util/evsel.h LIB_H += util/evsel.h
...@@ -306,7 +304,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o ...@@ -306,7 +304,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o
LIB_OBJS += $(OUTPUT)util/build-id.o LIB_OBJS += $(OUTPUT)util/build-id.o
LIB_OBJS += $(OUTPUT)util/config.o LIB_OBJS += $(OUTPUT)util/config.o
LIB_OBJS += $(OUTPUT)util/ctype.o LIB_OBJS += $(OUTPUT)util/ctype.o
LIB_OBJS += $(OUTPUT)util/fs.o
LIB_OBJS += $(OUTPUT)util/pmu.o LIB_OBJS += $(OUTPUT)util/pmu.o
LIB_OBJS += $(OUTPUT)util/environment.o LIB_OBJS += $(OUTPUT)util/environment.o
LIB_OBJS += $(OUTPUT)util/event.o LIB_OBJS += $(OUTPUT)util/event.o
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "parse-events.h" #include "parse-events.h"
#include "evsel.h" #include "evsel.h"
#include "evlist.h" #include "evlist.h"
#include "fs.h" #include <api/fs/fs.h>
#include <api/fs/debugfs.h> #include <api/fs/debugfs.h>
#include "tests.h" #include "tests.h"
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
......
#include "util.h" #include "util.h"
#include "fs.h" #include <api/fs/fs.h>
#include "../perf.h" #include "../perf.h"
#include "cpumap.h" #include "cpumap.h"
#include <assert.h> #include <assert.h>
......
#ifndef __PERF_FS
#define __PERF_FS
const char *sysfs__mountpoint(void);
const char *procfs__mountpoint(void);
#endif /* __PERF_FS */
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <dirent.h> #include <dirent.h>
#include "fs.h" #include <api/fs/fs.h>
#include <locale.h> #include <locale.h>
#include "util.h" #include "util.h"
#include "pmu.h" #include "pmu.h"
......
...@@ -17,6 +17,6 @@ util/xyarray.c ...@@ -17,6 +17,6 @@ util/xyarray.c
util/cgroup.c util/cgroup.c
util/rblist.c util/rblist.c
util/strlist.c util/strlist.c
util/fs.c ../lib/api/fs/fs.c
util/trace-event.c util/trace-event.c
../../lib/rbtree.c ../../lib/rbtree.c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "evsel.h" #include "evsel.h"
#include "cpumap.h" #include "cpumap.h"
#include "parse-events.h" #include "parse-events.h"
#include "fs.h" #include <api/fs/fs.h>
#include "util.h" #include "util.h"
typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel); typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel);
......
#include "../perf.h" #include "../perf.h"
#include "util.h" #include "util.h"
#include "fs.h" #include <api/fs/fs.h>
#include <sys/mman.h> #include <sys/mman.h>
#ifdef HAVE_BACKTRACE_SUPPORT #ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h> #include <execinfo.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment