* [linux-next:master 5677/13217] kernel/sched/ext.c:3339:18: error: implicit declaration of function 'stack_trace_save_tsk'
@ 2024-07-16 10:48 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-16 10:48 UTC (permalink / raw)
To: Tejun Heo; +Cc: oe-kbuild-all, Linux Memory Management List, David Vernet
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4f40be61af99a67d5580c1448acd9b74c0376389
commit: 07814a9439a3b03d79a1001614b5bc1cab69bcec [5677/13217] sched_ext: Print debug dump after an error exit
config: sparc-randconfig-r052-20240716 (https://download.01.org/0day-ci/archive/20240716/202407161844.reewQQrR-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240716/202407161844.reewQQrR-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407161844.reewQQrR-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/rhashtable-types.h:12,
from include/linux/sched/ext.h:13,
from include/linux/sched.h:83,
from include/linux/sched/signal.h:7,
from include/linux/sched/cputime.h:5,
from kernel/sched/build_policy.c:17:
kernel/sched/ext.c: In function 'alloc_exit_info':
kernel/sched/ext.c:2982:32: warning: 'kmalloc_array_noprof' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^
include/linux/alloc_tag.h:206:16: note: in definition of macro 'alloc_hooks_tag'
206 | typeof(_do_alloc) _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:701:49: note: in expansion of macro 'alloc_hooks'
701 | #define kmalloc_array(...) alloc_hooks(kmalloc_array_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/slab.h:730:41: note: in expansion of macro 'kmalloc_array'
730 | #define kcalloc(n, size, flags) kmalloc_array(n, size, (flags) | __GFP_ZERO)
| ^~~~~~~~~~~~~
kernel/sched/ext.c:2982:18: note: in expansion of macro 'kcalloc'
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^~~~~~~
kernel/sched/ext.c:2982:32: note: earlier argument should specify number of elements, later size of each element
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^
include/linux/alloc_tag.h:206:16: note: in definition of macro 'alloc_hooks_tag'
206 | typeof(_do_alloc) _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:701:49: note: in expansion of macro 'alloc_hooks'
701 | #define kmalloc_array(...) alloc_hooks(kmalloc_array_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/slab.h:730:41: note: in expansion of macro 'kmalloc_array'
730 | #define kcalloc(n, size, flags) kmalloc_array(n, size, (flags) | __GFP_ZERO)
| ^~~~~~~~~~~~~
kernel/sched/ext.c:2982:18: note: in expansion of macro 'kcalloc'
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^~~~~~~
kernel/sched/ext.c:2982:32: warning: 'kmalloc_array_noprof' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^
include/linux/alloc_tag.h:206:34: note: in definition of macro 'alloc_hooks_tag'
206 | typeof(_do_alloc) _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:701:49: note: in expansion of macro 'alloc_hooks'
701 | #define kmalloc_array(...) alloc_hooks(kmalloc_array_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/slab.h:730:41: note: in expansion of macro 'kmalloc_array'
730 | #define kcalloc(n, size, flags) kmalloc_array(n, size, (flags) | __GFP_ZERO)
| ^~~~~~~~~~~~~
kernel/sched/ext.c:2982:18: note: in expansion of macro 'kcalloc'
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^~~~~~~
kernel/sched/ext.c:2982:32: note: earlier argument should specify number of elements, later size of each element
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^
include/linux/alloc_tag.h:206:34: note: in definition of macro 'alloc_hooks_tag'
206 | typeof(_do_alloc) _res = _do_alloc; \
| ^~~~~~~~~
include/linux/slab.h:701:49: note: in expansion of macro 'alloc_hooks'
701 | #define kmalloc_array(...) alloc_hooks(kmalloc_array_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/slab.h:730:41: note: in expansion of macro 'kmalloc_array'
730 | #define kcalloc(n, size, flags) kmalloc_array(n, size, (flags) | __GFP_ZERO)
| ^~~~~~~~~~~~~
kernel/sched/ext.c:2982:18: note: in expansion of macro 'kcalloc'
2982 | ei->bt = kcalloc(sizeof(ei->bt[0]), SCX_EXIT_BT_LEN, GFP_KERNEL);
| ^~~~~~~
In file included from kernel/sched/build_policy.c:62:
kernel/sched/ext.c: In function 'scx_ops_disable_workfn':
kernel/sched/ext.c:3126:17: error: implicit declaration of function 'stack_trace_print'; did you mean 'event_trace_printk'? [-Wimplicit-function-declaration]
3126 | stack_trace_print(ei->bt, ei->bt_len, 2);
| ^~~~~~~~~~~~~~~~~
| event_trace_printk
kernel/sched/ext.c: In function 'scx_dump_task':
>> kernel/sched/ext.c:3339:18: error: implicit declaration of function 'stack_trace_save_tsk' [-Wimplicit-function-declaration]
3339 | bt_len = stack_trace_save_tsk(p, bt, SCX_EXIT_BT_LEN, 1);
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/ext.c: In function 'scx_ops_exit_kind':
kernel/sched/ext.c:3485:30: error: implicit declaration of function 'stack_trace_save'; did you mean 'stack_tracer_enable'? [-Wimplicit-function-declaration]
3485 | ei->bt_len = stack_trace_save(ei->bt, SCX_EXIT_BT_LEN, 1);
| ^~~~~~~~~~~~~~~~
| stack_tracer_enable
vim +/stack_trace_save_tsk +3339 kernel/sched/ext.c
3308
3309 static void scx_dump_task(struct seq_buf *s, struct scx_dump_ctx *dctx,
3310 struct task_struct *p, char marker)
3311 {
3312 static unsigned long bt[SCX_EXIT_BT_LEN];
3313 char dsq_id_buf[19] = "(n/a)";
3314 unsigned long ops_state = atomic_long_read(&p->scx.ops_state);
3315 unsigned int bt_len;
3316
3317 if (p->scx.dsq)
3318 scnprintf(dsq_id_buf, sizeof(dsq_id_buf), "0x%llx",
3319 (unsigned long long)p->scx.dsq->id);
3320
3321 dump_newline(s);
3322 dump_line(s, " %c%c %s[%d] %+ldms",
3323 marker, task_state_to_char(p), p->comm, p->pid,
3324 jiffies_delta_msecs(p->scx.runnable_at, dctx->at_jiffies));
3325 dump_line(s, " scx_state/flags=%u/0x%x ops_state/qseq=%lu/%lu",
3326 scx_get_task_state(p), p->scx.flags & ~SCX_TASK_STATE_MASK,
3327 ops_state & SCX_OPSS_STATE_MASK,
3328 ops_state >> SCX_OPSS_QSEQ_SHIFT);
3329 dump_line(s, " sticky/holding_cpu=%d/%d dsq_id=%s",
3330 p->scx.sticky_cpu, p->scx.holding_cpu, dsq_id_buf);
3331 dump_line(s, " cpus=%*pb", cpumask_pr_args(p->cpus_ptr));
3332
3333 if (SCX_HAS_OP(dump_task)) {
3334 ops_dump_init(s, " ");
3335 SCX_CALL_OP(SCX_KF_REST, dump_task, dctx, p);
3336 ops_dump_exit();
3337 }
3338
> 3339 bt_len = stack_trace_save_tsk(p, bt, SCX_EXIT_BT_LEN, 1);
3340 if (bt_len) {
3341 dump_newline(s);
3342 dump_stack_trace(s, " ", bt, bt_len);
3343 }
3344 }
3345
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-16 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-16 10:48 [linux-next:master 5677/13217] kernel/sched/ext.c:3339:18: error: implicit declaration of function 'stack_trace_save_tsk' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).