From: Michael Jeanson Date: Fri, 21 Aug 2015 02:23:15 +0000 (-0400) Subject: Fix: writeback instrumentation for 4.2 kernels X-Git-Tag: v2.7.0-rc2~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9f305a2cd324e53e7f9d01d41a29e40b9451a255;p=lttng-modules.git Fix: writeback instrumentation for 4.2 kernels Bandwidth related fields were moved by this commit: commit a88a341a73be4ef035ca26170c849f002797da27 Author: Tejun Heo 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h index 88b7aa49..b55d15ec 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 ) )