Commit 3aa23851 authored by yalin wang's avatar yalin wang Committed by Linus Torvalds

mm/vmscan.c: change trace_mm_vmscan_writepage() proto type

Move trace_reclaim_flags() into trace function, so that we don't need
caculate these flags if the trace is disabled.
Signed-off-by: default avataryalin wang <yalin.wang2010@gmail.com>
Reviewed-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0b57d6ba
...@@ -330,10 +330,9 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate, ...@@ -330,10 +330,9 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
TRACE_EVENT(mm_vmscan_writepage, TRACE_EVENT(mm_vmscan_writepage,
TP_PROTO(struct page *page, TP_PROTO(struct page *page),
int reclaim_flags),
TP_ARGS(page, reclaim_flags), TP_ARGS(page),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(unsigned long, pfn) __field(unsigned long, pfn)
...@@ -342,7 +341,7 @@ TRACE_EVENT(mm_vmscan_writepage, ...@@ -342,7 +341,7 @@ TRACE_EVENT(mm_vmscan_writepage,
TP_fast_assign( TP_fast_assign(
__entry->pfn = page_to_pfn(page); __entry->pfn = page_to_pfn(page);
__entry->reclaim_flags = reclaim_flags; __entry->reclaim_flags = trace_reclaim_flags(page);
), ),
TP_printk("page=%p pfn=%lu flags=%s", TP_printk("page=%p pfn=%lu flags=%s",
......
...@@ -594,7 +594,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping, ...@@ -594,7 +594,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
/* synchronous write or broken a_ops? */ /* synchronous write or broken a_ops? */
ClearPageReclaim(page); ClearPageReclaim(page);
} }
trace_mm_vmscan_writepage(page, trace_reclaim_flags(page)); trace_mm_vmscan_writepage(page);
inc_zone_page_state(page, NR_VMSCAN_WRITE); inc_zone_page_state(page, NR_VMSCAN_WRITE);
return PAGE_SUCCESS; return PAGE_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment