[linux-next:master 690/8423] kernel/trace/trace_events_hist.c:4594:13: warning: stack frame size (1280) exceeds limit (1024) in function 'hist_trigger_print_key'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b9011c7e671dbbf59bb753283ddfd03f0c9eb865
commit: f2f6175186f4ccd33a710f4cd557676a5cc60153 [690/8423] kallsyms: increase maximum kernel symbol length to 512
config: arm-randconfig-r034-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f2f6175186f4ccd33a710f4cd557676a5cc60153
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout f2f6175186f4ccd33a710f4cd557676a5cc60153
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

   kernel/trace/trace_events_hist.c:5228:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
           int ret;
               ^
>> kernel/trace/trace_events_hist.c:4594:13: warning: stack frame size (1280) exceeds limit (1024) in function 'hist_trigger_print_key' [-Wframe-larger-than]
   static void hist_trigger_print_key(struct seq_file *m,
               ^
   2 warnings generated.


vim +/hist_trigger_print_key +4594 kernel/trace/trace_events_hist.c

69a0200c2e25d6 Tom Zanussi  2016-03-03  4593  
a3785b7eca8fd4 Tom Zanussi  2019-02-13 @4594  static void hist_trigger_print_key(struct seq_file *m,
a3785b7eca8fd4 Tom Zanussi  2019-02-13  4595  				   struct hist_trigger_data *hist_data,
a3785b7eca8fd4 Tom Zanussi  2019-02-13  4596  				   void *key,
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4597  				   struct tracing_map_elt *elt)
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4598  {
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4599  	struct hist_field *key_field;
c6afad49d127f6 Tom Zanussi  2016-03-03  4600  	char str[KSYM_SYMBOL_LEN];
69a0200c2e25d6 Tom Zanussi  2016-03-03  4601  	bool multiline = false;
85013256cf0162 Tom Zanussi  2017-09-22  4602  	const char *field_name;
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4603  	unsigned int i;
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4604  	u64 uval;
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4605  
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4606  	seq_puts(m, "{ ");
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4607  
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4608  	for_each_hist_key_field(i, hist_data) {
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4609  		key_field = hist_data->fields[i];
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4610  
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4611  		if (i > hist_data->n_vals)
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4612  			seq_puts(m, ", ");
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4613  
85013256cf0162 Tom Zanussi  2017-09-22  4614  		field_name = hist_field_name(key_field, 0);
85013256cf0162 Tom Zanussi  2017-09-22  4615  
0c4a6b4666e8eb Tom Zanussi  2016-03-03  4616  		if (key_field->flags & HIST_FIELD_FL_HEX) {
0c4a6b4666e8eb Tom Zanussi  2016-03-03  4617  			uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi  2017-09-22  4618  			seq_printf(m, "%s: %llx", field_name, uval);
c6afad49d127f6 Tom Zanussi  2016-03-03  4619  		} else if (key_field->flags & HIST_FIELD_FL_SYM) {
c6afad49d127f6 Tom Zanussi  2016-03-03  4620  			uval = *(u64 *)(key + key_field->offset);
c6afad49d127f6 Tom Zanussi  2016-03-03  4621  			sprint_symbol_no_offset(str, uval);
85013256cf0162 Tom Zanussi  2017-09-22  4622  			seq_printf(m, "%s: [%llx] %-45s", field_name,
85013256cf0162 Tom Zanussi  2017-09-22  4623  				   uval, str);
c6afad49d127f6 Tom Zanussi  2016-03-03  4624  		} else if (key_field->flags & HIST_FIELD_FL_SYM_OFFSET) {
c6afad49d127f6 Tom Zanussi  2016-03-03  4625  			uval = *(u64 *)(key + key_field->offset);
c6afad49d127f6 Tom Zanussi  2016-03-03  4626  			sprint_symbol(str, uval);
85013256cf0162 Tom Zanussi  2017-09-22  4627  			seq_printf(m, "%s: [%llx] %-55s", field_name,
85013256cf0162 Tom Zanussi  2017-09-22  4628  				   uval, str);
6b4827ad028a1a Tom Zanussi  2016-03-03  4629  		} else if (key_field->flags & HIST_FIELD_FL_EXECNAME) {
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4630  			struct hist_elt_data *elt_data = elt->private_data;
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4631  			char *comm;
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4632  
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4633  			if (WARN_ON_ONCE(!elt_data))
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4634  				return;
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4635  
af6a29bcaf8ff2 Tom Zanussi  2018-01-15  4636  			comm = elt_data->comm;
6b4827ad028a1a Tom Zanussi  2016-03-03  4637  
6b4827ad028a1a Tom Zanussi  2016-03-03  4638  			uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi  2017-09-22  4639  			seq_printf(m, "%s: %-16s[%10llu]", field_name,
85013256cf0162 Tom Zanussi  2017-09-22  4640  				   comm, uval);
316961988b5ec7 Tom Zanussi  2016-03-03  4641  		} else if (key_field->flags & HIST_FIELD_FL_SYSCALL) {
316961988b5ec7 Tom Zanussi  2016-03-03  4642  			const char *syscall_name;
316961988b5ec7 Tom Zanussi  2016-03-03  4643  
316961988b5ec7 Tom Zanussi  2016-03-03  4644  			uval = *(u64 *)(key + key_field->offset);
316961988b5ec7 Tom Zanussi  2016-03-03  4645  			syscall_name = get_syscall_name(uval);
316961988b5ec7 Tom Zanussi  2016-03-03  4646  			if (!syscall_name)
316961988b5ec7 Tom Zanussi  2016-03-03  4647  				syscall_name = "unknown_syscall";
316961988b5ec7 Tom Zanussi  2016-03-03  4648  
85013256cf0162 Tom Zanussi  2017-09-22  4649  			seq_printf(m, "%s: %-30s[%3llu]", field_name,
85013256cf0162 Tom Zanussi  2017-09-22  4650  				   syscall_name, uval);
69a0200c2e25d6 Tom Zanussi  2016-03-03  4651  		} else if (key_field->flags & HIST_FIELD_FL_STACKTRACE) {
69a0200c2e25d6 Tom Zanussi  2016-03-03  4652  			seq_puts(m, "stacktrace:\n");
69a0200c2e25d6 Tom Zanussi  2016-03-03  4653  			hist_trigger_stacktrace_print(m,
69a0200c2e25d6 Tom Zanussi  2016-03-03  4654  						      key + key_field->offset,
69a0200c2e25d6 Tom Zanussi  2016-03-03  4655  						      HIST_STACKTRACE_DEPTH);
69a0200c2e25d6 Tom Zanussi  2016-03-03  4656  			multiline = true;
4b94f5b7b4a5ff Namhyung Kim 2016-03-03  4657  		} else if (key_field->flags & HIST_FIELD_FL_LOG2) {
85013256cf0162 Tom Zanussi  2017-09-22  4658  			seq_printf(m, "%s: ~ 2^%-2llu", field_name,
4b94f5b7b4a5ff Namhyung Kim 2016-03-03  4659  				   *(u64 *)(key + key_field->offset));
0c4a6b4666e8eb Tom Zanussi  2016-03-03  4660  		} else if (key_field->flags & HIST_FIELD_FL_STRING) {
85013256cf0162 Tom Zanussi  2017-09-22  4661  			seq_printf(m, "%s: %-50s", field_name,
76a3b0c8ac344e Tom Zanussi  2016-03-03  4662  				   (char *)(key + key_field->offset));
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4663  		} else {
76a3b0c8ac344e Tom Zanussi  2016-03-03  4664  			uval = *(u64 *)(key + key_field->offset);
85013256cf0162 Tom Zanussi  2017-09-22  4665  			seq_printf(m, "%s: %10llu", field_name, uval);
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4666  		}
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4667  	}
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4668  
69a0200c2e25d6 Tom Zanussi  2016-03-03  4669  	if (!multiline)
69a0200c2e25d6 Tom Zanussi  2016-03-03  4670  		seq_puts(m, " ");
69a0200c2e25d6 Tom Zanussi  2016-03-03  4671  
7ef224d1d0e3a1 Tom Zanussi  2016-03-03  4672  	seq_puts(m, "}");
a3785b7eca8fd4 Tom Zanussi  2019-02-13  4673  }
a3785b7eca8fd4 Tom Zanussi  2019-02-13  4674  

:::::: The code at line 4594 was first introduced by commit
:::::: a3785b7eca8fd45c7c39f2ddfcd67368af30c1b4 tracing: Add hist trigger snapshot() action

:::::: TO: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>
:::::: CC: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux