Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-25 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
> Mathieu Desnoyers wrote:
> >* Randy Dunlap ([EMAIL PROTECTED]) wrote:
> >>On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:
> >>
> >>>* Randy Dunlap ([EMAIL PROTECTED]) wrote:
> On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
> 
> >Christoph Hellwig wrote:
> >>On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> >>>I think that samples are perfectly fine for documentation and
> >>>that the trace example is a good example.  I think that most people
> >>>who need something like that would need to customize it for their
> >>>specific needs anyway.
> >>>
> >>>We don't seem to be making progress...
> >>Time to bring in a Tie-Breaker :)
> >Yes.  Is anyone else interested?   :(
> 
> I guess that's everyone (except those who are sleeping).
> 
> Let's not hold up progress.  Just use samples/ for code.
> >>>Would you already have the 
> >>>
> >>>Makefile
> >>>samples/Kconfig
> >>>samples/Makefile
> >>>
> >>>core code handy per chance ? (and probably Kconfig sourcing in every
> >>>arch ?)
> >>Yes.  Here it is.  I'm working on add kprobes to it, but you
> >>can go ahead with markers also.
> >>
> >>
> >
> >Hi Randy,
> >
> >I got everything working and I'm thinking about posting all this stuff
> >soon. Do you think your patch (having renamed Kbuild to Makefile) is
> >ready to post ?
> 
> Yes, AFAIK it is.  Do you want me to resend it or do you want to
> make it patch M/N in your patches?
> 

I'll include it with my patches. Thanks!

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-25 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 09:31:08PM -0400, Steven Rostedt wrote:
>  looking at Documentation/lguest/
> 
>  Oh wait, nothing to see here. Move along please.

lguest is an even bigger nightmare.  It's userspace code, but we can't
move it because it pokes into non-exported headers.

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-25 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 09:31:08PM -0400, Steven Rostedt wrote:
  looking at Documentation/lguest/
 
  Oh wait, nothing to see here. Move along please.

lguest is an even bigger nightmare.  It's userspace code, but we can't
move it because it pokes into non-exported headers.

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-25 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
 Mathieu Desnoyers wrote:
 * Randy Dunlap ([EMAIL PROTECTED]) wrote:
 On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:
 
 * Randy Dunlap ([EMAIL PROTECTED]) wrote:
 On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
 
 Christoph Hellwig wrote:
 On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
 I think that samples are perfectly fine for documentation and
 that the trace example is a good example.  I think that most people
 who need something like that would need to customize it for their
 specific needs anyway.
 
 We don't seem to be making progress...
 Time to bring in a Tie-Breaker :)
 Yes.  Is anyone else interested?   :(
 
 I guess that's everyone (except those who are sleeping).
 
 Let's not hold up progress.  Just use samples/ for code.
 Would you already have the 
 
 Makefile
 samples/Kconfig
 samples/Makefile
 
 core code handy per chance ? (and probably Kconfig sourcing in every
 arch ?)
 Yes.  Here it is.  I'm working on add kprobes to it, but you
 can go ahead with markers also.
 
 
 
 Hi Randy,
 
 I got everything working and I'm thinking about posting all this stuff
 soon. Do you think your patch (having renamed Kbuild to Makefile) is
 ready to post ?
 
 Yes, AFAIK it is.  Do you want me to resend it or do you want to
 make it patch M/N in your patches?
 

I'll include it with my patches. Thanks!

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Mathieu Desnoyers wrote:

* Randy Dunlap ([EMAIL PROTECTED]) wrote:

On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:


* Randy Dunlap ([EMAIL PROTECTED]) wrote:

On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:


Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:

I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...

Time to bring in a Tie-Breaker :)

