Eliminating duplicate code in tapset files
Mike Mason
mmlnx@us.ibm.com
Fri Jul 13 16:53:00 GMT 2007
Frank Ch. Eigler wrote:
> 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.
This isn't needed for what I'm trying to do. Let's keep it simple.
>
> 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.
This works for me, though I'm confused by the comment delimiters (/*...*/). Are you suggesting we use comment delimiters to delimit the macro contents? If so, then I'd rather see something else used, something unique.
Thanks,
Mike
>
> - FChE
More information about the Systemtap
mailing list