[linux-next:master 11903/11991] include/linux/tracepoint.h:183:21: error: invalid storage class for function 'trace_mm_collapse_huge_page_swapin'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   66c198deda3725c57939c6cdaf2c9f5375cd79ad
commit: 94a7d3c1a7de6c62089012384e6be3286d4bfd43 [11903/11991] mm: make swapin readahead to improve thp collapse rate
config: i386-randconfig-h1-05241552 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout 94a7d3c1a7de6c62089012384e6be3286d4bfd43
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   In file included from include/trace/events/huge_memory.h:7:0,
                    from mm/huge_memory.c:66:
   include/trace/events/huge_memory.h: In function 'page_is_young':
   include/linux/tracepoint.h:199:2: error: invalid storage class for function 'register_trace_mm_collapse_huge_page_isolate'
     register_trace_##name(void (*probe)(data_proto), void *data) \
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/linux/tracepoint.h:205:2: error: invalid storage class for function 'register_trace_prio_mm_collapse_huge_page_isolate'
     register_trace_prio_##name(void (*probe)(data_proto), void *data,\
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/linux/tracepoint.h:212:2: error: invalid storage class for function 'unregister_trace_mm_collapse_huge_page_isolate'
     unregister_trace_##name(void (*probe)(data_proto), void *data) \
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/linux/tracepoint.h:218:2: error: invalid storage class for function 'check_trace_callback_type_mm_collapse_huge_page_isolate'
     check_trace_callback_type_##name(void (*cb)(data_proto)) \
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/linux/tracepoint.h:222:2: error: invalid storage class for function 'trace_mm_collapse_huge_page_isolate_enabled'
     trace_##name##_enabled(void)     \
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h: In function 'trace_mm_collapse_huge_page_isolate_enabled':
   include/trace/events/huge_memory.h:109:18: error: invalid use of undefined type 'struct tracepoint'
     TP_PROTO(struct page *page, int none_or_zero,
                     ^
   include/linux/tracepoint.h:218:46: note: in definition of macro '__DECLARE_TRACE'
     check_trace_callback_type_##name(void (*cb)(data_proto)) \
                                                 ^~~~~~~~~~
   include/linux/tracepoint.h:350:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/linux/tracepoint.h:484:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^~~~~~
   include/trace/events/huge_memory.h:107:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_isolate,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h:109:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int none_or_zero,
     ^~~~~~~~
   include/trace/events/huge_memory.h: In function 'page_is_young':
   include/linux/tracepoint.h:182:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     extern struct tracepoint __tracepoint_##name;   \
     ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
>> include/linux/tracepoint.h:183:21: error: invalid storage class for function 'trace_mm_collapse_huge_page_swapin'
     static inline void trace_##name(proto)    \
                        ^
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h: In function 'trace_mm_collapse_huge_page_swapin':
   include/trace/events/huge_memory.h:140:18: error: invalid use of undefined type 'struct tracepoint'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
                     ^
   include/linux/tracepoint.h:183:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^~~~~
   include/linux/tracepoint.h:348:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/linux/tracepoint.h:484:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h:140:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
     ^~~~~~~~
   include/trace/events/huge_memory.h:140:18: error: invalid use of undefined type 'struct tracepoint'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
                     ^
   include/linux/tracepoint.h:183:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^~~~~
   include/linux/tracepoint.h:348:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/linux/tracepoint.h:484:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h:140:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
     ^~~~~~~~
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from mm/huge_memory.c:10:
   include/linux/compiler.h:154:17: error: invalid use of undefined type 'struct tracepoint'
      static struct ftrace_branch_data   \
                    ^
   include/linux/compiler.h:149:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/tracepoint.h:185:3: note: in expansion of macro 'if'
      if (static_key_false(&__tracepoint_##name.key))  \
      ^~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/linux/cpumask.h:93:42: error: invalid use of undefined type 'struct tracepoint'
    #define cpu_online_mask   ((const struct cpumask *)&__cpu_online_mask)
                                             ^
   include/linux/compiler.h:162:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   include/linux/tracepoint.h:137:3: note: in expansion of macro 'if'
      if (!(cond))      \
      ^~
   include/linux/tracepoint.h:186:4: note: in expansion of macro '__DO_TRACE'
       __DO_TRACE(&__tracepoint_##name,  \
       ^~~~~~~~~~
   include/linux/tracepoint.h:189:5: note: in expansion of macro 'TP_CONDITION'
        TP_CONDITION(cond),,);   \
        ^~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/cpumask.h:102:50: note: in expansion of macro 'cpu_online_mask'
    #define cpu_online(cpu)  cpumask_test_cpu((cpu), cpu_online_mask)
                                                     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:349:4: note: in expansion of macro 'cpu_online'
--
                          ^~~~~~~~~~
   include/linux/compiler.h:285:2: note: in expansion of macro 'if'
     if (check)       \
     ^~
   include/linux/compiler.h:291:22: note: in expansion of macro '__READ_ONCE'
    #define READ_ONCE(x) __READ_ONCE(x, 1)
                         ^~~~~~~~~~~
   include/linux/compiler.h:551:26: note: in expansion of macro 'READ_ONCE'
     typeof(p) _________p1 = READ_ONCE(p); \
                             ^~~~~~~~~
   include/linux/rcupdate.h:603:48: note: in expansion of macro 'lockless_dereference'
     typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
                                                   ^~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:729:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_sched_held(), \
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:786:34: note: in expansion of macro 'rcu_dereference_sched_check'
    #define rcu_dereference_sched(p) rcu_dereference_sched_check(p, 0)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:192:4: note: in expansion of macro 'rcu_dereference_sched'
       rcu_dereference_sched(__tracepoint_##name.funcs);\
       ^~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/linux/compiler.h:154:17: error: invalid use of undefined type 'struct tracepoint'
      static struct ftrace_branch_data   \
                    ^
   include/linux/compiler.h:149:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/compiler.h:285:2: note: in expansion of macro 'if'
     if (check)       \
     ^~
   include/linux/compiler.h:291:22: note: in expansion of macro '__READ_ONCE'
    #define READ_ONCE(x) __READ_ONCE(x, 1)
                         ^~~~~~~~~~~
   include/linux/compiler.h:551:26: note: in expansion of macro 'READ_ONCE'
     typeof(p) _________p1 = READ_ONCE(p); \
                             ^~~~~~~~~
   include/linux/rcupdate.h:603:48: note: in expansion of macro 'lockless_dereference'
     typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
                                                   ^~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:729:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_sched_held(), \
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:786:34: note: in expansion of macro 'rcu_dereference_sched_check'
    #define rcu_dereference_sched(p) rcu_dereference_sched_check(p, 0)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:192:4: note: in expansion of macro 'rcu_dereference_sched'
       rcu_dereference_sched(__tracepoint_##name.funcs);\
       ^~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/linux/compiler.h:154:17: error: invalid use of undefined type 'struct tracepoint'
      static struct ftrace_branch_data   \
                    ^
   include/linux/compiler.h:149:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/rcupdate.h:544:3: note: in expansion of macro 'if'
      if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
      ^~
   include/linux/rcupdate.h:604:2: note: in expansion of macro 'RCU_LOCKDEP_WARN'
     RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
     ^~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:729:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_sched_held(), \
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:786:34: note: in expansion of macro 'rcu_dereference_sched_check'
    #define rcu_dereference_sched(p) rcu_dereference_sched_check(p, 0)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:192:4: note: in expansion of macro 'rcu_dereference_sched'
       rcu_dereference_sched(__tracepoint_##name.funcs);\
       ^~~~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   In file included from include/trace/events/huge_memory.h:7:0,
                    from mm/huge_memory.c:66:
   include/trace/events/huge_memory.h: In function 'page_is_young':
>> include/linux/tracepoint.h:155:21: error: invalid storage class for function 'trace_mm_collapse_huge_page_swapin_rcuidle'
     static inline void trace_##name##_rcuidle(proto)  \
                        ^
   include/linux/tracepoint.h:196:2: note: in expansion of macro '__DECLARE_TRACE_RCU'
     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h: In function 'trace_mm_collapse_huge_page_swapin_rcuidle':
   include/trace/events/huge_memory.h:140:18: error: invalid use of undefined type 'struct tracepoint'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
                     ^
   include/linux/tracepoint.h:155:44: note: in definition of macro '__DECLARE_TRACE_RCU'
     static inline void trace_##name##_rcuidle(proto)  \
                                               ^~~~~
   include/linux/tracepoint.h:196:28: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),  \
                               ^~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/linux/tracepoint.h:484:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h:140:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
     ^~~~~~~~
   include/trace/events/huge_memory.h:140:18: error: invalid use of undefined type 'struct tracepoint'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
                     ^
   include/linux/tracepoint.h:155:44: note: in definition of macro '__DECLARE_TRACE_RCU'
     static inline void trace_##name##_rcuidle(proto)  \
                                               ^~~~~
   include/linux/tracepoint.h:196:28: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),  \
                               ^~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/linux/tracepoint.h:484:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/trace/events/huge_memory.h:140:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct mm_struct *mm, int swapped_in, int ret),
     ^~~~~~~~
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from mm/huge_memory.c:10:
   include/linux/compiler.h:154:17: error: invalid use of undefined type 'struct tracepoint'
      static struct ftrace_branch_data   \
                    ^
   include/linux/compiler.h:149:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/tracepoint.h:157:3: note: in expansion of macro 'if'
      if (static_key_false(&__tracepoint_##name.key))  \
      ^~
   include/linux/tracepoint.h:196:2: note: in expansion of macro '__DECLARE_TRACE_RCU'
     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~~~~~
   include/linux/tracepoint.h:348:2: note: in expansion of macro '__DECLARE_TRACE'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
     ^~~~~~~~~~~~~~~
   include/linux/tracepoint.h:484:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^~~~~~~~~~~~~
   include/trace/events/huge_memory.h:138:1: note: in expansion of macro 'TRACE_EVENT'
    TRACE_EVENT(mm_collapse_huge_page_swapin,
    ^~~~~~~~~~~
   include/linux/cpumask.h:93:42: error: invalid use of undefined type 'struct tracepoint'
    #define cpu_online_mask   ((const struct cpumask *)&__cpu_online_mask)
                                             ^
   include/linux/compiler.h:162:16: note: in definition of macro '__trace_if'
..

vim +/trace_mm_collapse_huge_page_swapin +183 include/linux/tracepoint.h

da7b3eab Mathieu Desnoyers        2008-11-14  149  		rcu_read_unlock_sched_notrace();			\
2fbb90db Steven Rostedt           2012-02-07  150  		postrcu;						\
97e1c18e Mathieu Desnoyers        2008-07-18  151  	} while (0)
97e1c18e Mathieu Desnoyers        2008-07-18  152  
7ece55a4 Josh Triplett            2012-09-04  153  #ifndef MODULE
7ece55a4 Josh Triplett            2012-09-04  154  #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args)	\
7ece55a4 Josh Triplett            2012-09-04 @155  	static inline void trace_##name##_rcuidle(proto)		\
7ece55a4 Josh Triplett            2012-09-04  156  	{								\
7ece55a4 Josh Triplett            2012-09-04  157  		if (static_key_false(&__tracepoint_##name.key))		\
7ece55a4 Josh Triplett            2012-09-04  158  			__DO_TRACE(&__tracepoint_##name,		\
7ece55a4 Josh Triplett            2012-09-04  159  				TP_PROTO(data_proto),			\
7ece55a4 Josh Triplett            2012-09-04  160  				TP_ARGS(data_args),			\
7ece55a4 Josh Triplett            2012-09-04  161  				TP_CONDITION(cond),			\
7c9906ca Paul E. McKenney         2015-10-31  162  				rcu_irq_enter_irqson(),			\
7c9906ca Paul E. McKenney         2015-10-31  163  				rcu_irq_exit_irqson());			\
7ece55a4 Josh Triplett            2012-09-04  164  	}
7ece55a4 Josh Triplett            2012-09-04  165  #else
7ece55a4 Josh Triplett            2012-09-04  166  #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args)
7ece55a4 Josh Triplett            2012-09-04  167  #endif
7ece55a4 Josh Triplett            2012-09-04  168  
97e1c18e Mathieu Desnoyers        2008-07-18  169  /*
97e1c18e Mathieu Desnoyers        2008-07-18  170   * Make sure the alignment of the structure in the __tracepoints section will
97e1c18e Mathieu Desnoyers        2008-07-18  171   * not add unwanted padding between the beginning of the section and the
97e1c18e Mathieu Desnoyers        2008-07-18  172   * structure. Force alignment to the same alignment as the section start.
3a630178 Dave Hansen              2014-08-07  173   *
3a630178 Dave Hansen              2014-08-07  174   * When lockdep is enabled, we make sure to always do the RCU portions of
a15920be Mathieu Desnoyers        2015-11-02  175   * the tracepoint code, regardless of whether tracing is on. However,
a15920be Mathieu Desnoyers        2015-11-02  176   * don't check if the condition is false, due to interaction with idle
a15920be Mathieu Desnoyers        2015-11-02  177   * instrumentation. This lets us find RCU issues triggered with tracepoints
a15920be Mathieu Desnoyers        2015-11-02  178   * even when this tracepoint is off. This code has no purpose other than
a15920be Mathieu Desnoyers        2015-11-02  179   * poking RCU a bit.
97e1c18e Mathieu Desnoyers        2008-07-18  180   */
287050d3 Steven Rostedt           2010-12-02  181  #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
7e066fb8 Mathieu Desnoyers        2008-11-14  182  	extern struct tracepoint __tracepoint_##name;			\
97e1c18e Mathieu Desnoyers        2008-07-18 @183  	static inline void trace_##name(proto)				\
97e1c18e Mathieu Desnoyers        2008-07-18  184  	{								\
c5905afb Ingo Molnar              2012-02-24  185  		if (static_key_false(&__tracepoint_##name.key))		\
97e1c18e Mathieu Desnoyers        2008-07-18  186  			__DO_TRACE(&__tracepoint_##name,		\
38516ab5 Steven Rostedt           2010-04-20  187  				TP_PROTO(data_proto),			\
287050d3 Steven Rostedt           2010-12-02  188  				TP_ARGS(data_args),			\
2fbb90db Steven Rostedt           2012-02-07  189  				TP_CONDITION(cond),,);			\
a05d59a5 Steven Rostedt (Red Hat  2015-02-06  190) 		if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {		\
3a630178 Dave Hansen              2014-08-07  191  			rcu_read_lock_sched_notrace();			\
3a630178 Dave Hansen              2014-08-07  192  			rcu_dereference_sched(__tracepoint_##name.funcs);\
3a630178 Dave Hansen              2014-08-07  193  			rcu_read_unlock_sched_notrace();		\
3a630178 Dave Hansen              2014-08-07  194  		}							\
2fbb90db Steven Rostedt           2012-02-07  195  	}								\
7ece55a4 Josh Triplett            2012-09-04  196  	__DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),		\
7ece55a4 Josh Triplett            2012-09-04  197  		PARAMS(cond), PARAMS(data_proto), PARAMS(data_args))	\
38516ab5 Steven Rostedt           2010-04-20  198  	static inline int						\
38516ab5 Steven Rostedt           2010-04-20 @199  	register_trace_##name(void (*probe)(data_proto), void *data)	\
97e1c18e Mathieu Desnoyers        2008-07-18  200  	{								\
de7b2973 Mathieu Desnoyers        2014-04-08  201  		return tracepoint_probe_register(&__tracepoint_##name,	\
de7b2973 Mathieu Desnoyers        2014-04-08  202  						(void *)probe, data);	\
97e1c18e Mathieu Desnoyers        2008-07-18  203  	}								\
38516ab5 Steven Rostedt           2010-04-20  204  	static inline int						\
7904b5c4 Steven Rostedt (Red Hat  2015-09-22 @205) 	register_trace_prio_##name(void (*probe)(data_proto), void *data,\
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  206) 				   int prio)				\
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  207) 	{								\
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  208) 		return tracepoint_probe_register_prio(&__tracepoint_##name, \
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  209) 					      (void *)probe, data, prio); \
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  210) 	}								\
7904b5c4 Steven Rostedt (Red Hat  2015-09-22  211) 	static inline int						\
38516ab5 Steven Rostedt           2010-04-20 @212  	unregister_trace_##name(void (*probe)(data_proto), void *data)	\
97e1c18e Mathieu Desnoyers        2008-07-18  213  	{								\
de7b2973 Mathieu Desnoyers        2014-04-08  214  		return tracepoint_probe_unregister(&__tracepoint_##name,\
de7b2973 Mathieu Desnoyers        2014-04-08  215  						(void *)probe, data);	\
53da59aa Mathieu Desnoyers        2010-04-30  216  	}								\
38516ab5 Steven Rostedt           2010-04-20  217  	static inline void						\
38516ab5 Steven Rostedt           2010-04-20 @218  	check_trace_callback_type_##name(void (*cb)(data_proto))	\
53da59aa Mathieu Desnoyers        2010-04-30  219  	{								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  220) 	}								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  221) 	static inline bool						\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06 @222) 	trace_##name##_enabled(void)					\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  223) 	{								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  224) 		return static_key_false(&__tracepoint_##name.key);	\
97e1c18e Mathieu Desnoyers        2008-07-18  225  	}
97e1c18e Mathieu Desnoyers        2008-07-18  226  
65498646 Mathieu Desnoyers        2011-01-26  227  /*
65498646 Mathieu Desnoyers        2011-01-26  228   * We have no guarantee that gcc and the linker won't up-align the tracepoint
65498646 Mathieu Desnoyers        2011-01-26  229   * structures, so we create an array of pointers that will be used for iteration
65498646 Mathieu Desnoyers        2011-01-26  230   * on the tracepoints.
65498646 Mathieu Desnoyers        2011-01-26  231   */
97419875 Josh Stone               2009-08-24  232  #define DEFINE_TRACE_FN(name, reg, unreg)				 \
7e066fb8 Mathieu Desnoyers        2008-11-14  233  	static const char __tpstrtab_##name[]				 \
7e066fb8 Mathieu Desnoyers        2008-11-14  234  	__attribute__((section("__tracepoints_strings"))) = #name;	 \
7e066fb8 Mathieu Desnoyers        2008-11-14 @235  	struct tracepoint __tracepoint_##name				 \
65498646 Mathieu Desnoyers        2011-01-26  236  	__attribute__((section("__tracepoints"))) =			 \
c5905afb Ingo Molnar              2012-02-24  237  		{ __tpstrtab_##name, STATIC_KEY_INIT_FALSE, reg, unreg, NULL };\
65498646 Mathieu Desnoyers        2011-01-26  238  	static struct tracepoint * const __tracepoint_ptr_##name __used	 \
65498646 Mathieu Desnoyers        2011-01-26  239  	__attribute__((section("__tracepoints_ptrs"))) =		 \
65498646 Mathieu Desnoyers        2011-01-26  240  		&__tracepoint_##name;
97419875 Josh Stone               2009-08-24  241  
97419875 Josh Stone               2009-08-24  242  #define DEFINE_TRACE(name)						\
97419875 Josh Stone               2009-08-24 @243  	DEFINE_TRACE_FN(name, NULL, NULL);
7e066fb8 Mathieu Desnoyers        2008-11-14  244  
7e066fb8 Mathieu Desnoyers        2008-11-14  245  #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)				\
7e066fb8 Mathieu Desnoyers        2008-11-14  246  	EXPORT_SYMBOL_GPL(__tracepoint_##name)
7e066fb8 Mathieu Desnoyers        2008-11-14  247  #define EXPORT_TRACEPOINT_SYMBOL(name)					\
7e066fb8 Mathieu Desnoyers        2008-11-14  248  	EXPORT_SYMBOL(__tracepoint_##name)
7e066fb8 Mathieu Desnoyers        2008-11-14  249  
c63b7682 Tal Shorer               2015-08-01  250  #else /* !TRACEPOINTS_ENABLED */
287050d3 Steven Rostedt           2010-12-02  251  #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
97e1c18e Mathieu Desnoyers        2008-07-18  252  	static inline void trace_##name(proto)				\
97e1c18e Mathieu Desnoyers        2008-07-18  253  	{ }								\
2fbb90db Steven Rostedt           2012-02-07  254  	static inline void trace_##name##_rcuidle(proto)		\
2fbb90db Steven Rostedt           2012-02-07  255  	{ }								\
38516ab5 Steven Rostedt           2010-04-20  256  	static inline int						\
38516ab5 Steven Rostedt           2010-04-20  257  	register_trace_##name(void (*probe)(data_proto),		\
38516ab5 Steven Rostedt           2010-04-20  258  			      void *data)				\
97e1c18e Mathieu Desnoyers        2008-07-18  259  	{								\
97e1c18e Mathieu Desnoyers        2008-07-18  260  		return -ENOSYS;						\
97e1c18e Mathieu Desnoyers        2008-07-18  261  	}								\
38516ab5 Steven Rostedt           2010-04-20  262  	static inline int						\
38516ab5 Steven Rostedt           2010-04-20  263  	unregister_trace_##name(void (*probe)(data_proto),		\
38516ab5 Steven Rostedt           2010-04-20  264  				void *data)				\
c420970e Mathieu Desnoyers        2008-11-14  265  	{								\
c420970e Mathieu Desnoyers        2008-11-14  266  		return -ENOSYS;						\
53da59aa Mathieu Desnoyers        2010-04-30  267  	}								\
38516ab5 Steven Rostedt           2010-04-20  268  	static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \
53da59aa Mathieu Desnoyers        2010-04-30  269  	{								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  270) 	}								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  271) 	static inline bool						\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  272) 	trace_##name##_enabled(void)					\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  273) 	{								\
7c65bbc7 Steven Rostedt (Red Hat  2014-05-06  274) 		return false;						\
c420970e Mathieu Desnoyers        2008-11-14  275  	}
97e1c18e Mathieu Desnoyers        2008-07-18  276  
97419875 Josh Stone               2009-08-24  277  #define DEFINE_TRACE_FN(name, reg, unreg)
7e066fb8 Mathieu Desnoyers        2008-11-14  278  #define DEFINE_TRACE(name)
7e066fb8 Mathieu Desnoyers        2008-11-14  279  #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
7e066fb8 Mathieu Desnoyers        2008-11-14  280  #define EXPORT_TRACEPOINT_SYMBOL(name)
7e066fb8 Mathieu Desnoyers        2008-11-14  281  
c63b7682 Tal Shorer               2015-08-01  282  #endif /* TRACEPOINTS_ENABLED */
38516ab5 Steven Rostedt           2010-04-20  283  
3c49b52b Steven Rostedt           2014-07-25  284  #ifdef CONFIG_TRACING
3c49b52b Steven Rostedt           2014-07-25  285  /**
3c49b52b Steven Rostedt           2014-07-25  286   * tracepoint_string - register constant persistent string to trace system
3c49b52b Steven Rostedt           2014-07-25  287   * @str - a constant persistent string that will be referenced in tracepoints
3c49b52b Steven Rostedt           2014-07-25  288   *
3c49b52b Steven Rostedt           2014-07-25  289   * If constant strings are being used in tracepoints, it is faster and
3c49b52b Steven Rostedt           2014-07-25  290   * more efficient to just save the pointer to the string and reference
3c49b52b Steven Rostedt           2014-07-25  291   * that with a printf "%s" instead of saving the string in the ring buffer
3c49b52b Steven Rostedt           2014-07-25  292   * and wasting space and time.
3c49b52b Steven Rostedt           2014-07-25  293   *
3c49b52b Steven Rostedt           2014-07-25  294   * The problem with the above approach is that userspace tools that read
3c49b52b Steven Rostedt           2014-07-25  295   * the binary output of the trace buffers do not have access to the string.
3c49b52b Steven Rostedt           2014-07-25  296   * Instead they just show the address of the string which is not very
3c49b52b Steven Rostedt           2014-07-25  297   * useful to users.
3c49b52b Steven Rostedt           2014-07-25  298   *
3c49b52b Steven Rostedt           2014-07-25  299   * With tracepoint_string(), the string will be registered to the tracing
3c49b52b Steven Rostedt           2014-07-25  300   * system and exported to userspace via the debugfs/tracing/printk_formats
3c49b52b Steven Rostedt           2014-07-25  301   * file that maps the string address to the string text. This way userspace
3c49b52b Steven Rostedt           2014-07-25  302   * tools that read the binary buffers have a way to map the pointers to
3c49b52b Steven Rostedt           2014-07-25  303   * the ASCII strings they represent.
3c49b52b Steven Rostedt           2014-07-25  304   *
3c49b52b Steven Rostedt           2014-07-25  305   * The @str used must be a constant string and persistent as it would not
3c49b52b Steven Rostedt           2014-07-25  306   * make sense to show a string that no longer exists. But it is still fine
3c49b52b Steven Rostedt           2014-07-25  307   * to be used with modules, because when modules are unloaded, if they
3c49b52b Steven Rostedt           2014-07-25  308   * had tracepoints, the ring buffers are cleared too. As long as the string
3c49b52b Steven Rostedt           2014-07-25  309   * does not change during the life of the module, it is fine to use
3c49b52b Steven Rostedt           2014-07-25  310   * tracepoint_string() within a module.
3c49b52b Steven Rostedt           2014-07-25  311   */
3c49b52b Steven Rostedt           2014-07-25  312  #define tracepoint_string(str)						\
3c49b52b Steven Rostedt           2014-07-25  313  	({								\
3c49b52b Steven Rostedt           2014-07-25  314  		static const char *___tp_str __tracepoint_string = str; \
3c49b52b Steven Rostedt           2014-07-25  315  		___tp_str;						\
3c49b52b Steven Rostedt           2014-07-25  316  	})
3c49b52b Steven Rostedt           2014-07-25  317  #define __tracepoint_string	__attribute__((section("__tracepoint_str")))
3c49b52b Steven Rostedt           2014-07-25  318  #else
3c49b52b Steven Rostedt           2014-07-25  319  /*
3c49b52b Steven Rostedt           2014-07-25  320   * tracepoint_string() is used to save the string address for userspace
3c49b52b Steven Rostedt           2014-07-25  321   * tracing tools. When tracing isn't configured, there's no need to save
3c49b52b Steven Rostedt           2014-07-25  322   * anything.
3c49b52b Steven Rostedt           2014-07-25  323   */
3c49b52b Steven Rostedt           2014-07-25  324  # define tracepoint_string(str) str
3c49b52b Steven Rostedt           2014-07-25  325  # define __tracepoint_string
3c49b52b Steven Rostedt           2014-07-25  326  #endif
3c49b52b Steven Rostedt           2014-07-25  327  
38516ab5 Steven Rostedt           2010-04-20  328  /*
38516ab5 Steven Rostedt           2010-04-20  329   * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype
38516ab5 Steven Rostedt           2010-04-20  330   * (void). "void" is a special value in a function prototype and can
38516ab5 Steven Rostedt           2010-04-20  331   * not be combined with other arguments. Since the DECLARE_TRACE()
38516ab5 Steven Rostedt           2010-04-20  332   * macro adds a data element at the beginning of the prototype,
38516ab5 Steven Rostedt           2010-04-20  333   * we need a way to differentiate "(void *data, proto)" from
38516ab5 Steven Rostedt           2010-04-20  334   * "(void *data, void)". The second prototype is invalid.
38516ab5 Steven Rostedt           2010-04-20  335   *
38516ab5 Steven Rostedt           2010-04-20  336   * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype
38516ab5 Steven Rostedt           2010-04-20  337   * and "void *__data" as the callback prototype.
38516ab5 Steven Rostedt           2010-04-20  338   *
38516ab5 Steven Rostedt           2010-04-20  339   * DECLARE_TRACE() passes "proto" as the tracepoint protoype and
38516ab5 Steven Rostedt           2010-04-20  340   * "void *__data, proto" as the callback prototype.
38516ab5 Steven Rostedt           2010-04-20  341   */
38516ab5 Steven Rostedt           2010-04-20  342  #define DECLARE_TRACE_NOARGS(name)					\
dc17147d Steven Rostedt (Red Hat  2016-03-09  343) 	__DECLARE_TRACE(name, void, ,					\
dc17147d Steven Rostedt (Red Hat  2016-03-09  344) 			cpu_online(raw_smp_processor_id()),		\
dc17147d Steven Rostedt (Red Hat  2016-03-09  345) 			void *__data, __data)
38516ab5 Steven Rostedt           2010-04-20  346  
38516ab5 Steven Rostedt           2010-04-20  347  #define DECLARE_TRACE(name, proto, args)				\
dc17147d Steven Rostedt (Red Hat  2016-03-09 @348) 	__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),		\
dc17147d Steven Rostedt (Red Hat  2016-03-09  349) 			cpu_online(raw_smp_processor_id()),		\
287050d3 Steven Rostedt           2010-12-02  350  			PARAMS(void *__data, proto),			\
287050d3 Steven Rostedt           2010-12-02  351  			PARAMS(__data, args))

:::::: The code at line 183 was first introduced by commit
:::::: 97e1c18e8d17bd87e1e383b2e9d9fc740332c8e2 tracing: Kernel Tracepoints

:::::: TO: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxx>

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]