summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-02-22 18:44:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 19:41:29 -0500
commit32b3f2974adca13f8a4a610c396e88c6f81eb10e (patch)
treeb3fbd6cd88e5dce6706e6c43a584d05275b91e0e /include/trace
parent1265e3a69f1ea97357536773d48c92a409e01eaf (diff)
mm, vmscan: show LRU name in mm_vmscan_lru_isolate tracepoint
mm_vmscan_lru_isolate currently prints only whether the LRU we isolate from is file or anonymous but we do not know which LRU this is. It is useful to know whether the list is active or inactive, since we are using the same function to isolate pages from both of them and it's hard to distinguish otherwise. Link: http://lkml.kernel.org/r/20170104101942.4860-5-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Mel Gorman <mgorman@suse.de> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/mmflags.h8
-rw-r--r--include/trace/events/vmscan.h12
2 files changed, 14 insertions, 6 deletions
diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
index 91554faed17e..304ff94363b2 100644
--- a/include/trace/events/mmflags.h
+++ b/include/trace/events/mmflags.h
@@ -239,6 +239,13 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY, "softdirty" ) \
239 IFDEF_ZONE_HIGHMEM( EM (ZONE_HIGHMEM,"HighMem")) \ 239 IFDEF_ZONE_HIGHMEM( EM (ZONE_HIGHMEM,"HighMem")) \
240 EMe(ZONE_MOVABLE,"Movable") 240 EMe(ZONE_MOVABLE,"Movable")
241 241
242#define LRU_NAMES \
243 EM (LRU_INACTIVE_ANON, "inactive_anon") \
244 EM (LRU_ACTIVE_ANON, "active_anon") \
245 EM (LRU_INACTIVE_FILE, "inactive_file") \
246 EM (LRU_ACTIVE_FILE, "active_file") \
247 EMe(LRU_UNEVICTABLE, "unevictable")
248
242/* 249/*
243 * First define the enums in the above macros to be exported to userspace 250 * First define the enums in the above macros to be exported to userspace
244 * via TRACE_DEFINE_ENUM(). 251 * via TRACE_DEFINE_ENUM().
@@ -252,6 +259,7 @@ COMPACTION_STATUS
252COMPACTION_PRIORITY 259COMPACTION_PRIORITY
253COMPACTION_FEEDBACK 260COMPACTION_FEEDBACK
254ZONE_TYPE 261ZONE_TYPE
262LRU_NAMES
255 263
256/* 264/*
257 * Now redefine the EM() and EMe() macros to map the enums to the strings 265 * Now redefine the EM() and EMe() macros to map the enums to the strings
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 340b3c4ef4a8..4af0bf70e07e 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -277,9 +277,9 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
277 unsigned long nr_skipped, 277 unsigned long nr_skipped,
278 unsigned long nr_taken, 278 unsigned long nr_taken,
279 isolate_mode_t isolate_mode, 279 isolate_mode_t isolate_mode,
280 int file), 280 int lru),
281 281
282 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, file), 282 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, lru),
283 283
284 TP_STRUCT__entry( 284 TP_STRUCT__entry(
285 __field(int, classzone_idx) 285 __field(int, classzone_idx)
@@ -289,7 +289,7 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
289 __field(unsigned long, nr_skipped) 289 __field(unsigned long, nr_skipped)
290 __field(unsigned long, nr_taken) 290 __field(unsigned long, nr_taken)
291 __field(isolate_mode_t, isolate_mode) 291 __field(isolate_mode_t, isolate_mode)
292 __field(int, file) 292 __field(int, lru)
293 ), 293 ),
294 294
295 TP_fast_assign( 295 TP_fast_assign(
@@ -300,10 +300,10 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
300 __entry->nr_skipped = nr_skipped; 300 __entry->nr_skipped = nr_skipped;
301 __entry->nr_taken = nr_taken; 301 __entry->nr_taken = nr_taken;
302 __entry->isolate_mode = isolate_mode; 302 __entry->isolate_mode = isolate_mode;
303 __entry->file = file; 303 __entry->lru = lru;
304 ), 304 ),
305 305
306 TP_printk("isolate_mode=%d classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu file=%d", 306 TP_printk("isolate_mode=%d classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s",
307 __entry->isolate_mode, 307 __entry->isolate_mode,
308 __entry->classzone_idx, 308 __entry->classzone_idx,
309 __entry->order, 309 __entry->order,
@@ -311,7 +311,7 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
311 __entry->nr_scanned, 311 __entry->nr_scanned,
312 __entry->nr_skipped, 312 __entry->nr_skipped,
313 __entry->nr_taken, 313 __entry->nr_taken,
314 __entry->file) 314 __print_symbolic(__entry->lru, LRU_NAMES))
315); 315);
316 316
317TRACE_EVENT(mm_vmscan_writepage, 317TRACE_EVENT(mm_vmscan_writepage,