All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH lttng-modules] Fix: writeback instrumentation for 4.2 kernels
@ 2015-08-21  2:23 Michael Jeanson
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Jeanson @ 2015-08-21  2:23 UTC (permalink / raw)
  To: lttng-dev

Bandwidth related fields were moved by this commit:

commit a88a341a73be4ef035ca26170c849f002797da27
Author: Tejun Heo <tj@kernel.org>
Date:   Fri, 22 May 2015 17:13:28 -0400

    writeback: move bandwidth related fields from backing_dev_info into
    bdi_writeback

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
 instrumentation/events/lttng-module/writeback.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
index 88b7aa4..b55d15e 100644
--- a/instrumentation/events/lttng-module/writeback.h
+++ b/instrumentation/events/lttng-module/writeback.h
@@ -363,13 +363,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
 
 	TP_FIELDS(
 		ctf_array_text(char, bdi, dev_name(bdi->dev), 32)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+		ctf_integer(unsigned long, write_bw, KBps(bdi->wb.write_bandwidth))
+		ctf_integer(unsigned long, avg_write_bw, KBps(bdi->wb.avg_write_bandwidth))
+#else
 		ctf_integer(unsigned long, write_bw, KBps(bdi->write_bandwidth))
 		ctf_integer(unsigned long, avg_write_bw, KBps(bdi->avg_write_bandwidth))
+#endif
 		ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+		ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->wb.dirty_ratelimit))
+#else
 		ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->dirty_ratelimit))
+#endif
 		ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+		ctf_integer(unsigned long, balanced_dirty_ratelimit,
+					KBps(bdi->wb.balanced_dirty_ratelimit))
+#else
 		ctf_integer(unsigned long, balanced_dirty_ratelimit,
 					KBps(bdi->balanced_dirty_ratelimit))
+#endif
 	)
 )
 
-- 
1.9.1

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

* Re: [PATCH lttng-modules] Fix: writeback instrumentation for 4.2 kernels
       [not found] <1440123795-16823-1-git-send-email-mjeanson@efficios.com>
@ 2015-08-21 16:31 ` Mathieu Desnoyers
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2015-08-21 16:31 UTC (permalink / raw)
  To: Michael Jeanson; +Cc: lttng-dev

I picked up your patch into master and stable-2.7, but
did the following modif on top:

commit c7d89a6dc97f72013851ae94478a4c92e77e1f56
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date:   Fri Aug 21 09:28:44 2015 -0700

    Cleanup: split bdi_dirty_ratelimit with ifdef into separate macros
    
    Makes the code easier to maintain in the long run.
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks!

Mathieu

----- On Aug 20, 2015, at 7:23 PM, Michael Jeanson mjeanson@efficios.com wrote:

> Bandwidth related fields were moved by this commit:
> 
> commit a88a341a73be4ef035ca26170c849f002797da27
> Author: Tejun Heo <tj@kernel.org>
> Date:   Fri, 22 May 2015 17:13:28 -0400
> 
>    writeback: move bandwidth related fields from backing_dev_info into
>    bdi_writeback
> 
> Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
> ---
> instrumentation/events/lttng-module/writeback.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> 
> diff --git a/instrumentation/events/lttng-module/writeback.h
> b/instrumentation/events/lttng-module/writeback.h
> index 88b7aa4..b55d15e 100644
> --- a/instrumentation/events/lttng-module/writeback.h
> +++ b/instrumentation/events/lttng-module/writeback.h
> @@ -363,13 +363,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
> 
> 	TP_FIELDS(
> 		ctf_array_text(char, bdi, dev_name(bdi->dev), 32)
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
> +		ctf_integer(unsigned long, write_bw, KBps(bdi->wb.write_bandwidth))
> +		ctf_integer(unsigned long, avg_write_bw, KBps(bdi->wb.avg_write_bandwidth))
> +#else
> 		ctf_integer(unsigned long, write_bw, KBps(bdi->write_bandwidth))
> 		ctf_integer(unsigned long, avg_write_bw, KBps(bdi->avg_write_bandwidth))
> +#endif
> 		ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
> +		ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->wb.dirty_ratelimit))
> +#else
> 		ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->dirty_ratelimit))
> +#endif
> 		ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
> +		ctf_integer(unsigned long, balanced_dirty_ratelimit,
> +					KBps(bdi->wb.balanced_dirty_ratelimit))
> +#else
> 		ctf_integer(unsigned long, balanced_dirty_ratelimit,
> 					KBps(bdi->balanced_dirty_ratelimit))
> +#endif
> 	)
> )
> 
> --
> 1.9.1

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

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

end of thread, other threads:[~2015-08-21 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-21  2:23 [PATCH lttng-modules] Fix: writeback instrumentation for 4.2 kernels Michael Jeanson
     [not found] <1440123795-16823-1-git-send-email-mjeanson@efficios.com>
2015-08-21 16:31 ` Mathieu Desnoyers

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.