All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lttng-module: block.h : Fix build for 3.9 kernel
@ 2013-03-25 12:30 maxin.john
  0 siblings, 0 replies; 3+ messages in thread
From: maxin.john @ 2013-03-25 12:30 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: lttng-dev, anders.roxell, Maxin B. John

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

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] lttng-module: block.h : Fix build for 3.9 kernel
       [not found] <20130325133334.GA32008@Krystal>
@ 2013-03-25 14:22 ` Maxin B. John
  0 siblings, 0 replies; 3+ messages in thread
From: Maxin B. John @ 2013-03-25 14:22 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: lttng-dev

 On Mon, Mar 25, 2013 at 09:33:34AM -0400, Mathieu Desnoyers wrote:
 > * 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.

 Thank you very much for the review comments.I will update it
accordingly. 

 > Thanks,
 > Mathieu

Best Regards,
Maxin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] lttng-module: block.h : Fix build for 3.9 kernel
       [not found] <1364214657-35068-1-git-send-email-maxin.john@enea.com>
@ 2013-03-25 13:33 ` Mathieu Desnoyers
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2013-03-25 13:33 UTC (permalink / raw)
  To: maxin.john; +Cc: lttng-dev, anders.roxell

* 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-25 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 12:30 [PATCH] lttng-module: block.h : Fix build for 3.9 kernel maxin.john
     [not found] <1364214657-35068-1-git-send-email-maxin.john@enea.com>
2013-03-25 13:33 ` Mathieu Desnoyers
     [not found] <20130325133334.GA32008@Krystal>
2013-03-25 14:22 ` Maxin B. John

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.