tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
ftrace/fgraph-multi
head: 978dc256bd4d08df876d58b4fa01ba4cb3926242
commit: be13406cc12900ea57d62a9afcc33c4e11a1993f [34/40] function_graph: Have the
instances use their own ftrace_ops for filtering
config: parisc-randconfig-r025-20210415 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.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/rostedt/linux-trace.git/c...
git remote add trace
https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git fetch --no-tags trace ftrace/fgraph-multi
git checkout be13406cc12900ea57d62a9afcc33c4e11a1993f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/trace/fgraph.c:481:15: warning: no previous prototype for
'ftrace_return_to_handler' [-Wmissing-prototypes]
481 | unsigned long ftrace_return_to_handler(unsigned long frame_pointer)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/fgraph.c: In function 'ftrace_return_to_handler':
kernel/trace/fgraph.c:483:27: warning: variable 'ret_stack' set but not used
[-Wunused-but-set-variable]
483 | struct ftrace_ret_stack *ret_stack;
| ^~~~~~~~~
kernel/trace/fgraph.c: At top level:
kernel/trace/fgraph.c:613:6: warning: no previous prototype for
'fgraph_init_ops' [-Wmissing-prototypes]
613 | void fgraph_init_ops(struct ftrace_ops *dst_ops,
| ^~~~~~~~~~~~~~~
kernel/trace/fgraph.c:633:6: warning: no previous prototype for
'ftrace_graph_sleep_time_control' [-Wmissing-prototypes]
633 | void ftrace_graph_sleep_time_control(bool enable)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/fgraph.c:645:46: error: initialization of 'trace_func_graph_ret_t'
{aka 'void (*)(struct ftrace_graph_ret *, struct fgraph_ops *)'} from incompatible
pointer type 'void (*)(struct ftrace_graph_ret *)'
[-Werror=incompatible-pointer-types]
645 | trace_func_graph_ret_t ftrace_graph_return = ftrace_stub_graph;
| ^~~~~~~~~~~~~~~~~
kernel/trace/fgraph.c: In function 'register_ftrace_graph':
> kernel/trace/fgraph.c:833:6: warning: variable 'command'
set but not used [-Wunused-but-set-variable]
833 | int command = 0;
| ^~~~~~~
kernel/trace/fgraph.c: In function 'unregister_ftrace_graph':
kernel/trace/fgraph.c:924:23: error: assignment to 'trace_func_graph_ret_t'
{aka 'void (*)(struct ftrace_graph_ret *, struct fgraph_ops *)'} from incompatible
pointer type 'void (*)(struct ftrace_graph_ret *)'
[-Werror=incompatible-pointer-types]
924 | ftrace_graph_return = ftrace_stub_graph;
| ^
kernel/trace/fgraph.c:894:6: warning: variable 'command' set but not used
[-Wunused-but-set-variable]
894 | int command = 0;
| ^~~~~~~
cc1: some warnings being treated as errors
vim +/command +833 kernel/trace/fgraph.c
830
831 int register_ftrace_graph(struct fgraph_ops *gops)
832 {
833 int command = 0;
834 int ret = 0;
835 int i;
836
837 mutex_lock(&ftrace_lock);
838
839 if (!gops->ops.func) {
840 gops->ops.flags |= FTRACE_OPS_FL_STUB;
841 gops->ops.func = ftrace_stub;
842 #ifdef FTRACE_GRAPH_TRAMP_ADDR
843 gops->ops.trampoline = FTRACE_GRAPH_TRAMP_ADDR;
844 #endif
845 }
846
847 if (!fgraph_array[0]) {
848 /* The array must always have real data on it */
849 for (i = 0; i < FGRAPH_ARRAY_SIZE; i++) {
850 fgraph_array[i] = &fgraph_stub;
851 }
852 }
853
854 /* Look for an available spot */
855 for (i = 0; i < FGRAPH_ARRAY_SIZE; i++) {
856 if (fgraph_array[i] == &fgraph_stub)
857 break;
858 }
859 if (i >= FGRAPH_ARRAY_SIZE) {
860 ret = -EBUSY;
861 goto out;
862 }
863
864 fgraph_array[i] = gops;
865 if (i + 1 > fgraph_array_cnt)
866 fgraph_array_cnt = i + 1;
867
868 ftrace_graph_active++;
869
870 if (ftrace_graph_active == 1) {
871 register_pm_notifier(&ftrace_suspend_notifier);
872 ret = start_graph_tracing();
873 if (ret) {
874 ftrace_graph_active--;
875 goto out;
876 }
877 /*
878 * Some archs just test to see if these are not
879 * the default function
880 */
881 ftrace_graph_return = return_run;
882 ftrace_graph_entry = entry_run;
883 command = FTRACE_START_FUNC_RET;
884 }
885
886 ret = ftrace_startup(&gops->ops, command);
887 out:
888 mutex_unlock(&ftrace_lock);
889 return ret;
890 }
891
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org