Re: [PATCH 3/3] Add name fields in shrinker tracepoint definitions

kbuild test robot
2016-07-09T09:46:53Z

[-- Attachment #1: Type: text/plain, Size: 11412 bytes --]

Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc6 next-20160708]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Janani-Ravichandran/Add-names-of-shrinkers-and-have-tracepoints-display-them/20160709-170759
config: i386-defconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/trace/define_trace.h:95:0,
from include/trace/events/vmscan.h:395,
from mm/vmscan.c:60:
include/trace/events/vmscan.h: In function 'trace_event_raw_event_mm_shrink_slab_start':
>> include/trace/events/vmscan.h:206:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
__entry->name = shr->name;
^
include/trace/trace_events.h:686:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
{ assign; } \
^~~~~~
include/trace/trace_events.h:64:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), \
^~~~~~
>> include/trace/events/vmscan.h:182:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_shrink_slab_start,
^~~~~~~~~~~
>> include/trace/events/vmscan.h:205:2: note: in expansion of macro 'TP_fast_assign'
TP_fast_assign(
^~~~~~~~~~~~~~
include/trace/events/vmscan.h: In function 'trace_event_raw_event_mm_shrink_slab_end':
include/trace/events/vmscan.h:252:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
__entry->name = shr->name;
^
include/trace/trace_events.h:686:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
{ assign; } \
^~~~~~
include/trace/trace_events.h:64:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), \
^~~~~~
include/trace/events/vmscan.h:233:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_shrink_slab_end,
^~~~~~~~~~~
include/trace/events/vmscan.h:251:2: note: in expansion of macro 'TP_fast_assign'
TP_fast_assign(
^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:96:0,
from include/trace/events/vmscan.h:395,
from mm/vmscan.c:60:
include/trace/events/vmscan.h: In function 'perf_trace_mm_shrink_slab_start':
>> include/trace/events/vmscan.h:206:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
__entry->name = shr->name;
^
include/trace/perf.h:65:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
{ assign; } \
^~~~~~
include/trace/trace_events.h:64:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), \
^~~~~~
>> include/trace/events/vmscan.h:182:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_shrink_slab_start,
^~~~~~~~~~~
>> include/trace/events/vmscan.h:205:2: note: in expansion of macro 'TP_fast_assign'
TP_fast_assign(
^~~~~~~~~~~~~~
include/trace/events/vmscan.h: In function 'perf_trace_mm_shrink_slab_end':
include/trace/events/vmscan.h:252:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
__entry->name = shr->name;
^
include/trace/perf.h:65:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
{ assign; } \
^~~~~~
include/trace/trace_events.h:64:9: note: in expansion of macro 'PARAMS'
PARAMS(assign), \
^~~~~~
include/trace/events/vmscan.h:233:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(mm_shrink_slab_end,
^~~~~~~~~~~
include/trace/events/vmscan.h:251:2: note: in expansion of macro 'TP_fast_assign'
TP_fast_assign(
^~~~~~~~~~~~~~

vim +/const +206 include/trace/events/vmscan.h

176
177 TP_PROTO(unsigned long nr_reclaimed),
178
179 TP_ARGS(nr_reclaimed)
180 );
181
> 182 TRACE_EVENT(mm_shrink_slab_start,
183 TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
184 long nr_objects_to_shrink, unsigned long pgs_scanned,
185 unsigned long lru_pgs, unsigned long cache_items,
186 unsigned long long delta, unsigned long total_scan),
187
188 TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs,
189 cache_items, delta, total_scan),
190
191 TP_STRUCT__entry(
192 __field(char *, name)
193 __field(struct shrinker *, shr)
194 __field(void *, shrink)
195 __field(int, nid)
196 __field(long, nr_objects_to_shrink)
197 __field(gfp_t, gfp_flags)
198 __field(unsigned long, pgs_scanned)
199 __field(unsigned long, lru_pgs)
200 __field(unsigned long, cache_items)
201 __field(unsigned long long, delta)
202 __field(unsigned long, total_scan)
203 ),
204
> 205 TP_fast_assign(
> 206 __entry->name = shr->name;
207 __entry->shr = shr;
208 __entry->shrink = shr->scan_objects;
209 __entry->nid = sc->nid;
210 __entry->nr_objects_to_shrink = nr_objects_to_shrink;
211 __entry->gfp_flags = sc->gfp_mask;
212 __entry->pgs_scanned = pgs_scanned;
213 __entry->lru_pgs = lru_pgs;
214 __entry->cache_items = cache_items;
215 __entry->delta = delta;
216 __entry->total_scan = total_scan;
217 ),
218
219 TP_printk("name: %s %pF %p: nid: %d objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld",
220 __entry->name,
221 __entry->shrink,
222 __entry->shr,
223 __entry->nid,
224 __entry->nr_objects_to_shrink,
225 show_gfp_flags(__entry->gfp_flags),
226 __entry->pgs_scanned,
227 __entry->lru_pgs,
228 __entry->cache_items,
229 __entry->delta,
230 __entry->total_scan)
231 );
232
233 TRACE_EVENT(mm_shrink_slab_end,
234 TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
235 long unused_scan_cnt, long new_scan_cnt, long total_scan),
236
237 TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
238 total_scan),
239
240 TP_STRUCT__entry(
241 __field(char *, name)
242 __field(struct shrinker *, shr)
243 __field(int, nid)
244 __field(void *, shrink)
245 __field(long, unused_scan)
246 __field(long, new_scan)
247 __field(int, retval)
248 __field(long, total_scan)
249 ),
250
251 TP_fast_assign(
252 __entry->name = shr->name;
253 __entry->shr = shr;
254 __entry->nid = nid;
255 __entry->shrink = shr->scan_objects;
256 __entry->unused_scan = unused_scan_cnt;
257 __entry->new_scan = new_scan_cnt;
258 __entry->retval = shrinker_retval;
259 __entry->total_scan = total_scan;
260 ),
261
262 TP_printk("name: %s %pF %p: nid: %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
263 __entry->name,
264 __entry->shrink,
265 __entry->shr,
266 __entry->nid,
267 __entry->unused_scan,
268 __entry->new_scan,
269 __entry->total_scan,
270 __entry->retval)
271 );
272
273 DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
274
275 TP_PROTO(int order,
276 unsigned long nr_requested,
277 unsigned long nr_scanned,
278 unsigned long nr_taken,
279 isolate_mode_t isolate_mode,
280 int file),
281
282 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file),
283
284 TP_STRUCT__entry(
285 __field(int, order)
286 __field(unsigned long, nr_requested)
287 __field(unsigned long, nr_scanned)
288 __field(unsigned long, nr_taken)
289 __field(isolate_mode_t, isolate_mode)
290 __field(int, file)
291 ),
292
293 TP_fast_assign(
294 __entry->order = order;
295 __entry->nr_requested = nr_requested;
296 __entry->nr_scanned = nr_scanned;
297 __entry->nr_taken = nr_taken;
298 __entry->isolate_mode = isolate_mode;
299 __entry->file = file;
300 ),
301
302 TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d",
303 __entry->isolate_mode,
304 __entry->order,
305 __entry->nr_requested,
306 __entry->nr_scanned,
307 __entry->nr_taken,
308 __entry->file)
309 );
310
311 DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
312
313 TP_PROTO(int order,
314 unsigned long nr_requested,
315 unsigned long nr_scanned,
316 unsigned long nr_taken,
317 isolate_mode_t isolate_mode,
318 int file),
319
320 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file)
321
322 );
323
324 DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
325
326 TP_PROTO(int order,
327 unsigned long nr_requested,
328 unsigned long nr_scanned,
329 unsigned long nr_taken,
330 isolate_mode_t isolate_mode,
331 int file),
332
333 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file)
334
335 );
336
337 TRACE_EVENT(mm_vmscan_writepage,
338
339 TP_PROTO(struct page *page),
340
341 TP_ARGS(page),
342
343 TP_STRUCT__entry(
344 __field(unsigned long, pfn)
345 __field(int, reclaim_flags)
346 ),
347
348 TP_fast_assign(
349 __entry->pfn = page_to_pfn(page);
350 __entry->reclaim_flags = trace_reclaim_flags(page);
351 ),
352
353 TP_printk("page=%p pfn=%lu flags=%s",
354 pfn_to_page(__entry->pfn),
355 __entry->pfn,
356 show_reclaim_flags(__entry->reclaim_flags))
357 );
358
359 TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
360
361 TP_PROTO(struct zone *zone,
362 unsigned long nr_scanned, unsigned long nr_reclaimed,
363 int priority, int file),
364
365 TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
366
367 TP_STRUCT__entry(
368 __field(int, nid)
369 __field(int, zid)
370 __field(unsigned long, nr_scanned)
371 __field(unsigned long, nr_reclaimed)
372 __field(int, priority)
373 __field(int, reclaim_flags)
374 ),
375
376 TP_fast_assign(
377 __entry->nid = zone_to_nid(zone);
378 __entry->zid = zone_idx(zone);
379 __entry->nr_scanned = nr_scanned;
380 __entry->nr_reclaimed = nr_reclaimed;
381 __entry->priority = priority;
382 __entry->reclaim_flags = trace_shrink_flags(file);
383 ),
384
385 TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
386 __entry->nid, __entry->zid,
387 __entry->nr_scanned, __entry->nr_reclaimed,
388 __entry->priority,
389 show_reclaim_flags(__entry->reclaim_flags))
390 );
391
392 #endif /* _TRACE_VMSCAN_H */
393
394 /* This part must be outside protection */
> 395 #include <trace/define_trace.h>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 24901 bytes --]