Re: [PATCH v5 21/22] tracing/boot: Add function tracer filter options

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

 



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 specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

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-trace.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/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

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 '(' before '{' 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 *buf,
               ^~~~~~~~~~~~~~~~~
   include/linux/ftrace.h:720:51: error: expected identifier or '(' before '{' 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 '(' before '{' 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 *buf,
               ^~~~~~~~~~~~~~~~~
   include/linux/ftrace.h:720:51: error: expected identifier or '(' before '{' 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 char *buf,
   252				      int len, int reset);
   253	static void __init
   254	trace_boot_set_ftrace_filter(struct trace_array *tr, struct xbc_node *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 = 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 = true;
   268			kfree(q);
   269		}
   270		xbc_node_for_each_array_value(node, "ftrace.notraces", anode, p) {
   271			q = 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 = 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 Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux