Skip to contentSkip to conversation

debugfs - Fix mount directory of debugfs by default in events.txt

PATCH In review GeunSik Lim 4 participants 7 messages Sep 7, 2009 – Sep 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 debugfs - Fix mount directory of debugfs by default in events.txt

Quoted 3 lines

From 99e8ab48d783e619329c31e8f91e4384729a2e8b Mon Sep 17 00:00:00 2001

From: GeunSik,Lim <[email protected]>
Date: Mon, 7 Sep 2009 20:34:19 +0900
Subject: [PATCH 1/5] Fix mount directory of debugfs by default in events.txt

We need common default directory of denbugfs for consistency. (debugfs's default directory is /sys/kernel/debug/ by debugfs.)

---
 Documentation/trace/events.txt |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
Documentation/trace/events.txt +12 -12
index f157d75..3b72823 100644
@@ -22,12 +22,12 @@ tracing information should be printed.
 ---------------------------------
 
 The events which are available for tracing can be found in the file
-/debug/tracing/available_events.
+/sys/kernel/debug/tracing/available_events.
 
 To enable a particular event, such as 'sched_wakeup', simply echo it
-to /debug/tracing/set_event. For example:
+to /sys/kernel/debug/tracing/set_event. For example:
 
-	# echo sched_wakeup >> /debug/tracing/set_event
+	# echo sched_wakeup >> /sys/kernel/debug/tracing/set_event
 
 [ Note: '>>' is necessary, otherwise it will firstly disable
   all the events. ]
@@ -35,15 +35,15 @@ to /debug/tracing/set_event. For example:
 To disable an event, echo the event name to the set_event file prefixed
 with an exclamation point:
 
-	# echo '!sched_wakeup' >> /debug/tracing/set_event
+	# echo '!sched_wakeup' >> /sys/kernel/debug/tracing/set_event
 
 To disable all events, echo an empty line to the set_event file:
 
-	# echo > /debug/tracing/set_event
+	# echo > /sys/kernel/debug/tracing/set_event
 
 To enable all events, echo '*:*' or '*:' to the set_event file:
 
-	# echo *:* > /debug/tracing/set_event
+	# echo *:* > /sys/kernel/debug/tracing/set_event
 
 The events are organized into subsystems, such as ext4, irq, sched,
 etc., and a full event name looks like this: <subsystem>:<event>.  The
@@ -52,29 +52,29 @@ file.  All of the events in a subsystem can be specified via the syntax
 "<subsystem>:*"; for example, to enable all irq events, you can use the
 command:
 
-	# echo 'irq:*' > /debug/tracing/set_event
+	# echo 'irq:*' > /sys/kernel/debug/tracing/set_event
 
 2.2 Via the 'enable' toggle
 ---------------------------
 
-The events available are also listed in /debug/tracing/events/ hierarchy
+The events available are also listed in /sys/kernel/debug/tracing/events/ hierarchy
 of directories.
 
 To enable event 'sched_wakeup':
 
-	# echo 1 > /debug/tracing/events/sched/sched_wakeup/enable
+	# echo 1 > /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
 
 To disable it:
 
-	# echo 0 > /debug/tracing/events/sched/sched_wakeup/enable
+	# echo 0 > /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
 
 To enable all events in sched subsystem:
 
-	# echo 1 > /debug/tracing/events/sched/enable
+	# echo 1 > /sys/kernel/debug/tracing/events/sched/enable
 
 To eanble all events:
 
-	# echo 1 > /debug/tracing/events/enable
+	# echo 1 > /sys/kernel/debug/tracing/events/enable
 
 When reading one of these enable files, there are four results:
 
Signature · 14 lines
1.6.3.1


-----------------------------------------------
To unsubscribe from this list: send the line "unsubscribe linux-***" 
in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

GeunSik Lim ( Samsung Electronics )
e-Mail  :1) [email protected]
         2) [email protected] , [email protected]
HomePage: http://blog.naver.com/invain/
-----------------------------------------------
#1 lore raw
Quoted 8 lines · GeunSik Lim
Quoted 2 lines

From 99e8ab48d783e619329c31e8f91e4384729a2e8b Mon Sep 17 00:00:00 2001

From: GeunSik,Lim <[email protected]>
Date: Mon, 7 Sep 2009 20:34:19 +0900
Subject: [PATCH 1/5] Fix mount directory of debugfs by default in events.txt

