Skip to content

Commit 156f5a7

Browse files
GeunSik Limgregkh
authored andcommitted
debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem.
Many developers use "/debug/" or "/debugfs/" or "/sys/kernel/debug/" directory name to mount debugfs filesystem for ftrace according to ./Documentation/tracers/ftrace.txt file. And, three directory names(ex:/debug/, /debugfs/, /sys/kernel/debug/) is existed in kernel source like ftrace, DRM, Wireless, Documentation, Network[sky2]files to mount debugfs filesystem. debugfs means debug filesystem for debugging easy to use by greg kroah hartman. "/sys/kernel/debug/" name is suitable as directory name of debugfs filesystem. - debugfs related reference: http://lwn.net/Articles/334546/ Fix inconsistency of directory name to mount debugfs filesystem. * From Steven Rostedt - find_debugfs() and tracing_files() in this patch. Signed-off-by: GeunSik Lim <geunsik.lim@samsung.com> Acked-by : Inaky Perez-Gonzalez <inaky@linux.intel.com> Reviewed-by : Steven Rostedt <rostedt@goodmis.org> Reviewed-by : James Smart <james.smart@emulex.com> CC: Jiri Kosina <trivial@kernel.org> CC: David Airlie <airlied@linux.ie> CC: Peter Osterlund <petero2@telia.com> CC: Ananth N Mavinakayanahalli <ananth@in.ibm.com> CC: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> CC: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 1b713e0 commit 156f5a7

20 files changed

Lines changed: 238 additions & 191 deletions

File tree

Documentation/DocBook/debugobjects.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
number of errors are printk'ed including a full stack trace.
107107
</para>
108108
<para>
109-
The statistics are available via debugfs/debug_objects/stats.
109+
The statistics are available via /sys/kernel/debug/debug_objects/stats.
110110
They provide information about the number of warnings and the
111111
number of successful fixups along with information about the
112112
usage of the internal tracking objects and the state of the

Documentation/cdrom/packet-writing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Using the pktcdvd debugfs interface
117117

118118
To read pktcdvd device infos in human readable form, do:
119119

120-
# cat /debug/pktcdvd/pktcdvd[0-7]/info
120+
# cat /sys/kernel/debug/pktcdvd/pktcdvd[0-7]/info
121121

122122
For a description of the debugfs interface look into the file:
123123

Documentation/fault-injection/fault-injection.txt

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,53 +29,53 @@ o debugfs entries
2929
fault-inject-debugfs kernel module provides some debugfs entries for runtime
3030
configuration of fault-injection capabilities.
3131

32-
- /debug/fail*/probability:
32+
- /sys/kernel/debug/fail*/probability:
3333

3434
likelihood of failure injection, in percent.
3535
Format: <percent>
3636

3737
Note that one-failure-per-hundred is a very high error rate
3838
for some testcases. Consider setting probability=100 and configure
39-
/debug/fail*/interval for such testcases.
39+
/sys/kernel/debug/fail*/interval for such testcases.
4040

41-
- /debug/fail*/interval:
41+
- /sys/kernel/debug/fail*/interval:
4242

4343
specifies the interval between failures, for calls to
4444
should_fail() that pass all the other tests.
4545

4646
Note that if you enable this, by setting interval>1, you will
4747
probably want to set probability=100.
4848

49-
- /debug/fail*/times:
49+
- /sys/kernel/debug/fail*/times:
5050

5151
specifies how many times failures may happen at most.
5252
A value of -1 means "no limit".
5353

54-
- /debug/fail*/space:
54+
- /sys/kernel/debug/fail*/space:
5555

5656
specifies an initial resource "budget", decremented by "size"
5757
on each call to should_fail(,size). Failure injection is
5858
suppressed until "space" reaches zero.
5959

60-
- /debug/fail*/verbose
60+
- /sys/kernel/debug/fail*/verbose
6161

6262
Format: { 0 | 1 | 2 }
6363
specifies the verbosity of the messages when failure is
6464
injected. '0' means no messages; '1' will print only a single
6565
log line per failure; '2' will print a call trace too -- useful
6666
to debug the problems revealed by fault injection.
6767

68-
- /debug/fail*/task-filter:
68+
- /sys/kernel/debug/fail*/task-filter:
6969

7070
Format: { 'Y' | 'N' }
7171
A value of 'N' disables filtering by process (default).
7272
Any positive value limits failures to only processes indicated by
7373
/proc/<pid>/make-it-fail==1.
7474

75-
- /debug/fail*/require-start:
76-
- /debug/fail*/require-end:
77-
- /debug/fail*/reject-start:
78-
- /debug/fail*/reject-end:
75+
- /sys/kernel/debug/fail*/require-start:
76+
- /sys/kernel/debug/fail*/require-end:
77+
- /sys/kernel/debug/fail*/reject-start:
78+
- /sys/kernel/debug/fail*/reject-end:
7979

8080
specifies the range of virtual addresses tested during
8181
stacktrace walking. Failure is injected only if some caller
@@ -84,26 +84,26 @@ configuration of fault-injection capabilities.
8484
Default required range is [0,ULONG_MAX) (whole of virtual address space).
8585
Default rejected range is [0,0).
8686