Yes.  Is anyone else interested?   :(


I guess that's everyone (except those who are sleeping).

Let's not hold up progress.  Just use samples/ for code.
Would you already have the 


Makefile
samples/Kconfig
samples/Makefile

core code handy per chance ? (and probably Kconfig sourcing in every
arch ?)

Yes.  Here it is.  I'm working on add kprobes to it, but you
can go ahead with markers also.




Hi Randy,

I got everything working and I'm thinking about posting all this stuff
soon. Do you think your patch (having renamed Kbuild to Makefile) is
ready to post ?


Yes, AFAIK it is.  Do you want me to resend it or do you want to
make it patch M/N in your patches?

--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
> On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:
> 
> > * Randy Dunlap ([EMAIL PROTECTED]) wrote:
> > > On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
> > > 
> > > > Christoph Hellwig wrote:
> > > > > On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> > > > >> I think that samples are perfectly fine for documentation and
> > > > >> that the trace example is a good example.  I think that most people
> > > > >> who need something like that would need to customize it for their
> > > > >> specific needs anyway.
> > > > >>
> > > > >> We don't seem to be making progress...
> > > > > 
> > > > > Time to bring in a Tie-Breaker :)
> > > > 
> > > > Yes.  Is anyone else interested?   :(
> > > 
> > > 
> > > I guess that's everyone (except those who are sleeping).
> > > 
> > > Let's not hold up progress.  Just use samples/ for code.
> > 
> > Would you already have the 
> > 
> > Makefile
> > samples/Kconfig
> > samples/Makefile
> > 
> > core code handy per chance ? (and probably Kconfig sourcing in every
> > arch ?)
> 
> Yes.  Here it is.  I'm working on add kprobes to it, but you
> can go ahead with markers also.
> 
> 

Hi Randy,

I got everything working and I'm thinking about posting all this stuff
soon. Do you think your patch (having renamed Kbuild to Makefile) is
ready to post ?

Mathieu

> 
> From: Randy Dunlap <[EMAIL PROTECTED]>
> 
> Begin infrastructure for kernel code samples in the samples/ directory.
> Add its Kconfig and Kbuild files.
> Source its Kconfig file in all arch/ Kconfigs.
> 
> 
> Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
> ---
>  Makefile   |   10 +++---
>  arch/alpha/Kconfig |2 ++
>  arch/arm/Kconfig   |2 ++
>  arch/avr32/Kconfig |2 ++
>  arch/blackfin/Kconfig  |2 ++
>  arch/cris/Kconfig  |2 ++
>  arch/frv/Kconfig   |2 ++
>  arch/h8300/Kconfig |2 ++
>  arch/i386/Kconfig  |2 ++
>  arch/ia64/Kconfig  |2 ++
>  arch/m32r/Kconfig  |2 ++
>  arch/m68k/Kconfig  |2 ++
>  arch/m68knommu/Kconfig |2 ++
>  arch/mips/Kconfig  |2 ++
>  arch/parisc/Kconfig|2 ++
>  arch/powerpc/Kconfig   |2 ++
>  arch/ppc/Kconfig   |2 ++
>  arch/s390/Kconfig  |2 ++
>  arch/sh/Kconfig|2 ++
>  arch/sh64/Kconfig  |2 ++
>  arch/sparc/Kconfig |2 ++
>  arch/sparc64/Kconfig   |2 ++
>  arch/um/Kconfig|2 ++
>  arch/v850/Kconfig  |2 ++
>  arch/x86_64/Kconfig|2 ++
>  arch/xtensa/Kconfig|3 ++-
>  samples/Kbuild |2 ++
>  samples/Kconfig|   11 +++
>  28 files changed, 70 insertions(+), 4 deletions(-)
> 
> --- linux-2.6.23-rc7.orig/Makefile
> +++ linux-2.6.23-rc7/Makefile
> @@ -436,6 +436,7 @@ drivers-y := drivers/ sound/
>  net-y:= net/
>  libs-y   := lib/
>  core-y   := usr/
> +samples-y:= samples/
>  endif # KBUILD_EXTMOD
>  
>  ifeq ($(dot-config),1)
> @@ -564,10 +565,12 @@ core-y  += kernel/ mm/ fs/ ipc/ security
>  
>  vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
>$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
> -  $(net-y) $(net-m) $(libs-y) $(libs-m)))
> +  $(net-y) $(net-m) $(libs-y) $(libs-m)) \
> +  $(samples-y) $(samples-m))
> +
>  
>  vmlinux-alldirs  := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
> -  $(init-n) $(init-) \
> +  $(init-n) $(init-) $(samples-n) $(samples-) \
>$(core-n) $(core-) $(drivers-n) $(drivers-) \
>$(net-n)  $(net-)  $(libs-n)$(libs-
>  
> @@ -578,6 +581,7 @@ net-y := $(patsubst %/, %/built-in.o, $
>  libs-y1  := $(patsubst %/, %/lib.a, $(libs-y))
>  libs-y2  := $(patsubst %/, %/built-in.o, $(libs-y))
>  libs-y   := $(libs-y1) $(libs-y2)
> +samples-y:= $(patsubst %/, %/built-in.o, $(samples-y))
>  
>  # Build vmlinux
>  # ---
> @@ -607,7 +611,7 @@ libs-y:= $(libs-y1) $(libs-y2)
>  # System.map is generated to document addresses of all kernel symbols
>  
>  vmlinux-init := $(head-y) $(init-y)
> -vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
> +vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(samples-y)
>  vmlinux-all  := $(vmlinux-init) $(vmlinux-main)
>  vmlinux-lds  := arch/$(ARCH)/kernel/vmlinux.lds
>  export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
> --- /dev/null
> +++ linux-2.6.23-rc7/samples/Kbuild
> @@ -0,0 +1,2 @@
> +# Makefile for Linux samples code
> +
> --- /dev/null
> +++ linux-2.6.23-rc7/samples/Kconfig
> @@ -0,0 +1,11 @@
> +# samples/Kconfig
> +
> +menuconfig SAMPLES
> + bool "Sample kernel code"
> + help
> +   You can build and test sample kernel code here.
> +
> +if SAMPLES
> +
> 

Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Steven Rostedt
On Mon, Sep 24, 2007 at 06:50:44PM +0100, Christoph Hellwig wrote:
> On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
> > Here is some documentation explaining what is/how to use the Linux
> > Kernel Markers.
> 
> As mentioned in the tracing infrastructure thread I don't think
> putting code into Documentation is a good idea.  Either of you really
> should start a sample/ toplevel directory for this kind of stuff
> including a Kconfig menu etc to be able to build these samples as
> part of an allmodconfig.
>

 looking at Documentation/lguest/

 Oh wait, nothing to see here. Move along please.

 ;-)

 -- Steve



-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:

> * Randy Dunlap ([EMAIL PROTECTED]) wrote:
> > On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
> > 
> > > Christoph Hellwig wrote:
> > > > On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> > > >> I think that samples are perfectly fine for documentation and
> > > >> that the trace example is a good example.  I think that most people
> > > >> who need something like that would need to customize it for their
> > > >> specific needs anyway.
> > > >>
> > > >> We don't seem to be making progress...
> > > > 
> > > > Time to bring in a Tie-Breaker :)
> > > 
> > > Yes.  Is anyone else interested?   :(
> > 
> > 
> > I guess that's everyone (except those who are sleeping).
> > 
> > Let's not hold up progress.  Just use samples/ for code.
> 
> Would you already have the 
> 
> Makefile
> samples/Kconfig
> samples/Makefile
> 
> core code handy per chance ? (and probably Kconfig sourcing in every
> arch ?)

Yes.  Here it is.  I'm working on add kprobes to it, but you
can go ahead with markers also.



From: Randy Dunlap <[EMAIL PROTECTED]>

Begin infrastructure for kernel code samples in the samples/ directory.
Add its Kconfig and Kbuild files.
Source its Kconfig file in all arch/ Kconfigs.


Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 Makefile   |   10 +++---
 arch/alpha/Kconfig |2 ++
 arch/arm/Kconfig   |2 ++
 arch/avr32/Kconfig |2 ++
 arch/blackfin/Kconfig  |2 ++
 arch/cris/Kconfig  |2 ++
 arch/frv/Kconfig   |2 ++
 arch/h8300/Kconfig |2 ++
 arch/i386/Kconfig  |2 ++
 arch/ia64/Kconfig  |2 ++
 arch/m32r/Kconfig  |2 ++
 arch/m68k/Kconfig  |2 ++
 arch/m68knommu/Kconfig |2 ++
 arch/mips/Kconfig  |2 ++
 arch/parisc/Kconfig|2 ++
 arch/powerpc/Kconfig   |2 ++
 arch/ppc/Kconfig   |2 ++
 arch/s390/Kconfig  |2 ++
 arch/sh/Kconfig|2 ++
 arch/sh64/Kconfig  |2 ++
 arch/sparc/Kconfig |2 ++
 arch/sparc64/Kconfig   |2 ++
 arch/um/Kconfig|2 ++
 arch/v850/Kconfig  |2 ++
 arch/x86_64/Kconfig|2 ++
 arch/xtensa/Kconfig|3 ++-
 samples/Kbuild |2 ++
 samples/Kconfig|   11 +++
 28 files changed, 70 insertions(+), 4 deletions(-)

--- linux-2.6.23-rc7.orig/Makefile
+++ linux-2.6.23-rc7/Makefile
@@ -436,6 +436,7 @@ drivers-y   := drivers/ sound/
 net-y  := net/
 libs-y := lib/
 core-y := usr/
+samples-y  := samples/
 endif # KBUILD_EXTMOD
 
 ifeq ($(dot-config),1)
@@ -564,10 +565,12 @@ core-y+= kernel/ mm/ fs/ ipc/ security
 
 vmlinux-dirs   := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-$(net-y) $(net-m) $(libs-y) $(libs-m)))
+$(net-y) $(net-m) $(libs-y) $(libs-m)) \
+$(samples-y) $(samples-m))
+
 
 vmlinux-alldirs:= $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
