From: Randy Dunlap <randy.dunlap@oracle.com>
To: William Cohen <wcohen@redhat.com>
Cc: Peter Teoh <htmldeveloper@gmail.com>,
SystemTAP <systemtap@sources.redhat.com>,
Don Domingo <ddomingo@redhat.com>,
"Frank Ch. Eigler" <fche@redhat.com>
Subject: Re: Start of Systemtap Tapset Reference manual
Date: Thu, 20 Nov 2008 21:41:00 -0000 [thread overview]
Message-ID: <4925D92B.50401@oracle.com> (raw)
In-Reply-To: <4925D70F.4010602@redhat.com>
William Cohen wrote:
> I took a look to see how the kernel uses kernel-doc to extract the
> information from the C files. I tried an experiment to see whether
> kernel-doc could extract the comments out of a systemtap tapset file.
> However, it appears that kernel-doc try to grock C syntax and looks for
> a prototype for the function. Thus, it chokes on the following example:
>
> /**
> * vm.pagefault - Records that a page fault occurred.
> * Context: The process which triggered the fault
> *
> * @address: The address of the faulting memory access.
> * @write_access: Indicates whether this was a write.
> */
kernel-doc also wants the @params: listed immediately after the function
name/description (first) line. Then Context: or other info can be listed
after the params, usually with an intervening "blank" (i.e., " *") line.
> probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
> kernel.function("handle_mm_fault@mm/memory.c") ?
> {
> write_access = $write_access
> address = $address
> }
>
> Giving the following error message:
>
> Error(/home/wcohen/research/profiling/systemtap_write/systemtap_ref//tapset/memory.stp:19):
> cannot understand prototype: 'probe vm.pagefault =
> kernel.function("__handle_mm_fault@mm/memory.c") ?,
> kernel.function("handle_mm_fault@mm/memory.c") ? '
>
> kernel-doc is looking through the c code to try to extract additional
> information for enum/typedef/struct/function document comments. Would it
It's looking for explicit parameter types and return type since the
@params comments & function name line don't include type info.
> 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)?
--
~Randy
next prev parent reply other threads:[~2008-11-20 21:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 16:45 William Cohen
[not found] ` <491CBA1C.4080108@redhat.com>
2008-11-14 14:08 ` William Cohen
2008-11-17 6:00 ` Peter Teoh
[not found] ` <804dabb00811162156s7cc931deja89861e47571331f@mail.gmail.com>
2008-11-18 16:55 ` William Cohen
2008-11-18 20:44 ` Randy Dunlap
2008-11-19 1:01 ` Peter Teoh
2008-11-19 16:33 ` William Cohen
2008-11-20 21:31 ` William Cohen
2008-11-20 21:41 ` Randy Dunlap [this message]
2008-11-21 14:54 ` William Cohen
2008-11-21 23:00 ` Tweaks for kernel-doc to parse systemtap tapsets William Cohen
2008-11-24 16:48 ` Start of Systemtap Tapset Reference manual William Cohen
2008-11-24 19:16 ` William Cohen
2008-11-25 11:27 ` Mark Wielaard
2008-11-25 15:04 ` William Cohen
2008-11-27 1:47 ` Peter Teoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4925D92B.50401@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=ddomingo@redhat.com \
--cc=fche@redhat.com \
--cc=htmldeveloper@gmail.com \
--cc=systemtap@sources.redhat.com \
--cc=wcohen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).