----- On Mar 7, 2017, at 9:53 AM, Francis Deslauriers 
[email protected] wrote:

> Signed-off-by: Francis Deslauriers <[email protected]>
> ---
> instrumentation/events/lttng-module/btrfs.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/instrumentation/events/lttng-module/btrfs.h
> b/instrumentation/events/lttng-module/btrfs.h
> index cc7ba50..2955e28 100644
> --- a/instrumentation/events/lttng-module/btrfs.h
> +++ b/instrumentation/events/lttng-module/btrfs.h
> @@ -87,9 +87,18 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode,
> btrfs_inode_evict,
> 
> LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
> 
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
> +
> +     TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
> +             struct extent_map *map),
> +
> +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
> +
>       TP_PROTO(struct btrfs_root *root, struct inode *inode,
>               struct extent_map *map),
> 
> +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
> +

Please try to keep the #ifdeffery around the entire LTTNG_TRACEPOINT_EVENT,
even if it means we copy-paste a bit of code. It becomes easier to
maintain in the long run than having spaghetti-like ifdefs within the
macros.

Thanks,

Mathieu

>       TP_ARGS(root, inode, map),
> 
>       TP_FIELDS(
> --
> 2.7.4

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to