Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Borislav 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.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Borislav Petkov and committed by
Arnaldo Carvalho de Melo
cd0cfad7 c9b951c4

+21 -26
+2
tools/lib/api/Makefile
··· 9 9 LIB_OBJS= 10 10 11 11 LIB_H += fs/debugfs.h 12 + LIB_H += fs/fs.h 12 13 13 14 LIB_OBJS += $(OUTPUT)fs/debugfs.o 15 + LIB_OBJS += $(OUTPUT)fs/fs.o 14 16 15 17 LIBFILE = libapikfs.a 16 18
-3
tools/perf/Makefile.perf
··· 218 218 LIB_H += util/include/linux/kernel.h 219 219 LIB_H += util/include/linux/list.h 220 220 LIB_H += util/include/linux/export.h 221 - LIB_H += util/include/linux/magic.h 222 221 LIB_H += util/include/linux/poison.h 223 222 LIB_H += util/include/linux/prefetch.h 224 223 LIB_H += util/include/linux/rbtree.h ··· 243 244 LIB_H += util/callchain.h 244 245 LIB_H += util/build-id.h 245 246 LIB_H += util/debug.h 246 - LIB_H += util/fs.h 247 247 LIB_H += util/pmu.h 248 248 LIB_H += util/event.h 249 249 LIB_H += util/evsel.h ··· 304 306 LIB_OBJS += $(OUTPUT)util/build-id.o 305 307 LIB_OBJS += $(OUTPUT)util/config.o 306 308 LIB_OBJS += $(OUTPUT)util/ctype.o 307 - LIB_OBJS += $(OUTPUT)util/fs.o 308 309 LIB_OBJS += $(OUTPUT)util/pmu.o 309 310 LIB_OBJS += $(OUTPUT)util/environment.o 310 311 LIB_OBJS += $(OUTPUT)util/event.o
+1 -1
tools/perf/tests/parse-events.c
··· 2 2 #include "parse-events.h" 3 3 #include "evsel.h" 4 4 #include "evlist.h" 5 - #include "fs.h" 5 + #include <api/fs/fs.h> 6 6 #include <api/fs/debugfs.h> 7 7 #include "tests.h" 8 8 #include <linux/hw_breakpoint.h>
+1 -1
tools/perf/util/cpumap.c
··· 1 1 #include "util.h" 2 - #include "fs.h" 2 + #include <api/fs/fs.h> 3 3 #include "../perf.h" 4 4 #include "cpumap.h" 5 5 #include <assert.h>
+8 -3
tools/perf/util/fs.c tools/lib/api/fs/fs.c
··· 1 + /* TODO merge/factor in debugfs.c here */ 1 2 2 - /* TODO merge/factor into tools/lib/lk/debugfs.c */ 3 + #include <errno.h> 4 + #include <stdbool.h> 5 + #include <stdio.h> 6 + #include <string.h> 7 + #include <sys/vfs.h> 3 8 4 - #include "util.h" 5 - #include "util/fs.h" 9 + #include "debugfs.h" 10 + #include "fs.h" 6 11 7 12 static const char * const sysfs__fs_known_mountpoints[] = { 8 13 "/sys",
-7
tools/perf/util/fs.h
··· 1 - #ifndef __PERF_FS 2 - #define __PERF_FS 3 - 4 - const char *sysfs__mountpoint(void); 5 - const char *procfs__mountpoint(void); 6 - 7 - #endif /* __PERF_FS */
+5 -7
tools/perf/util/include/linux/magic.h tools/lib/api/fs/fs.h
··· 1 - #ifndef _PERF_LINUX_MAGIC_H_ 2 - #define _PERF_LINUX_MAGIC_H_ 3 - 4 - #ifndef DEBUGFS_MAGIC 5 - #define DEBUGFS_MAGIC 0x64626720 6 - #endif 1 + #ifndef __API_FS__ 2 + #define __API_FS__ 7 3 8 4 #ifndef SYSFS_MAGIC 9 5 #define SYSFS_MAGIC 0x62656572 ··· 9 13 #define PROC_SUPER_MAGIC 0x9fa0 10 14 #endif 11 15 12 - #endif 16 + const char *sysfs__mountpoint(void); 17 + const char *procfs__mountpoint(void); 18 + #endif /* __API_FS__ */
+1 -1
tools/perf/util/pmu.c
··· 3 3 #include <unistd.h> 4 4 #include <stdio.h> 5 5 #include <dirent.h> 6 - #include "fs.h" 6 + #include <api/fs/fs.h> 7 7 #include <locale.h> 8 8 #include "util.h" 9 9 #include "pmu.h"
+1 -1
tools/perf/util/python-ext-sources
··· 17 17 util/cgroup.c 18 18 util/rblist.c 19 19 util/strlist.c 20 - util/fs.c 20 + ../lib/api/fs/fs.c 21 21 util/trace-event.c 22 22 ../../lib/rbtree.c
+1 -1
tools/perf/util/record.c
··· 2 2 #include "evsel.h" 3 3 #include "cpumap.h" 4 4 #include "parse-events.h" 5 - #include "fs.h" 5 + #include <api/fs/fs.h> 6 6 #include "util.h" 7 7 8 8 typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel);
+1 -1
tools/perf/util/util.c
··· 1 1 #include "../perf.h" 2 2 #include "util.h" 3 - #include "fs.h" 3 + #include <api/fs/fs.h> 4 4 #include <sys/mman.h> 5 5 #ifdef HAVE_BACKTRACE_SUPPORT 6 6 #include <execinfo.h>