[lkml]   [2001]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectKernel Module tracing.
I've recently been laboring over a kernel module that allows other
kernel modules to send messages
and tracing statements. If anyone has any input on whether this would
be a usefull thing or not
please let me know. Here is a quick breakdown on how it works.

Beware, this is only a BRIEF explaination.. I'll follow up with more
details if anyone is intereasted.

trace.o <- Tracing module
mymodule .o <- Client module

1: Load tracing module
2: Load a module that uses the tracing modules for reporting.
a. the client module requests a certain number of reporting levels.
b. the trace module creates a devFS entry for each of the requested
reporting levels.
( /dev/trace/mymodule/mymodule0
mymodule1 ...
3. Now the client module can send messages with a specific severity
rating and have it set
to the appropriate character file.
4. User space programs listening on each of the character files can do
whatever, log the messages
or perform tasks depending on the message.
5. When a client module is unloaded the devFS entries are removed and
the user programs are also
told to close the file.

I am using the devFS filesystem because of the abilities to easily
dynamically create new entries and
remove them.. Currently devFS does not recycle Major and Minor numbers,
but a co-worker of mine
has created a patch to fix that.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.038 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site