Tweaks for kernel-doc to parse systemtap tapsets

William Cohen wcohen@redhat.com
Fri Nov 21 23:00:00 GMT 2008


Randy Dunlap wrote:

>> be worthwhile to adapt kernel-doc so it can parse systemtap tapset
>> files? Is there some way to make kernel-doc only pay attention to the
>> comments?
> 
> Not currently, but I don't see why it couldn't be done.  Then the question
> becomes:  is it the same scripts/kernel-doc file or is it scripts/stap-doc
> (e.g. -- or some other name)?

Hi Randy,

I have some modifications to the kernel-doc script that allow it to parse the 
systemtap tapsets and generate some form of xml. I am not completely satisified 
with the current output (only generates xml at the moment and extra junk in the 
synopsis for the parameters for systemtap functions). However, I was hoping to 
get some feedback on the current state of this development.

For the experiment the systemtap sources are located in 
/home/wcohen/research/profiling/systemtap_write/systemtap_ref/. I have the 
kernel-doc script in systemtap_ref/scripts. The memory.stp is in 
systemtap_ref/tapsets. From the directory with the tapsets2.tmpl I was able to 
run the following commands to generate pdf:


SRCTREE=/home/wcohen/research/profiling/systemtap_write/systemtap_ref/ ./docproc 
doc tapsets2.tmpl > c.xml
xmlto pdf c.xml


I like the compactness of the kernel-doc comments. The resulting memory.stp 
looks like something that tapset developers would be likely to update when they 
make some change.

-Will
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kernel-doc
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081121/b2d6022c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: memory.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081121/b2d6022c/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tapsets2.tmpl
Type: text/xml
Size: 1591 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081121/b2d6022c/attachment.xml>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: c.pdf
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081121/b2d6022c/attachment-0002.ksh>


More information about the Systemtap mailing list