-$(init-n) $(init-) \
+$(init-n) $(init-) $(samples-n) $(samples-) \
 $(core-n) $(core-) $(drivers-n) $(drivers-) \
 $(net-n)  $(net-)  $(libs-n)$(libs-
 
@@ -578,6 +581,7 @@ net-y   := $(patsubst %/, %/built-in.o, $
 libs-y1:= $(patsubst %/, %/lib.a, $(libs-y))
 libs-y2:= $(patsubst %/, %/built-in.o, $(libs-y))
 libs-y := $(libs-y1) $(libs-y2)
+samples-y  := $(patsubst %/, %/built-in.o, $(samples-y))
 
 # Build vmlinux
 # ---
@@ -607,7 +611,7 @@ libs-y  := $(libs-y1) $(libs-y2)
 # System.map is generated to document addresses of all kernel symbols
 
 vmlinux-init := $(head-y) $(init-y)
-vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
+vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(samples-y)
 vmlinux-all  := $(vmlinux-init) $(vmlinux-main)
 vmlinux-lds  := arch/$(ARCH)/kernel/vmlinux.lds
 export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
--- /dev/null
+++ linux-2.6.23-rc7/samples/Kbuild
@@ -0,0 +1,2 @@
+# Makefile for Linux samples code
+
--- /dev/null
+++ linux-2.6.23-rc7/samples/Kconfig
@@ -0,0 +1,11 @@
+# samples/Kconfig
+
+menuconfig SAMPLES
+   bool "Sample kernel code"
+   help
+ You can build and test sample kernel code here.
+
+if SAMPLES
+
+
+endif # SAMPLES
--- linux-2.6.23-rc7.orig/arch/alpha/Kconfig
+++ linux-2.6.23-rc7/arch/alpha/Kconfig
@@ -669,5 +669,7 @@ source "security/Kconfig"
 
 source "crypto/Kconfig"
 
+source "samples/Kconfig"
+
 source "lib/Kconfig"
 
--- linux-2.6.23-rc7.orig/arch/arm/Kconfig
+++ linux-2.6.23-rc7/arch/arm/Kconfig
@@ -1067,4 +1067,6 @@ source "security/Kconfig"
 
 source "crypto/Kconfig"
 
+source "samples/Kconfig"
+
 source "lib/Kconfig"
--- 

Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
> On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
> 
> > Christoph Hellwig wrote:
> > > On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> > >> I think that samples are perfectly fine for documentation and
> > >> that the trace example is a good example.  I think that most people
> > >> who need something like that would need to customize it for their
> > >> specific needs anyway.
> > >>
> > >> We don't seem to be making progress...
> > > 
> > > Time to bring in a Tie-Breaker :)
> > 
> > Yes.  Is anyone else interested?   :(
> 
> 
> I guess that's everyone (except those who are sleeping).
> 
> Let's not hold up progress.  Just use samples/ for code.

Would you already have the 

Makefile
samples/Kconfig
samples/Makefile

core code handy per chance ? (and probably Kconfig sourcing in every
arch ?)

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:

> Christoph Hellwig wrote:
> > On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> >> I think that samples are perfectly fine for documentation and
> >> that the trace example is a good example.  I think that most people
> >> who need something like that would need to customize it for their
> >> specific needs anyway.
> >>
> >> We don't seem to be making progress...
> > 
> > Time to bring in a Tie-Breaker :)
> 
> Yes.  Is anyone else interested?   :(


I guess that's everyone (except those who are sleeping).

Let's not hold up progress.  Just use samples/ for code.

---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 20:25:04 +0100 Christoph Hellwig wrote:

> On Mon, Sep 24, 2007 at 03:18:11PM -0400, Mathieu Desnoyers wrote:
> > > putting code into Documentation is a good idea.  Either of you really
> > > should start a sample/ toplevel directory for this kind of stuff
> > > including a Kconfig menu etc to be able to build these samples as
> > > part of an allmodconfig.
> > > 
> > 
> > One should have a look at Documentation/kprobes.txt for that kind of
> > example code / documentation mix.
> 
> That one is particularly bad.  It's high on my todo list of things to fix.
> -

I already have it split and building.   Just need to know
where to put it.  :)


---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 03:18:11PM -0400, Mathieu Desnoyers wrote:
> > putting code into Documentation is a good idea.  Either of you really
> > should start a sample/ toplevel directory for this kind of stuff
> > including a Kconfig menu etc to be able to build these samples as
> > part of an allmodconfig.
> > 
> 
> One should have a look at Documentation/kprobes.txt for that kind of
> example code / documentation mix.

That one is particularly bad.  It's high on my todo list of things to fix.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Christoph Hellwig ([EMAIL PROTECTED]) wrote:
> On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
> > Here is some documentation explaining what is/how to use the Linux
> > Kernel Markers.
> 
> As mentioned in the tracing infrastructure thread I don't think
> putting code into Documentation is a good idea.  Either of you really
> should start a sample/ toplevel directory for this kind of stuff
> including a Kconfig menu etc to be able to build these samples as
> part of an allmodconfig.
> 

One should have a look at Documentation/kprobes.txt for that kind of
example code / documentation mix.

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:

I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...


Time to bring in a Tie-Breaker :)


Yes.  Is anyone else interested?   :(


--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
> I think that samples are perfectly fine for documentation and
> that the trace example is a good example.  I think that most people
> who need something like that would need to customize it for their
> specific needs anyway.
> 
> We don't seem to be making progress...

Time to bring in a Tie-Breaker :)

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:23:35AM -0700, Randy Dunlap wrote:

That might be OK for this case, but sometimes it makes sense to have
README etc. about how to use the software.  So you would want this
in the Documentation/ tree?  That makes it harder on users.


If it's so complex that we can't describe it in a few dozens lines
it shouldn't be anywhere but the place it belongs and better have a
real use and not just be a sample.  And in the trace case I must
admit that I'd prefer a real use like some simple syscall-trace
over this hack anyway..


I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...


--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:23:35AM -0700, Randy Dunlap wrote:
> That might be OK for this case, but sometimes it makes sense to have
> README etc. about how to use the software.  So you would want this
> in the Documentation/ tree?  That makes it harder on users.

If it's so complex that we can't describe it in a few dozens lines
it shouldn't be anywhere but the place it belongs and better have a
real use and not just be a sample.  And in the trace case I must
admit that I'd prefer a real use like some simple syscall-trace
over this hack anyway..

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:13:18AM -0700, Randy Dunlap wrote:

 Documentation/trace/src/Makefile |7 +
 Documentation/trace/src/README   |   18 +
 Documentation/trace/src/fork_trace.c |  119 +++
 Documentation/trace/trace.txt|  164 ++
 include/linux/trace.h|   99 ++
 lib/Kconfig  |9 +
 lib/Makefile |2 +
 lib/trace.c  |  563 +++
+++
 8 files changed, 981 insertions(+), 0 deletions(-)


All of the trace/src/ subdirectory?


Yes, but only as a single file.  We don't really want READMES in source
directories.  Instead these 18 lines would do a perfect comment on the
top of the file.


That might be OK for this case, but sometimes it makes sense to have
README etc. about how to use the software.  So you would want this
in the Documentation/ tree?  That makes it harder on users.

--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:13:18AM -0700, Randy Dunlap wrote:
>  Documentation/trace/src/Makefile |7 +
>  Documentation/trace/src/README   |   18 +
>  Documentation/trace/src/fork_trace.c |  119 +++
>  Documentation/trace/trace.txt|  164 ++
>  include/linux/trace.h|   99 ++
>  lib/Kconfig  |9 +
>  lib/Makefile |2 +
>  lib/trace.c  |  563 +++
> +++
>  8 files changed, 981 insertions(+), 0 deletions(-)
> 
> 
> All of the trace/src/ subdirectory?

Yes, but only as a single file.  We don't really want READMES in source
directories.  Instead these 18 lines would do a perfect comment on the
top of the file.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 19:00:41 +0100 Christoph Hellwig wrote:

> On Mon, Sep 24, 2007 at 10:56:32AM -0700, Randy Dunlap wrote:
> > I don't have a problem with a samples/ directory except (as I have
> > already pointed out) it means that people will end up having to look
> > in 2 places for the information that they need, i.e., both in
> > samples/ and in Documentation/.  So I really don't see a big need
> > to split the samples and docs.
> > 
> > What's wrong with building sample code in the Documentation/ directory?
> 
> It's not really documentation, it's code :)  If you want to build
> documentation from the samples use kerneldoc or similar to extrace the
> comments.  Having Documentation/ purely for things not affecting the build
> make things a whole lot clearer, but if you absolutely insist on it
> we can put it under Documentation/ as long as it's fully integrated into
> kbuild and will be built as part of allmodconfig, unlike the current
> two patches showing code there.
> -

Yes, it has to be integrated into the build system, no doubt.

We really need to give Mathieu and David Wilder an answer so that they
can make progress (and I'm willing to help with this).

To do this, here's my test question:
How much of David's "trace code and documentation" patch can be put
into a samples/ directory?

 Documentation/trace/src/Makefile |7 +
 Documentation/trace/src/README   |   18 +
 Documentation/trace/src/fork_trace.c |  119 +++
 Documentation/trace/trace.txt|  164 ++
 include/linux/trace.h|   99 ++
 lib/Kconfig  |9 +
 lib/Makefile |2 +
 lib/trace.c  |  563 +++
+++
 8 files changed, 981 insertions(+), 0 deletions(-)


All of the trace/src/ subdirectory?


---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 10:56:32AM -0700, Randy Dunlap wrote:
> I don't have a problem with a samples/ directory except (as I have
> already pointed out) it means that people will end up having to look
> in 2 places for the information that they need, i.e., both in
> samples/ and in Documentation/.  So I really don't see a big need
> to split the samples and docs.
> 
> What's wrong with building sample code in the Documentation/ directory?

It's not really documentation, it's code :)  If you want to build
documentation from the samples use kerneldoc or similar to extrace the
comments.  Having Documentation/ purely for things not affecting the build
make things a whole lot clearer, but if you absolutely insist on it
we can put it under Documentation/ as long as it's fully integrated into
kbuild and will be built as part of allmodconfig, unlike the current
two patches showing code there.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 18:50:44 +0100 Christoph Hellwig wrote:

> On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
> > Here is some documentation explaining what is/how to use the Linux
> > Kernel Markers.
> 
> As mentioned in the tracing infrastructure thread I don't think
> putting code into Documentation is a good idea.  Either of you really
> should start a sample/ toplevel directory for this kind of stuff
> including a Kconfig menu etc to be able to build these samples as
> part of an allmodconfig.

I don't have a problem with a samples/ directory except (as I have
already pointed out) it means that people will end up having to look
in 2 places for the information that they need, i.e., both in
samples/ and in Documentation/.  So I really don't see a big need
to split the samples and docs.

What's wrong with building sample code in the Documentation/ directory?

---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
> Here is some documentation explaining what is/how to use the Linux
> Kernel Markers.

As mentioned in the tracing infrastructure thread I don't think
putting code into Documentation is a good idea.  Either of you really
should start a sample/ toplevel directory for this kind of stuff
including a Kconfig menu etc to be able to build these samples as
part of an allmodconfig.

-
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/


[patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
Here is some documentation explaining what is/how to use the Linux
Kernel Markers.

Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]>
Acked-by: "Frank Ch. Eigler" <[EMAIL PROTECTED]>
CC: Christoph Hellwig <[EMAIL PROTECTED]>
---

 Documentation/markers/markers.txt  |   81 +++
 Documentation/markers/src/Makefile |7 ++
 Documentation/markers/src/marker-example.c |   55 
 Documentation/markers/src/probe-example.c  |   98 +
 4 files changed, 241 insertions(+)

Index: linux-2.6-lttng/Documentation/markers/markers.txt
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/markers.txt   2007-09-21 
15:07:42.0 -0400
@@ -0,0 +1,81 @@
+Using the Linux Kernel Markers
+
+   Mathieu Desnoyers
+
+
+This document introduces Linux Kernel Markers and their use. It provides
+examples of how to insert markers in the kernel and connect probe functions to
+them and provides some examples of probe functions.
+
+
+* Purpose of markers
+
+A marker placed in code provides a hook to call a function (probe) that you can
+provide at runtime. A marker can be "on" (a probe is connected to it) or "off"
+(no probe is attached). When a marker is "off" it has no effect, except for
+adding a tiny time penalty (checking a condition for a branch) and space
+penalty (adding a few bytes for the function call at the end of the
+instrumented function and adds a data structure in a separate section).  When a
+marker is "on", the function you provide is called each time the marker is
+executed, in the execution context of the caller. When the function provided
+ends its execution, it returns to the caller (continuing from the marker site).
+
+You can put markers at important locations in the code. Markers are
+lightweight hooks that can pass an arbitrary number of parameters,
+described in a printk-like format string, to the attached probe function.
+
+They can be used for tracing and performance accounting.
+
+
+* Usage
+
+In order to use the macro trace_mark, you should include linux/marker.h.
+
+#include 
+
+And,
+
+trace_mark(subsystem_event, "%d %s", someint, somestring);
+Where :
+- subsystem_event is an identifier unique to your event
+- subsystem is the name of your subsystem.
+- event is the name of the event to mark.
+- "%d %s" is the formatted string for the serializer.
+- someint is an integer.
+- somestring is a char pointer.
+
+Connecting a function (probe) to a marker is done by providing a probe 
(function
+to call) for the specific marker through marker_probe_register() and can be
+activated by calling marker_arm(). Marker deactivation can be done by calling
+marker_disarm() as many times as marker_arm() has been called. Removing a probe
+is done through marker_probe_unregister(); it will disarm the probe and make
+sure there is no caller left using the probe when it returns. Probe removal is
+preempt-safe because preemption is disabled around the probe call. See the
+"Probe example" section below for a sample probe module.
+
+The marker mechanism supports inserting multiple instances of the same marker.
+Markers can be put in inline functions, inlined static functions, and
+unrolled loops as well as regular functions.
+
+The naming scheme "subsystem_event" is suggested here as a convention intended
+to limit collisions. Marker names are global to the kernel: they are considered
+as being the same whether they are in the core kernel image or in modules.
+Conflicting format strings for markers with the same name will cause the 
markers
+to be detected to have a different format string not to be armed and will 
output
+a printk warning which identifies the inconsistency:
+
+"Format mismatch for probe probe_name (format), marker (format)"
+
+
+* Probe / marker example
+
+See the example provided in Documentation/markers/src
+
+Run, as root :
+
+make
+insmod marker-example.ko (insmod order is not important)
+insmod probe-example.ko
+cat /proc/marker-example (returns an expected error)
+rmmod marker-example probe-example
+dmesg
Index: linux-2.6-lttng/Documentation/markers/src/Makefile
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/src/Makefile  2007-09-21 
15:06:17.0 -0400
@@ -0,0 +1,7 @@
+obj-m := probe-example.o marker-example.o
+KDIR := /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
+default:
+   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+clean:
+   rm -f *.mod.c *.ko *.o
Index: linux-2.6-lttng/Documentation/markers/src/marker-example.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/src/marker-example.c  2007-09-21 

[patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
Here is some documentation explaining what is/how to use the Linux
Kernel Markers.

Signed-off-by: Mathieu Desnoyers [EMAIL PROTECTED]
Acked-by: Frank Ch. Eigler [EMAIL PROTECTED]
CC: Christoph Hellwig [EMAIL PROTECTED]
---

 Documentation/markers/markers.txt  |   81 +++
 Documentation/markers/src/Makefile |7 ++
 Documentation/markers/src/marker-example.c |   55 
 Documentation/markers/src/probe-example.c  |   98 +
 4 files changed, 241 insertions(+)

Index: linux-2.6-lttng/Documentation/markers/markers.txt
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/markers.txt   2007-09-21 
15:07:42.0 -0400
@@ -0,0 +1,81 @@
+Using the Linux Kernel Markers
+
+   Mathieu Desnoyers
+
+
+This document introduces Linux Kernel Markers and their use. It provides
+examples of how to insert markers in the kernel and connect probe functions to
+them and provides some examples of probe functions.
+
+
+* Purpose of markers
+
+A marker placed in code provides a hook to call a function (probe) that you can
+provide at runtime. A marker can be on (a probe is connected to it) or off
+(no probe is attached). When a marker is off it has no effect, except for
+adding a tiny time penalty (checking a condition for a branch) and space
+penalty (adding a few bytes for the function call at the end of the
+instrumented function and adds a data structure in a separate section).  When a
+marker is on, the function you provide is called each time the marker is
+executed, in the execution context of the caller. When the function provided
+ends its execution, it returns to the caller (continuing from the marker site).
+
+You can put markers at important locations in the code. Markers are
+lightweight hooks that can pass an arbitrary number of parameters,
+described in a printk-like format string, to the attached probe function.
+
+They can be used for tracing and performance accounting.
+
+
+* Usage
+
+In order to use the macro trace_mark, you should include linux/marker.h.
+
+#include linux/marker.h
+
+And,
+
+trace_mark(subsystem_event, %d %s, someint, somestring);
+Where :
+- subsystem_event is an identifier unique to your event
+- subsystem is the name of your subsystem.
+- event is the name of the event to mark.
+- %d %s is the formatted string for the serializer.
+- someint is an integer.
+- somestring is a char pointer.
+
+Connecting a function (probe) to a marker is done by providing a probe 
(function
+to call) for the specific marker through marker_probe_register() and can be
+activated by calling marker_arm(). Marker deactivation can be done by calling
+marker_disarm() as many times as marker_arm() has been called. Removing a probe
+is done through marker_probe_unregister(); it will disarm the probe and make
+sure there is no caller left using the probe when it returns. Probe removal is
+preempt-safe because preemption is disabled around the probe call. See the
+Probe example section below for a sample probe module.
+
+The marker mechanism supports inserting multiple instances of the same marker.
+Markers can be put in inline functions, inlined static functions, and
+unrolled loops as well as regular functions.
+
+The naming scheme subsystem_event is suggested here as a convention intended
+to limit collisions. Marker names are global to the kernel: they are considered
+as being the same whether they are in the core kernel image or in modules.
+Conflicting format strings for markers with the same name will cause the 
markers
+to be detected to have a different format string not to be armed and will 
output
+a printk warning which identifies the inconsistency:
+
+Format mismatch for probe probe_name (format), marker (format)
+
+
+* Probe / marker example
+
+See the example provided in Documentation/markers/src
+
+Run, as root :
+
+make
+insmod marker-example.ko (insmod order is not important)
+insmod probe-example.ko
+cat /proc/marker-example (returns an expected error)
+rmmod marker-example probe-example
+dmesg
Index: linux-2.6-lttng/Documentation/markers/src/Makefile
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/src/Makefile  2007-09-21 
15:06:17.0 -0400
@@ -0,0 +1,7 @@
+obj-m := probe-example.o marker-example.o
+KDIR := /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
+default:
+   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+clean:
+   rm -f *.mod.c *.ko *.o
Index: linux-2.6-lttng/Documentation/markers/src/marker-example.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6-lttng/Documentation/markers/src/marker-example.c  2007-09-21 
15:06:17.0 -0400
@@ 

Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
 Here is some documentation explaining what is/how to use the Linux
 Kernel Markers.

As mentioned in the tracing infrastructure thread I don't think
putting code into Documentation is a good idea.  Either of you really
should start a sample/ toplevel directory for this kind of stuff
including a Kconfig menu etc to be able to build these samples as
part of an allmodconfig.

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 18:50:44 +0100 Christoph Hellwig wrote:

 On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
  Here is some documentation explaining what is/how to use the Linux
  Kernel Markers.
 
 As mentioned in the tracing infrastructure thread I don't think
 putting code into Documentation is a good idea.  Either of you really
 should start a sample/ toplevel directory for this kind of stuff
 including a Kconfig menu etc to be able to build these samples as
 part of an allmodconfig.

I don't have a problem with a samples/ directory except (as I have
already pointed out) it means that people will end up having to look
in 2 places for the information that they need, i.e., both in
samples/ and in Documentation/.  So I really don't see a big need
to split the samples and docs.

What's wrong with building sample code in the Documentation/ directory?

---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 10:56:32AM -0700, Randy Dunlap wrote:
 I don't have a problem with a samples/ directory except (as I have
 already pointed out) it means that people will end up having to look
 in 2 places for the information that they need, i.e., both in
 samples/ and in Documentation/.  So I really don't see a big need
 to split the samples and docs.
 
 What's wrong with building sample code in the Documentation/ directory?

