tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git devel-drop-trace head: 40da9a24a778d94e034d160bfacf4931ae5922cd commit: 40da9a24a778d94e034d160bfacf4931ae5922cd [1/1] tracing: drop handling of NOTRACE symbol config: x86_64-allyesconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-13) 7.4.0 reproduce: git checkout 40da9a24a778d94e034d160bfacf4931ae5922cd # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): >> kernel/trace/trace_events_filter.c:2115:44: error: field 'rec' has incomplete type struct trace_event_raw_ftrace_test_filter rec; ^~~ >> kernel/trace/trace_events_filter.c:2105:14: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:14: note: (near initialization for 'test_filter_data[0].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: note: (near initialization for 'test_filter_data[0].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: note: (near initialization for 'test_filter_data[0].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: note: (near initialization for 'test_filter_data[0].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: note: (near initialization for 'test_filter_data[0].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: note: (near initialization for 'test_filter_data[0].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: note: (near initialization for 'test_filter_data[0].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: note: (near initialization for 'test_filter_data[0].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ >> kernel/trace/trace_events_filter.c:2121:2: note: in expansion of macro 'DATA_REC' DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), ^~~~~~~~ >> kernel/trace/trace_events_filter.c:2105:14: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:14: note: (near initialization for 'test_filter_data[1].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: note: (near initialization for 'test_filter_data[1].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: note: (near initialization for 'test_filter_data[1].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: note: (near initialization for 'test_filter_data[1].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: note: (near initialization for 'test_filter_data[1].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: note: (near initialization for 'test_filter_data[1].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: note: (near initialization for 'test_filter_data[1].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: note: (near initialization for 'test_filter_data[1].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2122:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), ^~~~~~~~ >> kernel/trace/trace_events_filter.c:2105:14: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:14: note: (near initialization for 'test_filter_data[2].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:23: note: (near initialization for 'test_filter_data[2].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:32: note: (near initialization for 'test_filter_data[2].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: error: field name not in record or union initializer .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2105:41: note: (near initialization for 'test_filter_data[2].rec') .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:7: note: (near initialization for 'test_filter_data[2].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:16: note: (near initialization for 'test_filter_data[2].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:25: note: (near initialization for 'test_filter_data[2].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: error: field name not in record or union initializer .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ kernel/trace/trace_events_filter.c:2106:34: note: (near initialization for 'test_filter_data[2].rec') .e = ve, .f = vf, .g = vg, .h = vh }, \ ^ kernel/trace/trace_events_filter.c:2123:2: note: in expansion of macro 'DATA_REC' DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), ^~~~~~~~ vim +/rec +2115 kernel/trace/trace_events_filter.c 1d0e78e380cd28 Jiri Olsa 2011-08-11 2101 1d0e78e380cd28 Jiri Olsa 2011-08-11 2102 #define DATA_REC(m, va, vb, vc, vd, ve, vf, vg, vh, nvisit) \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2103 { \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2104 .filter = FILTER, \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 @2105 .rec = { .a = va, .b = vb, .c = vc, .d = vd, \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 @2106 .e = ve, .f = vf, .g = vg, .h = vh }, \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2107 .match = m, \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2108 .not_visited = nvisit, \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2109 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2110 #define YES 1 1d0e78e380cd28 Jiri Olsa 2011-08-11 2111 #define NO 0 1d0e78e380cd28 Jiri Olsa 2011-08-11 2112 1d0e78e380cd28 Jiri Olsa 2011-08-11 2113 static struct test_filter_data_t { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2114 char *filter; a7237765730a10 Steven Rostedt (Red Hat 2015-05-13 @2115) struct trace_event_raw_ftrace_test_filter rec; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2116 int match; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2117 char *not_visited; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2118 } test_filter_data[] = { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2119 #define FILTER "a == 1 && b == 1 && c == 1 && d == 1 && " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2120 "e == 1 && f == 1 && g == 1 && h == 1" 1d0e78e380cd28 Jiri Olsa 2011-08-11 @2121 DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2122 DATA_REC(NO, 0, 1, 1, 1, 1, 1, 1, 1, "bcdefgh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2123 DATA_REC(NO, 1, 1, 1, 1, 1, 1, 1, 0, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2124 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2125 #define FILTER "a == 1 || b == 1 || c == 1 || d == 1 || " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2126 "e == 1 || f == 1 || g == 1 || h == 1" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2127 DATA_REC(NO, 0, 0, 0, 0, 0, 0, 0, 0, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2128 DATA_REC(YES, 0, 0, 0, 0, 0, 0, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2129 DATA_REC(YES, 1, 0, 0, 0, 0, 0, 0, 0, "bcdefgh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2130 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2131 #define FILTER "(a == 1 || b == 1) && (c == 1 || d == 1) && " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2132 "(e == 1 || f == 1) && (g == 1 || h == 1)" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2133 DATA_REC(NO, 0, 0, 1, 1, 1, 1, 1, 1, "dfh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2134 DATA_REC(YES, 0, 1, 0, 1, 0, 1, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2135 DATA_REC(YES, 1, 0, 1, 0, 0, 1, 0, 1, "bd"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2136 DATA_REC(NO, 1, 0, 1, 0, 0, 1, 0, 0, "bd"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2137 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2138 #define FILTER "(a == 1 && b == 1) || (c == 1 && d == 1) || " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2139 "(e == 1 && f == 1) || (g == 1 && h == 1)" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2140 DATA_REC(YES, 1, 0, 1, 1, 1, 1, 1, 1, "efgh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2141 DATA_REC(YES, 0, 0, 0, 0, 0, 0, 1, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2142 DATA_REC(NO, 0, 0, 0, 0, 0, 0, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2143 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2144 #define FILTER "(a == 1 && b == 1) && (c == 1 && d == 1) && " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2145 "(e == 1 && f == 1) || (g == 1 && h == 1)" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2146 DATA_REC(YES, 1, 1, 1, 1, 1, 1, 0, 0, "gh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2147 DATA_REC(NO, 0, 0, 0, 0, 0, 0, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2148 DATA_REC(YES, 1, 1, 1, 1, 1, 0, 1, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2149 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2150 #define FILTER "((a == 1 || b == 1) || (c == 1 || d == 1) || " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2151 "(e == 1 || f == 1)) && (g == 1 || h == 1)" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2152 DATA_REC(YES, 1, 1, 1, 1, 1, 1, 0, 1, "bcdef"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2153 DATA_REC(NO, 0, 0, 0, 0, 0, 0, 0, 0, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2154 DATA_REC(YES, 1, 1, 1, 1, 1, 0, 1, 1, "h"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2155 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2156 #define FILTER "((((((((a == 1) && (b == 1)) || (c == 1)) && (d == 1)) || " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2157 "(e == 1)) && (f == 1)) || (g == 1)) && (h == 1))" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2158 DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, "ceg"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2159 DATA_REC(NO, 0, 1, 0, 1, 0, 1, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2160 DATA_REC(NO, 1, 0, 1, 0, 1, 0, 1, 0, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2161 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2162 #define FILTER "((((((((a == 1) || (b == 1)) && (c == 1)) || (d == 1)) && " \ 1d0e78e380cd28 Jiri Olsa 2011-08-11 2163 "(e == 1)) || (f == 1)) && (g == 1)) || (h == 1))" 1d0e78e380cd28 Jiri Olsa 2011-08-11 2164 DATA_REC(YES, 1, 1, 1, 1, 1, 1, 1, 1, "bdfh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2165 DATA_REC(YES, 0, 1, 0, 1, 0, 1, 0, 1, ""), 1d0e78e380cd28 Jiri Olsa 2011-08-11 @2166 DATA_REC(YES, 1, 0, 1, 0, 1, 0, 1, 0, "bdfh"), 1d0e78e380cd28 Jiri Olsa 2011-08-11 2167 }; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2168 1d0e78e380cd28 Jiri Olsa 2011-08-11 2169 #undef DATA_REC 1d0e78e380cd28 Jiri Olsa 2011-08-11 2170 #undef FILTER 1d0e78e380cd28 Jiri Olsa 2011-08-11 2171 #undef YES 1d0e78e380cd28 Jiri Olsa 2011-08-11 2172 #undef NO 1d0e78e380cd28 Jiri Olsa 2011-08-11 2173 0a4d0564f0fc37 Jérémy Lefaure 2017-10-15 2174 #define DATA_CNT ARRAY_SIZE(test_filter_data) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2175 1d0e78e380cd28 Jiri Olsa 2011-08-11 2176 static int test_pred_visited; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2177 1d0e78e380cd28 Jiri Olsa 2011-08-11 2178 static int test_pred_visited_fn(struct filter_pred *pred, void *event) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2179 { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2180 struct ftrace_event_field *field = pred->field; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2181 1d0e78e380cd28 Jiri Olsa 2011-08-11 2182 test_pred_visited = 1; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2183 printk(KERN_INFO "\npred visited %s\n", field->name); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2184 return 1; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2185 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2186 80765597bc587f Steven Rostedt (VMware 2018-03-09 2187) static void update_pred_fn(struct event_filter *filter, char *fields) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2188 { 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2189) struct prog_entry *prog = rcu_dereference_protected(filter->prog, 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2190) lockdep_is_held(&event_mutex)); 80765597bc587f Steven Rostedt (VMware 2018-03-09 2191) int i; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2192 80765597bc587f Steven Rostedt (VMware 2018-03-09 2193) for (i = 0; prog[i].pred; i++) { 80765597bc587f Steven Rostedt (VMware 2018-03-09 2194) struct filter_pred *pred = prog[i].pred; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2195 struct ftrace_event_field *field = pred->field; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2196 80765597bc587f Steven Rostedt (VMware 2018-03-09 2197) WARN_ON_ONCE(!pred->fn); 80765597bc587f Steven Rostedt (VMware 2018-03-09 2198) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2199 if (!field) { 80765597bc587f Steven Rostedt (VMware 2018-03-09 2200) WARN_ONCE(1, "all leafs should have field defined %d", i); 80765597bc587f Steven Rostedt (VMware 2018-03-09 2201) continue; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2202 } 80765597bc587f Steven Rostedt (VMware 2018-03-09 2203) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2204 if (!strchr(fields, *field->name)) 80765597bc587f Steven Rostedt (VMware 2018-03-09 2205) continue; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2206 1d0e78e380cd28 Jiri Olsa 2011-08-11 2207 pred->fn = test_pred_visited_fn; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2208 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2209 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2210 1d0e78e380cd28 Jiri Olsa 2011-08-11 2211 static __init int ftrace_test_event_filter(void) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2212 { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2213 int i; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2214 1d0e78e380cd28 Jiri Olsa 2011-08-11 2215 printk(KERN_INFO "Testing ftrace filter: "); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2216 1d0e78e380cd28 Jiri Olsa 2011-08-11 2217 for (i = 0; i < DATA_CNT; i++) { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2218 struct event_filter *filter = NULL; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2219 struct test_filter_data_t *d = &test_filter_data[i]; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2220 int err; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2221 1e144d73f7295f Steven Rostedt (VMware 2019-04-01 @2222) err = create_filter(NULL, &event_ftrace_test_filter, 1e144d73f7295f Steven Rostedt (VMware 2019-04-01 2223) d->filter, false, &filter); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2224 if (err) { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2225 printk(KERN_INFO 1d0e78e380cd28 Jiri Olsa 2011-08-11 2226 "Failed to get filter for '%s', err %d\n", 1d0e78e380cd28 Jiri Olsa 2011-08-11 2227 d->filter, err); 38b78eb855409a Tejun Heo 2011-12-15 2228 __free_filter(filter); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2229 break; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2230 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2231 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2232) /* Needed to dereference filter->prog */ 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2233) mutex_lock(&event_mutex); 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2234 /* 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2235 * The preemption disabling is not really needed for self 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2236 * tests, but the rcu dereference will complain without it. 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2237 */ 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2238 preempt_disable(); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2239 if (*d->not_visited) 80765597bc587f Steven Rostedt (VMware 2018-03-09 2240) update_pred_fn(filter, d->not_visited); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2241 1d0e78e380cd28 Jiri Olsa 2011-08-11 2242 test_pred_visited = 0; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2243 err = filter_match_preds(filter, &d->rec); 86b6ef21b80ac6 Steven Rostedt 2011-08-22 2244 preempt_enable(); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2245 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2246) mutex_unlock(&event_mutex); 8ec8405f081e1e Steven Rostedt (VMware 2018-04-05 2247) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2248 __free_filter(filter); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2249 1d0e78e380cd28 Jiri Olsa 2011-08-11 2250 if (test_pred_visited) { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2251 printk(KERN_INFO 1d0e78e380cd28 Jiri Olsa 2011-08-11 2252 "Failed, unwanted pred visited for filter %s\n", 1d0e78e380cd28 Jiri Olsa 2011-08-11 2253 d->filter); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2254 break; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2255 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2256 1d0e78e380cd28 Jiri Olsa 2011-08-11 2257 if (err != d->match) { 1d0e78e380cd28 Jiri Olsa 2011-08-11 2258 printk(KERN_INFO 1d0e78e380cd28 Jiri Olsa 2011-08-11 2259 "Failed to match filter '%s', expected %d\n", 1d0e78e380cd28 Jiri Olsa 2011-08-11 2260 d->filter, d->match); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2261 break; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2262 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2263 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2264 1d0e78e380cd28 Jiri Olsa 2011-08-11 2265 if (i == DATA_CNT) 1d0e78e380cd28 Jiri Olsa 2011-08-11 2266 printk(KERN_CONT "OK\n"); 1d0e78e380cd28 Jiri Olsa 2011-08-11 2267 1d0e78e380cd28 Jiri Olsa 2011-08-11 2268 return 0; 1d0e78e380cd28 Jiri Olsa 2011-08-11 2269 } 1d0e78e380cd28 Jiri Olsa 2011-08-11 2270 :::::: The code at line 2115 was first introduced by commit :::::: a7237765730a10d429736f47ac4b89779ec6c534 tracing: Rename ftrace_raw_##call event structures to trace_event_raw_##call :::::: TO: Steven Rostedt (Red Hat) <rostedt@xxxxxxxxxxx> :::::: CC: Steven Rostedt <rostedt@xxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip