On Wed, 2013-01-30 at 14:35 +0800, chenggang wrote:
> +#include <asm/ptrace.h>
> +
> +DECLARE_EVENT_CLASS(vfs_filerw_template,
> +
> +     TP_PROTO(long long pos, unsigned long bytes, unsigned char *fname),

One last nit. Might want to make fname "const".

-- Steve

> +
> +     TP_ARGS(pos, bytes, fname),
> +
> +     TP_STRUCT__entry(
> +             __field(        long long,      pos             )
> +             __field(        unsigned long,  bytes           )
> +             __string(       fname,          fname           )
> +     ),
> +
> +     TP_fast_assign(
> +             __entry->pos    = pos;
> +             __entry->bytes  = bytes;
> +             __assign_str(fname, fname);
> +     ),
> +
> +     TP_printk("Filename: %s Pos: %lld Bytes: %lu",
> +               __get_str(fname), __entry->pos, __entry->bytes)
> +);
> +


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to