Content-Type: multipart/mixed; boundary="===============4170248928846487306==" MIME-Version: 1.0 From: Masami Hiramatsu To: kbuild-all@lists.01.org Subject: Re: [PATCH v5 21/22] tracing/boot: Add function tracer filter options Date: Fri, 27 Dec 2019 11:56:39 +0900 Message-ID: <20191227115639.d6c33d51d2b10f33dbd05796@kernel.org> In-Reply-To: <201912270227.Dwa2YddH%lkp@intel.com> List-Id: --===============4170248928846487306== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Oops, the ftrace_set_filter/notrace_filter depend on CONFIG_DYNAMIC_FTRACE,= not CONFIG_FUNCTION_TRACER Thanks, I'll fix it. On Fri, 27 Dec 2019 02:05:11 +0800 kbuild test robot wrote: > Hi Masami, > = > I love your patch! Yet something to improve: > = > [auto build test ERROR on trace/for-next] > [also build test ERROR on lwn/docs-next linus/master v5.5-rc3] > [cannot apply to tip/perf/core next-20191220] > [if your patch is applied to the wrong git tree, please drop us a note to= help > improve the system. BTW, we also suggest to use '--base' option to specif= y the > base tree in git format-patch, please see https://stackoverflow.com/a/374= 06982] > = > url: https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/tracing= -bootconfig-Boot-time-tracing-and-Extra-boot-config/20191227-002009 > base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-tra= ce.git for-next > config: xtensa-allyesconfig (attached as .config) > compiler: xtensa-linux-gcc (GCC) 7.5.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=3D7.5.0 make.cross ARCH=3Dxtensa = > = > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > = > All error/warnings (new ones prefixed by >>): > = > In file included from kernel/trace/trace_boot.c:9:0: > >> include/linux/ftrace.h:719:50: error: expected identifier or '(' befor= e '{' token > #define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) > ^ > >> kernel/trace/trace_boot.c:249:12: note: in expansion of macro 'ftrace_= set_filter' > extern int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *b= uf, > ^~~~~~~~~~~~~~~~~ > include/linux/ftrace.h:720:51: error: expected identifier or '(' befor= e '{' token > #define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) > ^ > >> kernel/trace/trace_boot.c:251:12: note: in expansion of macro 'ftrace_= set_notrace' > extern int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *= buf, > ^~~~~~~~~~~~~~~~~~ > -- > In file included from kernel//trace/trace_boot.c:9:0: > >> include/linux/ftrace.h:719:50: error: expected identifier or '(' befor= e '{' token > #define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) > ^ > kernel//trace/trace_boot.c:249:12: note: in expansion of macro 'ftrace= _set_filter' > extern int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *b= uf, > ^~~~~~~~~~~~~~~~~ > include/linux/ftrace.h:720:51: error: expected identifier or '(' befor= e '{' token > #define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) > ^ > kernel//trace/trace_boot.c:251:12: note: in expansion of macro 'ftrace= _set_notrace' > extern int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *= buf, > ^~~~~~~~~~~~~~~~~~ > = > vim +/ftrace_set_filter +249 kernel/trace/trace_boot.c > = > 246 = > 247 #ifdef CONFIG_FUNCTION_TRACER > 248 extern bool ftrace_filter_param __initdata; > > 249 extern int ftrace_set_filter(struct ftrace_ops *ops, unsigned char= *buf, > 250 int len, int reset); > > 251 extern int ftrace_set_notrace(struct ftrace_ops *ops, unsigned cha= r *buf, > 252 int len, int reset); > 253 static void __init > 254 trace_boot_set_ftrace_filter(struct trace_array *tr, struct xbc_no= de *node) > 255 { > 256 struct xbc_node *anode; > 257 const char *p; > 258 char *q; > 259 = > 260 xbc_node_for_each_array_value(node, "ftrace.filters", anode, p) { > 261 q =3D kstrdup(p, GFP_KERNEL); > 262 if (!q) > 263 return; > 264 if (ftrace_set_filter(tr->ops, q, strlen(q), 0) < 0) > 265 pr_err("Failed to add %s to ftrace filter\n", p); > 266 else > 267 ftrace_filter_param =3D true; > 268 kfree(q); > 269 } > 270 xbc_node_for_each_array_value(node, "ftrace.notraces", anode, p) { > 271 q =3D kstrdup(p, GFP_KERNEL); > 272 if (!q) > 273 return; > 274 if (ftrace_set_notrace(tr->ops, q, strlen(q), 0) < 0) > 275 pr_err("Failed to add %s to ftrace filter\n", p); > 276 else > 277 ftrace_filter_param =3D true; > 278 kfree(q); > 279 } > 280 } > 281 #else > 282 #define trace_boot_set_ftrace_filter(tr, node) do {} while (0) > 283 #endif > 284 = > = > --- > 0-DAY kernel test infrastructure Open Source Technology C= enter > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corp= oration -- = Masami Hiramatsu --===============4170248928846487306==--