[jolsa-perf:bpf/batch 3/27] kernel/trace/fgraph.c:338:35: error: 'ftrace_graph_func' undeclared here (not in a function); did you mean 'ftrace_graph_ent'?

From: kernel test robot
Date: Fri Aug 27 2021 - 04:08:58 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: b81b17307e02f8e6d4abf87e7ec2d7e5aea1e0b5
commit: 2b71c5336e040b766d2e26c36252bb1be974d335 [3/27] x86/ftrace: Make function graph use ftrace directly
config: mips-buildonly-randconfig-r004-20210827 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=2b71c5336e040b766d2e26c36252bb1be974d335
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout 2b71c5336e040b766d2e26c36252bb1be974d335
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash kernel/trace/

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

All errors (new ones prefixed by >>):

kernel/trace/fgraph.c:234:15: warning: no previous prototype for 'ftrace_return_to_handler' [-Wmissing-prototypes]
234 | unsigned long ftrace_return_to_handler(unsigned long frame_pointer)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/fgraph.c:338:35: error: 'ftrace_graph_func' undeclared here (not in a function); did you mean 'ftrace_graph_ent'?
338 | .func = ftrace_graph_func,
| ^~~~~~~~~~~~~~~~~
| ftrace_graph_ent
>> kernel/trace/fgraph.c:341:36: error: 'FTRACE_OPS_GRAPH_STUB' undeclared here (not in a function); did you mean 'FTRACE_OPS_FL_STUB'?
341 | FTRACE_OPS_GRAPH_STUB,
| ^~~~~~~~~~~~~~~~~~~~~
| FTRACE_OPS_FL_STUB
kernel/trace/fgraph.c:349:6: warning: no previous prototype for 'ftrace_graph_sleep_time_control' [-Wmissing-prototypes]
349 | void ftrace_graph_sleep_time_control(bool enable)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +338 kernel/trace/fgraph.c

336
337 static struct ftrace_ops graph_ops = {
> 338 .func = ftrace_graph_func,
339 .flags = FTRACE_OPS_FL_INITIALIZED |
340 FTRACE_OPS_FL_PID |
> 341 FTRACE_OPS_GRAPH_STUB,
342 #ifdef FTRACE_GRAPH_TRAMP_ADDR
343 .trampoline = FTRACE_GRAPH_TRAMP_ADDR,
344 /* trampoline_size is only needed for dynamically allocated tramps */
345 #endif
346 ASSIGN_OPS_HASH(graph_ops, &global_ops.local_hash)
347 };
348

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip