Re: [PATCH 2/3] mm, page_owner: Add page_owner_stacks file to print out only stacks and their counter
From: kernel test robot
Date: Thu Sep 01 2022 - 20:57:18 EST
Hi Oscar,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.0-rc3]
[cannot apply to akpm-mm/mm-everything next-20220901]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Oscar-Salvador/page_owner-print-stacks-and-their-counter/20220901-124408
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c5e4d5e99162ba8025d58a3af7ad103f155d2df7
config: arc-randconfig-r043-20220901 (https://download.01.org/0day-ci/archive/20220902/202209020818.s1RIxKyP-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/18d3054fb57a70676be763adab8c8881a1baa504
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Oscar-Salvador/page_owner-print-stacks-and-their-counter/20220901-124408
git checkout 18d3054fb57a70676be763adab8c8881a1baa504
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
lib/stackdepot.c: In function 'stack_depot_print_stacks_threshold':
>> lib/stackdepot.c:603:17: error: 'STACK_HASH_SIZE' undeclared (first use in this function); did you mean 'STACK_HASH_SEED'?
603 | if (i < STACK_HASH_SIZE)
| ^~~~~~~~~~~~~~~
| STACK_HASH_SEED
lib/stackdepot.c:603:17: note: each undeclared identifier is reported only once for each function it appears in
vim +603 lib/stackdepot.c
568
569 int stack_depot_print_stacks_threshold(char *buf, size_t size, loff_t *pos,
570 unsigned long *last_stack)
571 {
572 struct stack_record *stack = NULL, *last;
573 struct stack_record **stacks;
574 int i = *pos, ret = 0;
575
576 /* Continue from the last week if we have one */
577 if (*last_stack) {
578 last = (struct stack_record *)*last_stack;
579 stack = last->next;
580 } else {
581 new_table:
582 stacks = &stack_table[i];
583 stack = (struct stack_record *)stacks;
584 }
585
586 for (; stack; stack = stack->next) {
587 if (!stack->size || stack->size < 0 ||
588 stack->size > size || stack->handle.valid != 1 ||
589 refcount_read(&stack->count) < 1)
590 continue;
591
592 ret += stack_trace_snprint(buf, size, stack->entries, stack->size, 0);
593 ret += scnprintf(buf + ret, size - ret, "stack count: %d\n\n",
594 refcount_read(&stack->count));
595 *last_stack = (unsigned long)stack;
596 return ret;
597 }
598
599 i++;
600 *pos = i;
601
602 /* Keep looking all tables for valid stacks */
> 603 if (i < STACK_HASH_SIZE)
--
0-DAY CI Kernel Test Service
https://01.org/lkp