On Tue, Feb 26, 2019 at 8:32 PM Vlastimil Babka <vbabka@xxxxxxx> wrote: > > On 2/26/19 7:19 AM, Yafang Shao wrote: > > The file trace/events/compaction.h is included only when > > CONFIG_COMPACTION is defined, so it is unnecessary to use > > CONFIG_COMPACTION again in this file. > > Are you sure? What about CONFIG_CMA? > Oops. My bad. Sorry about the noise. > #if defined CONFIG_COMPACTION || defined CONFIG_CMA > > #define CREATE_TRACE_POINTS > #include <trace/events/compaction.h> > > > > Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx> > > --- > > include/trace/events/compaction.h | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h > > index 6074eff..06fb680 100644 > > --- a/include/trace/events/compaction.h > > +++ b/include/trace/events/compaction.h > > @@ -132,7 +132,6 @@ > > __entry->sync ? "sync" : "async") > > ); > > > > -#ifdef CONFIG_COMPACTION > > TRACE_EVENT(mm_compaction_end, > > TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn, > > unsigned long free_pfn, unsigned long zone_end, bool sync, > > @@ -166,7 +165,6 @@ > > __entry->sync ? "sync" : "async", > > __print_symbolic(__entry->status, COMPACTION_STATUS)) > > ); > > -#endif > > > > TRACE_EVENT(mm_compaction_try_to_compact_pages, > > > > @@ -195,7 +193,6 @@ > > __entry->prio) > > ); > > > > -#ifdef CONFIG_COMPACTION > > DECLARE_EVENT_CLASS(mm_compaction_suitable_template, > > > > TP_PROTO(struct zone *zone, > > @@ -296,7 +293,6 @@ > > > > TP_ARGS(zone, order) > > ); > > -#endif > > > > TRACE_EVENT(mm_compaction_kcompactd_sleep, > > > > >