It's not really documentation, it's code :)  If you want to build
documentation from the samples use kerneldoc or similar to extrace the
comments.  Having Documentation/ purely for things not affecting the build
make things a whole lot clearer, but if you absolutely insist on it
we can put it under Documentation/ as long as it's fully integrated into
kbuild and will be built as part of allmodconfig, unlike the current
two patches showing code there.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 19:00:41 +0100 Christoph Hellwig wrote:

 On Mon, Sep 24, 2007 at 10:56:32AM -0700, Randy Dunlap wrote:
  I don't have a problem with a samples/ directory except (as I have
  already pointed out) it means that people will end up having to look
  in 2 places for the information that they need, i.e., both in
  samples/ and in Documentation/.  So I really don't see a big need
  to split the samples and docs.
  
  What's wrong with building sample code in the Documentation/ directory?
 
 It's not really documentation, it's code :)  If you want to build
 documentation from the samples use kerneldoc or similar to extrace the
 comments.  Having Documentation/ purely for things not affecting the build
 make things a whole lot clearer, but if you absolutely insist on it
 we can put it under Documentation/ as long as it's fully integrated into
 kbuild and will be built as part of allmodconfig, unlike the current
 two patches showing code there.
 -

Yes, it has to be integrated into the build system, no doubt.

We really need to give Mathieu and David Wilder an answer so that they
can make progress (and I'm willing to help with this).

To do this, here's my test question:
How much of David's trace code and documentation patch can be put
into a samples/ directory?

 Documentation/trace/src/Makefile |7 +
 Documentation/trace/src/README   |   18 +
 Documentation/trace/src/fork_trace.c |  119 +++
 Documentation/trace/trace.txt|  164 ++
 include/linux/trace.h|   99 ++
 lib/Kconfig  |9 +
 lib/Makefile |2 +
 lib/trace.c  |  563 +++
+++
 8 files changed, 981 insertions(+), 0 deletions(-)


All of the trace/src/ subdirectory?


---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:13:18AM -0700, Randy Dunlap wrote:
  Documentation/trace/src/Makefile |7 +
  Documentation/trace/src/README   |   18 +
  Documentation/trace/src/fork_trace.c |  119 +++
  Documentation/trace/trace.txt|  164 ++
  include/linux/trace.h|   99 ++
  lib/Kconfig  |9 +
  lib/Makefile |2 +
  lib/trace.c  |  563 +++
 +++
  8 files changed, 981 insertions(+), 0 deletions(-)
 
 
 All of the trace/src/ subdirectory?

Yes, but only as a single file.  We don't really want READMES in source
directories.  Instead these 18 lines would do a perfect comment on the
top of the file.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:13:18AM -0700, Randy Dunlap wrote:

 Documentation/trace/src/Makefile |7 +
 Documentation/trace/src/README   |   18 +
 Documentation/trace/src/fork_trace.c |  119 +++
 Documentation/trace/trace.txt|  164 ++
 include/linux/trace.h|   99 ++
 lib/Kconfig  |9 +
 lib/Makefile |2 +
 lib/trace.c  |  563 +++
+++
 8 files changed, 981 insertions(+), 0 deletions(-)


All of the trace/src/ subdirectory?


Yes, but only as a single file.  We don't really want READMES in source
directories.  Instead these 18 lines would do a perfect comment on the
top of the file.


That might be OK for this case, but sometimes it makes sense to have
README etc. about how to use the software.  So you would want this
in the Documentation/ tree?  That makes it harder on users.

--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:23:35AM -0700, Randy Dunlap wrote:
 That might be OK for this case, but sometimes it makes sense to have
 README etc. about how to use the software.  So you would want this
 in the Documentation/ tree?  That makes it harder on users.

If it's so complex that we can't describe it in a few dozens lines
it shouldn't be anywhere but the place it belongs and better have a
real use and not just be a sample.  And in the trace case I must
admit that I'd prefer a real use like some simple syscall-trace
over this hack anyway..

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:23:35AM -0700, Randy Dunlap wrote:

That might be OK for this case, but sometimes it makes sense to have
README etc. about how to use the software.  So you would want this
in the Documentation/ tree?  That makes it harder on users.


If it's so complex that we can't describe it in a few dozens lines
it shouldn't be anywhere but the place it belongs and better have a
real use and not just be a sample.  And in the trace case I must
admit that I'd prefer a real use like some simple syscall-trace
over this hack anyway..


I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...


--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
 I think that samples are perfectly fine for documentation and
 that the trace example is a good example.  I think that most people
 who need something like that would need to customize it for their
 specific needs anyway.
 
 We don't seem to be making progress...

Time to bring in a Tie-Breaker :)

-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:

I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...


Time to bring in a Tie-Breaker :)


Yes.  Is anyone else interested?   :(


--
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Christoph Hellwig ([EMAIL PROTECTED]) wrote:
 On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
  Here is some documentation explaining what is/how to use the Linux
  Kernel Markers.
 
 As mentioned in the tracing infrastructure thread I don't think
 putting code into Documentation is a good idea.  Either of you really
 should start a sample/ toplevel directory for this kind of stuff
 including a Kconfig menu etc to be able to build these samples as
 part of an allmodconfig.
 

One should have a look at Documentation/kprobes.txt for that kind of
example code / documentation mix.

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Christoph Hellwig
On Mon, Sep 24, 2007 at 03:18:11PM -0400, Mathieu Desnoyers wrote:
  putting code into Documentation is a good idea.  Either of you really
  should start a sample/ toplevel directory for this kind of stuff
  including a Kconfig menu etc to be able to build these samples as
  part of an allmodconfig.
  
 
 One should have a look at Documentation/kprobes.txt for that kind of
 example code / documentation mix.

That one is particularly bad.  It's high on my todo list of things to fix.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 20:25:04 +0100 Christoph Hellwig wrote:

 On Mon, Sep 24, 2007 at 03:18:11PM -0400, Mathieu Desnoyers wrote:
   putting code into Documentation is a good idea.  Either of you really
   should start a sample/ toplevel directory for this kind of stuff
   including a Kconfig menu etc to be able to build these samples as
   part of an allmodconfig.
   
  
  One should have a look at Documentation/kprobes.txt for that kind of
  example code / documentation mix.
 
 That one is particularly bad.  It's high on my todo list of things to fix.
 -

I already have it split and building.   Just need to know
where to put it.  :)


