>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.)
Signed-Off-By:GeunSik Lim <[email protected]>
---
Documentation/trace/events.txt | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt
index f157d75..3b72823 100644
--- a/Documentation/trace/events.txt
+++ b/Documentation/trace/events.txt
@@ -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:
--
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/
-----------------------------------------------
On Mon, 2009-09-07 at 21:37 +0900, GeunSik Lim wrote:
>
> >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.
On Mon, Sep 07, 2009 at 02:48:57PM +0200, Peter Zijlstra wrote:
> On Mon, 2009-09-07 at 21:37 +0900, GeunSik Lim wrote:
> >
> > >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
On Mon, 2009-09-07 at 11:55 -0700, Greg KH wrote:
> On Mon, Sep 07, 2009 at 02:48:57PM +0200, Peter Zijlstra wrote:
> > On Mon, 2009-09-07 at 21:37 +0900, GeunSik Lim wrote:
> > >
> > > >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.
>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.
On Mon, Sep 07, 2009 at 09:15:14PM +0200, Peter Zijlstra wrote:
> On Mon, 2009-09-07 at 11:55 -0700, Greg KH wrote:
> > On Mon, Sep 07, 2009 at 02:48:57PM +0200, Peter Zijlstra wrote:
> > > On Mon, 2009-09-07 at 21:37 +0900, GeunSik Lim wrote:
> > > >
> > > > >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.
>
> From what people tell me it wasn't a clear consensus.
Specifics please.
> > 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.
> its not consistent with most of the other virtual fs',
What do you mean by this?
> and its way too much typing.
tab completion is your friend, as is environment variables. Don't
choose stuff just because you are lazy :)
> 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
On Mon, 2009-09-07 at 14:30 -0700, Greg KH wrote:
> >
> > 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.
>
> > > 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.
>
> > its not consistent with most of the other virtual fs',
>
> What do you mean by this?
>
> > 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.
>
> > 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
On Tue, Sep 8, 2009 at 7:27 AM, Steven Rostedt<[email protected]> wrote:
>> 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
> -- Steve
Thanks,
GeunSik Lim.
--
Regards,
GeunSik Lim ( Samsung Electronics )
Blog : http://blog.naver.com/invain/
e-Mail: [email protected]
[email protected] , [email protected]