Re: [PATCH 1/2] Trace code and documentation

From: Randy Dunlap
Date: Fri Sep 14 2007 - 00:13:28 EST


On Thu, 13 Sep 2007 16:43:16 -0700 David Wilder wrote:


> [it would be easier to review and make sense of the comments
> if the patch were inline instead of attached]


Tom Zanussi <zanussi@xxxxxxxxxx>
Martin Hunt <hunt@xxxxxxxxxx>
David Wilder <dwilder@xxxxxxxxxx>

Above needs to use Signed-off-by: if you want this merged.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

trace.txt:

+When using the READ(2) interface,

s/READ/read/

+ preemption is disabled and that trace state is set to "running". a

s/. a/. A/

+on the function do_fork(). The value of current->pid is writen to

s/writen/written/

+You can build the kernel module fork_trace.ko using the following
+Makefile:

There was reportedly a discussion about sample source code in the
Documentation/ directory at the kernel summit. Some people want to
move it to the util-linux package. If that's not done, I strongly
prefer that Makefiles and source files be put into their own
sub-directory, not "hidden" inside txt files, so you would end up
with something line Documentation/trace/, with trace.txt, and also
Documentation/trace/src, with Makefile and fork_trace.c & any other
source files.

+Trace is adapted from blktrace authored by Jens Axboe (axboe@xxxxxxx).

MAINTAINERS file says <axboe@xxxxxxxxx>. He's also
<jens.axboe@xxxxxxxxxx>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/trace.c:

+ * Based on blktrace code, Copyright (C) 2006 Jens Axboe <axboe@xxxxxxx>

Ditto.

+
+

Use just one blank line between functions and/or structs.

Please check the patch with scripts/checkpatch.pl and then evaluate
its warnings. Sometimes it makes sense to ignore some of them.

+/**
+ * trace_setup: create a new trace trace handle
+ *
+ * @root: The root directory name in the root of the debugfs
+ * to place trace directories. Created as needed.

Thanks for using kernel-doc; however, don't put a blank line between
the function name line and the parameters. Also, the function
name line should have a "-" separating the function name and the
short description. (multiple places in trace.c)


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/