87-
- /debug/fail*/stacktrace-depth:
87+
- /sys/kernel/debug/fail*/stacktrace-depth:
8888

8989
specifies the maximum stacktrace depth walked during search
9090
for a caller within [require-start,require-end) OR
9191
[reject-start,reject-end).
9292

93-
- /debug/fail_page_alloc/ignore-gfp-highmem:
93+
- /sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem:
9494

9595
Format: { 'Y' | 'N' }
9696
default is 'N', setting it to 'Y' won't inject failures into
9797
highmem/user allocations.
9898

99-
- /debug/failslab/ignore-gfp-wait:
100-
- /debug/fail_page_alloc/ignore-gfp-wait:
99+
- /sys/kernel/debug/failslab/ignore-gfp-wait:
100+
- /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:
101101

102102
Format: { 'Y' | 'N' }
103103
default is 'N', setting it to 'Y' will inject failures
104104
only into non-sleep allocations (GFP_ATOMIC allocations).
105105

106-
- /debug/fail_page_alloc/min-order:
106+
- /sys/kernel/debug/fail_page_alloc/min-order:
107107

108108
specifies the minimum page allocation order to be injected
109109
failures.
@@ -166,13 +166,13 @@ o Inject slab allocation failures into module init/exit code
166166
#!/bin/bash
167167

168168
FAILTYPE=failslab
169-
echo Y > /debug/$FAILTYPE/task-filter
170-
echo 10 > /debug/$FAILTYPE/probability
171-
echo 100 > /debug/$FAILTYPE/interval
172-
echo -1 > /debug/$FAILTYPE/times
173-
echo 0 > /debug/$FAILTYPE/space
174-
echo 2 > /debug/$FAILTYPE/verbose
175-
echo 1 > /debug/$FAILTYPE/ignore-gfp-wait
169+
echo Y > /sys/kernel/debug/$FAILTYPE/task-filter
170+
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
171+
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
172+
echo -1 > /sys/kernel/debug/$FAILTYPE/times
173+
echo 0 > /sys/kernel/debug/$FAILTYPE/space
174+
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
175+
echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
176176

177177
faulty_system()
178178
{
@@ -217,20 +217,20 @@ then
217217
exit 1
218218
fi
219219

220-
cat /sys/module/$module/sections/.text > /debug/$FAILTYPE/require-start
221-
cat /sys/module/$module/sections/.data > /debug/$FAILTYPE/require-end
220+
cat /sys/module/$module/sections/.text > /sys/kernel/debug/$FAILTYPE/require-start
221+
cat /sys/module/$module/sections/.data > /sys/kernel/debug/$FAILTYPE/require-end
222222

223-
echo N > /debug/$FAILTYPE/task-filter
224-
echo 10 > /debug/$FAILTYPE/probability
225-
echo 100 > /debug/$FAILTYPE/interval
226-
echo -1 > /debug/$FAILTYPE/times
227-
echo 0 > /debug/$FAILTYPE/space
228-
echo 2 > /debug/$FAILTYPE/verbose
229-
echo 1 > /debug/$FAILTYPE/ignore-gfp-wait
230-
echo 1 > /debug/$FAILTYPE/ignore-gfp-highmem
231-
echo 10 > /debug/$FAILTYPE/stacktrace-depth
223+
echo N > /sys/kernel/debug/$FAILTYPE/task-filter
224+
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
225+
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
226+
echo -1 > /sys/kernel/debug/$FAILTYPE/times
227+
echo 0 > /sys/kernel/debug/$FAILTYPE/space
228+
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
229+
echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
230+
echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem
231+
echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth
232232

233-
trap "echo 0 > /debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT
233+
trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT
234234

235235
echo "Injecting errors into the module $module... (interrupt to stop)"
236236
sleep 1000000

Documentation/kprobes.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,9 @@ http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf (pages 101-115)
507507
Appendix A: The kprobes debugfs interface
508508

509509
With recent kernels (> 2.6.20) the list of registered kprobes is visible
510-
under the /debug/kprobes/ directory (assuming debugfs is mounted at /debug).
510+
under the /sys/kernel/debug/kprobes/ directory (assuming debugfs is mounted at //sys/kernel/debug).
511511

512-
/debug/kprobes/list: Lists all registered probes on the system
512+
/sys/kernel/debug/kprobes/list: Lists all registered probes on the system
513513

514514
c015d71a k vfs_read+0x0
515515
c011a316 j do_fork+0x0
@@ -525,7 +525,7 @@ virtual addresses that correspond to modules that've been unloaded),
525525
such probes are marked with [GONE]. If the probe is temporarily disabled,
526526
such probes are marked with [DISABLED].
527527

528-
/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
528+
/sys/kernel/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
529529

530530
Provides a knob to globally and forcibly turn registered kprobes ON or OFF.
531531
By default, all kprobes are enabled. By echoing "0" to this file, all

0 commit comments

Comments
 (0)