Arnaldo Carvalho de Melo
f816b3cc99
tools lib fs debugfs: Check if debugfs is mounted when handling ENOENT
...
If debugfs was already mounted, then its a matter of not finding the
tracepoint, tell the user that perhaps a CONFIG_ setting is not enabled.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-22 17:02:23 -03:00
Arnaldo Carvalho de Melo
2cc990ba3a
tools lib fs debugfs: Introduce debugfs__strerror_open_tp
...
There will be other cases where not just a tracepoint event is being
opened below the debugfs mountpoint, but it is rather common, so provide
one helper for that.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-22 17:02:20 -03:00
Arnaldo Carvalho de Melo
801c67b05f
tools lib fs: Pass filename to debugfs__strerror_open
...
It was hardcoded for one specific tracepoint, leftover from its initial
user: 'perf trace'.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-22 11:16:31 -03:00
Arnaldo Carvalho de Melo
e2726d9964
tools lib fs: Adopt debugfs open strerrno method
...
As this is not specific to an evlist and may be used with other tools.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
tools/perf/util/include/asm/hash.h
2015-01-22 10:34:22 -03:00
Alexey Brodkin
db1806edcf
perf tools: Fix statfs.f_type data type mismatch build error with uclibc
...
ARC Linux uses the no legacy syscalls abi and corresponding uClibc headers
statfs defines f_type to be U32 which causes perf build breakage
http://git.uclibc.org/uClibc/tree/libc/sysdeps/linux/common-generic/bits/statfs.h
----------->8---------------
CC fs/fs.o
fs/fs.c: In function 'fs__valid_mount':
fs/fs.c:82:24: error: comparison between signed and unsigned integer
expressions [-Werror=sign-compare]
else if (st_fs.f_type != magic)
^
cc1: all warnings being treated as errors
----------->8---------------
Signed-off-by: Alexey Brodkin <[email protected] >
Acked-by: Jiri Olsa <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Cody P Schafer <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Vineet Gupta <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-16 17:49:29 -03:00
Arnaldo Carvalho de Melo
42e3c4a127
tools lib fs: Add sysctl__read_int helper
...
Will come in handy for tools, see next patches.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-11 17:53:00 -03:00
Arnaldo Carvalho de Melo
3a351127cb
tools lib fs: Adopt filename__read_int from tools/perf/
...
Will be useful for new helpers to read sysctl values.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-11 13:17:46 -03:00
Cody P Schafer
f2d9627b2b
perf tools: Allow overriding sysfs and proc finding with env var
...
SYSFS_PATH and PROC_PATH environment variables now let the user override
the detection of sysfs and proc locations for testing purposes.
Signed-off-by: Cody P Schafer <[email protected] >
Cc: Sukadev Bhattiprolu <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-06-03 21:34:29 +02:00
Xia Kaixu
603940b6b8
perf tools: Remove extra '/' character in events file path
...
The array debugfs_known_mountpoints[] will cause extra '/'
character output.
Remove it.
pre:
$ perf probe -l
/sys/kernel/debug//tracing/uprobe_events file does not exist -
please rebuild kernel with CONFIG_UPROBE_EVENTS.
post:
$ perf probe -l
/sys/kernel/debug/tracing/uprobe_events file does not exist -
please rebuild kernel with CONFIG_UPROBE_EVENTS.
Signed-off-by: Xia Kaixu <[email protected] >
Acked-by: Namhyung Kim <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-04-30 17:02:24 +02:00
Borislav Petkov
cd0cfad74e
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 <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: Arjan van de Ven <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Pekka Enberg <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Cc: Stanislav Fomichev <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-02-18 09:34:49 -03:00
Borislav Petkov
553873e1df
tools/: Convert to new topic libraries
...
Move debugfs.* to api/fs/. We have a common tools/lib/api/ place where
the Makefile lives and then we place the headers in subdirs.
For example, all the fs-related stuff goes to tools/lib/api/fs/ from
which we get libapikfs.a (acme got almost the naming he wanted :-)) and
we link it into the tools which need it - in this case perf and
tools/vm/page-types.
acme:
"Looking at the implementation, I think some tools can even link
directly to the .o files, avoiding the .a file altogether.
But that is just an optimization/finer granularity tools/lib/
cherrypicking that toolers can make use of."
Fixup documentation cleaning target while at it.
Signed-off-by: Borislav Petkov <[email protected] >
Acked-by: Ingo Molnar <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: Arjan van de Ven <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Pekka Enberg <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Cc: Stanislav Fomichev <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-12-16 16:03:27 -03:00