---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:

 Christoph Hellwig wrote:
  On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
  I think that samples are perfectly fine for documentation and
  that the trace example is a good example.  I think that most people
  who need something like that would need to customize it for their
  specific needs anyway.
 
  We don't seem to be making progress...
  
  Time to bring in a Tie-Breaker :)
 
 Yes.  Is anyone else interested?   :(


I guess that's everyone (except those who are sleeping).

Let's not hold up progress.  Just use samples/ for code.

---
~Randy
Phaedrus says that Quality is about caring.
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
 On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
 
  Christoph Hellwig wrote:
   On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
   I think that samples are perfectly fine for documentation and
   that the trace example is a good example.  I think that most people
   who need something like that would need to customize it for their
   specific needs anyway.
  
   We don't seem to be making progress...
   
   Time to bring in a Tie-Breaker :)
  
  Yes.  Is anyone else interested?   :(
 
 
 I guess that's everyone (except those who are sleeping).
 
 Let's not hold up progress.  Just use samples/ for code.

Would you already have the 

Makefile
samples/Kconfig
samples/Makefile

core code handy per chance ? (and probably Kconfig sourcing in every
arch ?)

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap
On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:

 * Randy Dunlap ([EMAIL PROTECTED]) wrote:
  On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
  
   Christoph Hellwig wrote:
On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.
   
We don't seem to be making progress...

Time to bring in a Tie-Breaker :)
   
   Yes.  Is anyone else interested?   :(
  
  
  I guess that's everyone (except those who are sleeping).
  
  Let's not hold up progress.  Just use samples/ for code.
 
 Would you already have the 
 
 Makefile
 samples/Kconfig
 samples/Makefile
 
 core code handy per chance ? (and probably Kconfig sourcing in every
 arch ?)

Yes.  Here it is.  I'm working on add kprobes to it, but you
can go ahead with markers also.



From: Randy Dunlap [EMAIL PROTECTED]

Begin infrastructure for kernel code samples in the samples/ directory.
Add its Kconfig and Kbuild files.
Source its Kconfig file in all arch/ Kconfigs.


Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
---
 Makefile   |   10 +++---
 arch/alpha/Kconfig |2 ++
 arch/arm/Kconfig   |2 ++
 arch/avr32/Kconfig |2 ++
 arch/blackfin/Kconfig  |2 ++
 arch/cris/Kconfig  |2 ++
 arch/frv/Kconfig   |2 ++
 arch/h8300/Kconfig |2 ++
 arch/i386/Kconfig  |2 ++
 arch/ia64/Kconfig  |2 ++
 arch/m32r/Kconfig  |2 ++
 arch/m68k/Kconfig  |2 ++
 arch/m68knommu/Kconfig |2 ++
 arch/mips/Kconfig  |2 ++
 arch/parisc/Kconfig|2 ++
 arch/powerpc/Kconfig   |2 ++
 arch/ppc/Kconfig   |2 ++
 arch/s390/Kconfig  |2 ++
 arch/sh/Kconfig|2 ++
 arch/sh64/Kconfig  |2 ++
 arch/sparc/Kconfig |2 ++
 arch/sparc64/Kconfig   |2 ++
 arch/um/Kconfig|2 ++
 arch/v850/Kconfig  |2 ++
 arch/x86_64/Kconfig|2 ++
 arch/xtensa/Kconfig|3 ++-
 samples/Kbuild |2 ++
 samples/Kconfig|   11 +++
 28 files changed, 70 insertions(+), 4 deletions(-)

--- linux-2.6.23-rc7.orig/Makefile
+++ linux-2.6.23-rc7/Makefile
@@ -436,6 +436,7 @@ drivers-y   := drivers/ sound/
 net-y  := net/
 libs-y := lib/
 core-y := usr/
+samples-y  := samples/
 endif # KBUILD_EXTMOD
 
 ifeq ($(dot-config),1)
@@ -564,10 +565,12 @@ core-y+= kernel/ mm/ fs/ ipc/ security
 
 vmlinux-dirs   := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-$(net-y) $(net-m) $(libs-y) $(libs-m)))
+$(net-y) $(net-m) $(libs-y) $(libs-m)) \
+$(samples-y) $(samples-m))
+
 
 vmlinux-alldirs:= $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
-$(init-n) $(init-) \
+$(init-n) $(init-) $(samples-n) $(samples-) \
 $(core-n) $(core-) $(drivers-n) $(drivers-) \
 $(net-n)  $(net-)  $(libs-n)$(libs-
 
@@ -578,6 +581,7 @@ net-y   := $(patsubst %/, %/built-in.o, $
 libs-y1:= $(patsubst %/, %/lib.a, $(libs-y))
 libs-y2:= $(patsubst %/, %/built-in.o, $(libs-y))
 libs-y := $(libs-y1) $(libs-y2)
+samples-y  := $(patsubst %/, %/built-in.o, $(samples-y))
 
 # Build vmlinux
 # ---
@@ -607,7 +611,7 @@ libs-y  := $(libs-y1) $(libs-y2)
 # System.map is generated to document addresses of all kernel symbols
 
 vmlinux-init := $(head-y) $(init-y)
-vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
+vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(samples-y)
 vmlinux-all  := $(vmlinux-init) $(vmlinux-main)
 vmlinux-lds  := arch/$(ARCH)/kernel/vmlinux.lds
 export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
--- /dev/null
+++ linux-2.6.23-rc7/samples/Kbuild
@@ -0,0 +1,2 @@
+# Makefile for Linux samples code
+
--- /dev/null
+++ linux-2.6.23-rc7/samples/Kconfig
@@ -0,0 +1,11 @@
+# samples/Kconfig
+
+menuconfig SAMPLES
+   bool Sample kernel code
+   help
+ You can build and test sample kernel code here.
+
+if SAMPLES
+
+
+endif # SAMPLES
--- linux-2.6.23-rc7.orig/arch/alpha/Kconfig
+++ linux-2.6.23-rc7/arch/alpha/Kconfig
@@ -669,5 +669,7 @@ source security/Kconfig
 
 source crypto/Kconfig
 
+source samples/Kconfig
+
 source lib/Kconfig
 
--- linux-2.6.23-rc7.orig/arch/arm/Kconfig
+++ linux-2.6.23-rc7/arch/arm/Kconfig
@@ -1067,4 +1067,6 @@ source security/Kconfig
 
 source crypto/Kconfig
 
+source samples/Kconfig
+
 source lib/Kconfig
--- linux-2.6.23-rc7.orig/arch/avr32/Kconfig
+++ linux-2.6.23-rc7/arch/avr32/Kconfig
@@ -237,4 +237,6 @@ source security/Kconfig
 
 

Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Steven Rostedt
On Mon, Sep 24, 2007 at 06:50:44PM +0100, Christoph Hellwig wrote:
 On Mon, Sep 24, 2007 at 12:49:56PM -0400, Mathieu Desnoyers wrote:
  Here is some documentation explaining what is/how to use the Linux
  Kernel Markers.
 
 As mentioned in the tracing infrastructure thread I don't think
 putting code into Documentation is a good idea.  Either of you really
 should start a sample/ toplevel directory for this kind of stuff
 including a Kconfig menu etc to be able to build these samples as
 part of an allmodconfig.


 looking at Documentation/lguest/

 Oh wait, nothing to see here. Move along please.

 ;-)

 -- Steve



-
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/


Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote:
 On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:
 
  * Randy Dunlap ([EMAIL PROTECTED]) wrote:
   On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:
   
Christoph Hellwig wrote:
 On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:
 I think that samples are perfectly fine for documentation and
 that the trace example is a good example.  I think that most people
 who need something like that would need to customize it for their
 specific needs anyway.

 We don't seem to be making progress...
 
 Time to bring in a Tie-Breaker :)

