All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: maxin.john@enea.com
Cc: lttng-dev@lists.lttng.org, anders.roxell@enea.com
Subject: Re: [PATCH] lttng-module: block.h : Fix build for 3.9 kernel
Date: Mon, 25 Mar 2013 09:33:34 -0400	[thread overview]
Message-ID: <20130325133334.GA32008__23516.7626444765$1364218475$gmane$org@Krystal> (raw)
In-Reply-To: <1364214657-35068-1-git-send-email-maxin.john@enea.com>

* maxin.john@enea.com (maxin.john@enea.com) wrote:
> From: "Maxin B. John" <maxin.john@enea.com>
> 
> commit :3a366e614d0837d9fc23f78cdb1a1186ebc3387f
>  block: add missing block_bio_complete() tracepoint
> added block_bio_complete to 3.9 kernel
> 
> commit : 8c1cf6bb02fda79b0a4b9bd121f6be6d4ce7a15a
>  block: add @req to bio_{front|back}_merge tracepoints
> added block_bio_backmerge and block_bio_frontmerge to 3.9 kernel
> 
> Update block.h based on these commits in mainline kernel

Disabling the event prior to 3.9.0 does not seem to be the proper
solution. We should rather #ifdef the old/new TRACE_EVENT definitions to
accept the proper number of arguments for each kernel.

Thanks,

Mathieu

> 
> Fixes this build failure:
> ....
> include/trace/events/block.h:353:1: note: previous definition of
> 'trace_block_bio_frontmerge' was here
> make[3]: *** [/home/majo/kernel/lttng/lttng-modules/probes/
> lttng-probe-block.o] Error 1
> make[2]: *** [/home/majo/kernel/lttng/lttng-modules/probes] Error 2
> make[1]: *** [_module_/home/majo/kernel/lttng/lttng-modules] Error 2
> make: *** [default] Error 2
> 
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
>  instrumentation/events/lttng-module/block.h |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
> 
> diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
> index d42ebd4..59bd2c0 100644
> --- a/instrumentation/events/lttng-module/block.h
> +++ b/instrumentation/events/lttng-module/block.h
> @@ -311,6 +311,13 @@ TRACE_EVENT(block_bio_bounce,
>   * This tracepoint indicates there is no further work to do on this
>   * block IO operation @bio.
>   */
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
> +/**
> + * commit :3a366e614d0837d9fc23f78cdb1a1186ebc3387f
> + * block: add missing block_bio_complete() tracepoint
> + * added block_bio_complete to 3.9.0 kernel
> + */
> +#else
>  TRACE_EVENT(block_bio_complete,
>  
>  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
> @@ -349,6 +356,7 @@ TRACE_EVENT(block_bio_complete,
>  		  (unsigned long long)__entry->sector,
>  		  __entry->nr_sector, __entry->error)
>  )
> +#endif
>  
>  DECLARE_EVENT_CLASS(block_bio,
>  
> @@ -387,6 +395,13 @@ DECLARE_EVENT_CLASS(block_bio,
>   * Merging block request @bio to the end of an existing block request
>   * in queue @q.
>   */
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
> +/**
> + * commit : 8c1cf6bb02fda79b0a4b9bd121f6be6d4ce7a15a
> + * block: add @req to bio_{front|back}_merge tracepoints
> + * added block_bio_backmerge and block_bio_frontmerge to 3.9.0 kernel
> + */
> +#else
>  DEFINE_EVENT(block_bio, block_bio_backmerge,
>  
>  	TP_PROTO(struct request_queue *q, struct bio *bio),
> @@ -408,6 +423,7 @@ DEFINE_EVENT(block_bio, block_bio_frontmerge,
>  
>  	TP_ARGS(q, bio)
>  )
> +#endif
>  
>  /**
>   * block_bio_queue - putting new block IO operation in queue
> -- 
> 1.7.5.4
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

       reply	other threads:[~2013-03-25 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1364214657-35068-1-git-send-email-maxin.john@enea.com>
2013-03-25 13:33 ` Mathieu Desnoyers [this message]
     [not found] <20130325133334.GA32008@Krystal>
2013-03-25 14:22 ` [PATCH] lttng-module: block.h : Fix build for 3.9 kernel Maxin B. John
2013-03-25 12:30 maxin.john

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='20130325133334.GA32008__23516.7626444765$1364218475$gmane$org@Krystal' \
    --to=mathieu.desnoyers@efficios.com \
    --cc=anders.roxell@enea.com \
    --cc=lttng-dev@lists.lttng.org \
    --cc=maxin.john@enea.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.