1 From 562860aa5d13249d2c80e51080a3437ef5d2fe0b Mon Sep 17 00:00:00 2001
2 From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3 Date: Mon, 12 Feb 2018 18:31:40 +0100
4 Subject: [PATCH] Fix: update timer instrumentation on 4.16 and 4.14-rt
8 commit 63e2ed3659752a4850e0ef3a07f809988fcd74a4
9 Author: Anna-Maria Gleixner <anna-maria@linutronix.de>
10 Date: Thu Dec 21 11:41:38 2017 +0100
12 tracing/hrtimer: Print the hrtimer mode in the 'hrtimer_start' tracepoint
14 The 'hrtimer_start' tracepoint lacks the mode information. The mode is
15 important because consecutive starts can switch from ABS to REL or from
18 Append the mode field.
22 commit 6ee32a49b1ed61c08ac9f1c9fcbf83d3c749b71d
23 Author: Anna-Maria Gleixner <anna-maria@linutronix.de>
24 Date: Sun Oct 22 23:39:46 2017 +0200
26 tracing: hrtimer: Print hrtimer mode in hrtimer_start tracepoint
28 The hrtimer_start tracepoint lacks the mode information. The mode is
29 important because consecutive starts can switch from ABS to REL or from
32 Add the mode information.
34 Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
35 Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
36 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
38 instrumentation/events/lttng-module/timer.h | 22 ++++++++++++++++++++++
39 1 file changed, 22 insertions(+)
41 diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h
42 index d62fd25..6f0cb7f 100644
43 --- a/instrumentation/events/lttng-module/timer.h
44 +++ b/instrumentation/events/lttng-module/timer.h
45 @@ -160,6 +160,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_init,
46 * hrtimer_start - called when the hrtimer is started
47 * @timer: pointer to struct hrtimer
49 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0) || \
50 + LTTNG_RT_KERNEL_RANGE(4,14,0,0, 4,15,0,0))
51 +LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
53 + timer_hrtimer_start,
55 + TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode),
57 + TP_ARGS(hrtimer, mode),
60 + ctf_integer_hex(void *, hrtimer, hrtimer)
61 + ctf_integer_hex(void *, function, hrtimer->function)
62 + ctf_integer(s64, expires,
63 + lttng_ktime_get_tv64(hrtimer_get_expires(hrtimer)))
64 + ctf_integer(s64, softexpires,
65 + lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer)))
66 + ctf_integer(enum hrtimer_mode, mode, mode)
70 LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
73 @@ -177,6 +198,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
74 lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer)))
80 * htimmer_expire_entry - called immediately before the hrtimer callback
81 From 9cf057fcd8189b44b11069a3f96be6e53d57c9e9 Mon Sep 17 00:00:00 2001
82 From: Michael Jeanson <mjeanson@efficios.com>
83 Date: Mon, 12 Feb 2018 18:32:12 +0100
84 Subject: [PATCH] Fix: update vmscan instrumentation for v4.16
88 commit 9092c71bb724dba2ecba849eae69e5c9d39bd3d2
89 Author: Josef Bacik <jbacik@fb.com>
90 Date: Wed Jan 31 16:16:26 2018 -0800
92 mm: use sc->priority for slab shrink targets
94 Previously we were using the ratio of the number of lru pages scanned to
95 the number of eligible lru pages to determine the number of slab objects
96 to scan. The problem with this is that these two things have nothing to
97 do with each other, so in slab heavy work loads where there is little to
98 no page cache we can end up with the pages scanned being a very low
99 number. This means that we reclaim next to no slab pages and waste a
100 lot of time reclaiming small amounts of space.
102 Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
103 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
105 instrumentation/events/lttng-module/mm_vmscan.h | 31 ++++++++++++++++++++++---
106 1 file changed, 28 insertions(+), 3 deletions(-)
108 diff --git a/instrumentation/events/lttng-module/mm_vmscan.h b/instrumentation/events/lttng-module/mm_vmscan.h
109 index 9845635..a69b42f 100644
110 --- a/instrumentation/events/lttng-module/mm_vmscan.h
111 +++ b/instrumentation/events/lttng-module/mm_vmscan.h
112 @@ -204,7 +204,32 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan
113 TP_ARGS(nr_reclaimed)
116 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
117 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
118 +LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
120 + mm_vmscan_shrink_slab_start,
122 + TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
123 + long nr_objects_to_shrink, unsigned long cache_items,
124 + unsigned long long delta, unsigned long total_scan,
127 + TP_ARGS(shr, sc, nr_objects_to_shrink, cache_items, delta, total_scan,
131 + ctf_integer_hex(struct shrinker *, shr, shr)
132 + ctf_integer_hex(void *, shrink, shr->scan_objects)
133 + ctf_integer(int, nid, sc->nid)
134 + ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink)
135 + ctf_integer(gfp_t, gfp_flags, sc->gfp_mask)
136 + ctf_integer(unsigned long, cache_items, cache_items)
137 + ctf_integer(unsigned long long, delta, delta)
138 + ctf_integer(unsigned long, total_scan, total_scan)
139 + ctf_integer(int, priority, priority)
142 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
143 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
145 mm_vmscan_shrink_slab_start,
146 @@ -233,6 +258,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
147 ctf_integer(unsigned long, total_scan, total_scan)
152 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
153 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
154 @@ -255,7 +281,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
155 ctf_integer(long, total_scan, total_scan)
158 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
159 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
160 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
162 mm_vmscan_shrink_slab_end,
163 @@ -278,7 +304,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
164 ctf_integer(long, total_scan, new_scan_cnt - unused_scan_cnt)
167 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
170 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
171 From 760a1caeaf8962c438fdc7b21e1d0a4a6bb74354 Mon Sep 17 00:00:00 2001
172 From: Michael Jeanson <mjeanson@efficios.com>
173 Date: Mon, 12 Feb 2018 18:32:25 +0100
174 Subject: [PATCH] Fix: update rcu instrumentation for v4.16
176 See upstream commits :
178 commit dec98900eae1e22467182e58688abe5fae98bd5f
179 Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
180 Date: Wed Oct 4 16:24:29 2017 -0700
182 rcu: Add ->dynticks field to rcu_dyntick trace event
184 commit 84585aa8b6ad24e5bdfba9db4a320a6aeed192ab
185 Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
186 Date: Wed Oct 4 15:55:16 2017 -0700
188 rcu: Shrink ->dynticks_{nmi_,}nesting from long long to long
190 Because the ->dynticks_nesting field now only contains the process-based
191 nesting level instead of a value encoding both the process nesting level
192 and the irq "nesting" level, we no longer need a long long, even on
193 32-bit systems. This commit therefore changes both the ->dynticks_nesting
194 and ->dynticks_nmi_nesting fields to long.
196 Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
197 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
199 instrumentation/events/lttng-module/rcu.h | 41 ++++++++++++++++++++++++++-----
200 1 file changed, 35 insertions(+), 6 deletions(-)
202 diff --git a/instrumentation/events/lttng-module/rcu.h b/instrumentation/events/lttng-module/rcu.h
203 index 869de08..4528a79 100644
204 --- a/instrumentation/events/lttng-module/rcu.h
205 +++ b/instrumentation/events/lttng-module/rcu.h
206 @@ -220,31 +220,60 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs,
207 * events use the upper bits of each number, while interrupt-related
208 * events use the lower bits.
210 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
211 LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
213 + TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks),
215 + TP_ARGS(polarity, oldnesting, newnesting, dynticks),
218 + ctf_string(polarity, polarity)
219 + ctf_integer(long, oldnesting, oldnesting)
220 + ctf_integer(long, newnesting, newnesting)
221 + ctf_integer(int, dynticks, atomic_read(&dynticks))
225 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
226 +LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
228 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
229 TP_PROTO(const char *polarity, long long oldnesting, long long newnesting),
231 TP_ARGS(polarity, oldnesting, newnesting),
234 + ctf_string(polarity, polarity)
235 + ctf_integer(long long, oldnesting, oldnesting)
236 + ctf_integer(long long, newnesting, newnesting)
239 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
240 +LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
242 TP_PROTO(char *polarity, long long oldnesting, long long newnesting),
244 TP_ARGS(polarity, oldnesting, newnesting),
247 + ctf_string(polarity, polarity)
248 + ctf_integer(long long, oldnesting, oldnesting)
249 + ctf_integer(long long, newnesting, newnesting)
253 +LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
255 TP_PROTO(char *polarity),
261 ctf_string(polarity, polarity)
262 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
263 - ctf_integer(long long, oldnesting, oldnesting)
264 - ctf_integer(long long, newnesting, newnesting)
271 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))