Yes.  Is anyone else interested?   :(
   
   
   I guess that's everyone (except those who are sleeping).
   
   Let's not hold up progress.  Just use samples/ for code.
  
  Would you already have the 
  
  Makefile
  samples/Kconfig
  samples/Makefile
  
  core code handy per chance ? (and probably Kconfig sourcing in every
  arch ?)
 
 Yes.  Here it is.  I'm working on add kprobes to it, but you
 can go ahead with markers also.
 
 

Hi Randy,

I got everything working and I'm thinking about posting all this stuff
soon. Do you think your patch (having renamed Kbuild to Makefile) is
ready to post ?

Mathieu

 
 From: Randy Dunlap [EMAIL PROTECTED]
 
 Begin infrastructure for kernel code samples in the samples/ directory.
 Add its Kconfig and Kbuild files.
 Source its Kconfig file in all arch/ Kconfigs.
 
 
 Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
 ---
  Makefile   |   10 +++---
  arch/alpha/Kconfig |2 ++
  arch/arm/Kconfig   |2 ++
  arch/avr32/Kconfig |2 ++
  arch/blackfin/Kconfig  |2 ++
  arch/cris/Kconfig  |2 ++
  arch/frv/Kconfig   |2 ++
  arch/h8300/Kconfig |2 ++
  arch/i386/Kconfig  |2 ++
  arch/ia64/Kconfig  |2 ++
  arch/m32r/Kconfig  |2 ++
  arch/m68k/Kconfig  |2 ++
  arch/m68knommu/Kconfig |2 ++
  arch/mips/Kconfig  |2 ++
  arch/parisc/Kconfig|2 ++
  arch/powerpc/Kconfig   |2 ++
  arch/ppc/Kconfig   |2 ++
  arch/s390/Kconfig  |2 ++
  arch/sh/Kconfig|2 ++
  arch/sh64/Kconfig  |2 ++
  arch/sparc/Kconfig |2 ++
  arch/sparc64/Kconfig   |2 ++
  arch/um/Kconfig|2 ++
  arch/v850/Kconfig  |2 ++
  arch/x86_64/Kconfig|2 ++
  arch/xtensa/Kconfig|3 ++-
  samples/Kbuild |2 ++
  samples/Kconfig|   11 +++
  28 files changed, 70 insertions(+), 4 deletions(-)
 
 --- linux-2.6.23-rc7.orig/Makefile
 +++ linux-2.6.23-rc7/Makefile
 @@ -436,6 +436,7 @@ drivers-y := drivers/ sound/
  net-y:= net/
  libs-y   := lib/
  core-y   := usr/
 +samples-y:= samples/
  endif # KBUILD_EXTMOD
  
  ifeq ($(dot-config),1)
 @@ -564,10 +565,12 @@ core-y  += kernel/ mm/ fs/ ipc/ security
  
  vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
 -  $(net-y) $(net-m) $(libs-y) $(libs-m)))
 +  $(net-y) $(net-m) $(libs-y) $(libs-m)) \
 +  $(samples-y) $(samples-m))
 +
  
  vmlinux-alldirs  := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
 -  $(init-n) $(init-) \
 +  $(init-n) $(init-) $(samples-n) $(samples-) \
$(core-n) $(core-) $(drivers-n) $(drivers-) \
$(net-n)  $(net-)  $(libs-n)$(libs-
  
 @@ -578,6 +581,7 @@ net-y := $(patsubst %/, %/built-in.o, $
  libs-y1  := $(patsubst %/, %/lib.a, $(libs-y))
  libs-y2  := $(patsubst %/, %/built-in.o, $(libs-y))
  libs-y   := $(libs-y1) $(libs-y2)
 +samples-y:= $(patsubst %/, %/built-in.o, $(samples-y))
  
  # Build vmlinux
  # ---
 @@ -607,7 +611,7 @@ libs-y:= $(libs-y1) $(libs-y2)
  # System.map is generated to document addresses of all kernel symbols
  
  vmlinux-init := $(head-y) $(init-y)
 -vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
 +vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(samples-y)
  vmlinux-all  := $(vmlinux-init) $(vmlinux-main)
  vmlinux-lds  := arch/$(ARCH)/kernel/vmlinux.lds
  export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
 --- /dev/null
 +++ linux-2.6.23-rc7/samples/Kbuild
 @@ -0,0 +1,2 @@
 +# Makefile for Linux samples code
 +
 --- /dev/null
 +++ linux-2.6.23-rc7/samples/Kconfig
 @@ -0,0 +1,11 @@
 +# samples/Kconfig
 +
 +menuconfig SAMPLES
 + bool Sample kernel code
 + help
 +   You can build and test sample kernel code here.
 +
 +if SAMPLES
 +
 +
 +endif # SAMPLES
 --- linux-2.6.23-rc7.orig/arch/alpha/Kconfig
 +++ linux-2.6.23-rc7/arch/alpha/Kconfig
 @@ -669,5 +669,7 @@ source security/Kconfig
  
  source crypto/Kconfig
  
 +source samples/Kconfig
 +
  

Re: [patch 6/7] Linux Kernel Markers - Documentation

2007-09-24 Thread Randy Dunlap

Mathieu Desnoyers wrote:

* Randy Dunlap ([EMAIL PROTECTED]) wrote:

On Mon, 24 Sep 2007 17:08:30 -0400 Mathieu Desnoyers wrote:


* Randy Dunlap ([EMAIL PROTECTED]) wrote:

On Mon, 24 Sep 2007 11:56:35 -0700 Randy Dunlap wrote:


Christoph Hellwig wrote:

On Mon, Sep 24, 2007 at 11:49:15AM -0700, Randy Dunlap wrote:

I think that samples are perfectly fine for documentation and
that the trace example is a good example.  I think that most people
who need something like that would need to customize it for their
specific needs anyway.

We don't seem to be making progress...

Time to bring in a Tie-Breaker :)

Yes.  Is anyone else interested?   :(


I guess that's everyone (except those who are sleeping).

Let's not hold up progress.  Just use samples/ for code.
Would you already have the 


Makefile
samples/Kconfig
samples/Makefile

core code handy per chance ? (and probably Kconfig sourcing in every
arch ?)

Yes.  Here it is.  I'm working on add kprobes to it, but you
can go ahead with markers also.




Hi Randy,

I got everything working and I'm thinking about posting all this stuff
soon. Do you think your patch (having renamed Kbuild to Makefile) is
ready to post ?


Yes, AFAIK it is.  Do you want me to resend it or do you want to
make it patch M/N in your patches?

--
~Randy
Phaedrus says that Quality is about caring.
-
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/