This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Eliminating duplicate code in tapset files


mmlnx wrote:

> macro VFS_COMMON
> {
>         file = $file
>         count = $count
> [...]
> probe vfs.read = kernel.function ("vfs_read")
> {
> 	%VFS_COMMON
>         size = count
> }
> [...]

Let's consider the likelihood that this sort of widget would have to
evolve into a full preprocessor with parametrized varargs macros,
expression evaluation, and a special dose of whatnot.

If not, if we're likely to stay happy with simple token pasting, it
can look alongside the current preprocessor conditional mechanism:
    %( define VFS_COMMON /*...*/ %)
to define, and 
    %( VFS_COMMON %)
to use.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]