We need common default directory of denbugfs for consistency. (debugfs's default directory is /sys/kernel/debug/ by debugfs.)

I'd rather we fix that brain-dead default.

#2 lore raw
Quoted 11 lines · Peter Zijlstra
Quoted 8 lines · GeunSik Lim
Quoted 2 lines

From 99e8ab48d783e619329c31e8f91e4384729a2e8b Mon Sep 17 00:00:00 2001

From: GeunSik,Lim <[email protected]>
Date: Mon, 7 Sep 2009 20:34:19 +0900
Subject: [PATCH 1/5] Fix mount directory of debugfs by default in events.txt

We need common default directory of denbugfs for consistency. (debugfs's default directory is /sys/kernel/debug/ by debugfs.)

I'd rather we fix that brain-dead default.

Um, why is that "brain-dead"? It was discussed many times when debugfs first came out and this was what was decided on.

So what is the problem?

thanks,

greg k-h

#3 lore raw
Quoted 11 lines · Greg KH
Quoted 10 lines · Peter Zijlstra
Quoted 8 lines · GeunSik Lim
Quoted 2 lines

From 99e8ab48d783e619329c31e8f91e4384729a2e8b Mon Sep 17 00:00:00 2001

From: GeunSik,Lim <[email protected]>
Date: Mon, 7 Sep 2009 20:34:19 +0900
Subject: [PATCH 1/5] Fix mount directory of debugfs by default in events.txt

We need common default directory of denbugfs for consistency. (debugfs's default directory is /sys/kernel/debug/ by debugfs.)

Quoted 8 lines
Quoted 1 line

I'd rather we fix that brain-dead default.

Um, why is that "brain-dead"? It was discussed many times when debugfs first came out and this was what was decided on.

From what people tell me it wasn't a clear consensus.

So what is the problem?

Its not related to sysfs in any way I can discover, its not consistent with most of the other virtual fs', and its way too much typing.

we don't mount /dev, /proc, /sys in weird places either, so why should we mount /debug in a cumbersome location.

#4 lore raw
Quoted 12 lines · Peter Zijlstra
Quoted 11 lines · Greg KH
Quoted 10 lines · Peter Zijlstra
Quoted 8 lines · GeunSik Lim
Quoted 2 lines

From 99e8ab48d783e619329c31e8f91e4384729a2e8b Mon Sep 17 00:00:00 2001

From: GeunSik,Lim <[email protected]>
Date: Mon, 7 Sep 2009 20:34:19 +0900
Subject: [PATCH 1/5] Fix mount directory of debugfs by default in events.txt

We need common default directory of denbugfs for consistency. (debugfs's default directory is /sys/kernel/debug/ by debugfs.)

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I'd rather we fix that brain-dead default.

Um, why is that "brain-dead"? It was discussed many times when debugfs first came out and this was what was decided on.

From what people tell me it wasn't a clear consensus.

Specifics please.

Quoted 3 lines
Quoted 1 line

So what is the problem?

Its not related to sysfs in any way I can discover,

So, other filesystems are mounted in sysfs, and in /proc for many years.

Quoted 1 line

its not consistent with most of the other virtual fs',

What do you mean by this?

Quoted 1 line

and its way too much typing.

tab completion is your friend, as is environment variables. Don't choose stuff just because you are lazy :)

Quoted 2 lines

we don't mount /dev, /proc, /sys in weird places either, so why should we mount /debug in a cumbersome location.

Because it is a _kernel_ debug thing, not a system-level debug thing. What would userspace developers think about /debug ? Why would they care about such a thing?

As much as we tend to ignore it, kernel developers are not the primary, or only, users of Linux :)

thanks,

greg k-h

#5 lore raw
Quoted 4 lines · Greg KH
Quoted 2 lines

From what people tell me it wasn't a clear consensus.

Specifics please.

Well I still avoid it. I've been broken into telling people publicly to mount it in /sys/kernel/debug, but I've never done it myself.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

So what is the problem?

Its not related to sysfs in any way I can discover,

So, other filesystems are mounted in sysfs, and in /proc for many years.

Quoted 8 lines
Quoted 1 line

its not consistent with most of the other virtual fs',

What do you mean by this?

Quoted 1 line

and its way too much typing.

tab completion is your friend, as is environment variables. Don't choose stuff just because you are lazy :)

/sy <tab> k <tab> d <tab>

or

/deb <tab>

I like the second one much better.

Quoted 10 lines
Quoted 3 lines

we don't mount /dev, /proc, /sys in weird places either, so why should we mount /debug in a cumbersome location.

Because it is a _kernel_ debug thing, not a system-level debug thing. What would userspace developers think about /debug ? Why would they care about such a thing?

As much as we tend to ignore it, kernel developers are not the primary, or only, users of Linux :)

Actually this is a very good point. I think that the tracing system has matured beyond a "debug" level and is being enabled on production systems. Both fedora and debian are now shipping kernels with it enabled. Perhaps we should create another pseudo fs that can be like debugfs but for stable ABIs. A new interface could start out in debugfs, but when it has reached a stable interface, then it could be moved to another location to signal this.

/proc has been criticized for the pollution of non process related information. This happened because there was no place else to place it. Then came /sys which was suppose to take over this, but IMHO, it is too over-engineered and too complex to use (I still stumble over kobjects). I found that debugfs was a nice and simple interface to use. What about creating a new fs that works like debugfs but is for stable interfaces and can be mounted at root?

/kernel?

-- Steve

#6 lore raw
Quoted 7 lines · Steven Rostedt
Quoted 2 lines

tab completion is your friend, as is environment variables.  Don't choose stuff just because you are lazy :)

/sy <tab> k <tab> d <tab>
  or
/deb <tab>
I like the second one much better.

Well. Kernel developers(including system programmers that use sysfs) already use /sys/*** information using sysfs very well.
I means that We can utilize /sys/kernel/debug mount point sufficiently without easy method like /debug. I think that promise and process for consistency
is important. although /sys/kernel/debug/ is complicate than /debug.

An, I think good grammer that We have to append a soft link like belows. If we need short directory easy to use in real.

e.g)
For quicker access to that directory you may want to make a soft link to it:
ln -s /sys/kernel/debug /debug

Quoted 1 line

-- Steve

Thanks,
GeunSik Lim.

Signature · 10 lines
Regards,
GeunSik Lim ( Samsung Electronics )
Blog : http://blog.naver.com/invain/
e-Mail: [email protected]
           [email protected] , [email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/