* Re: [PATCH 1/2] tracing: Add .percent suffix option to histogram values [not found] <165932284978.2881436.13536997915615710506.stgit@devnote2> @ 2022-08-02 6:49 ` kernel test robot 2022-08-02 14:56 ` Steven Rostedt 0 siblings, 1 reply; 3+ messages in thread From: kernel test robot @ 2022-08-02 6:49 UTC (permalink / raw) To: Masami Hiramatsu (Google), Steven Rostedt Cc: llvm, kbuild-all, Tom Zanussi, Ingo Molnar, linux-kernel Hi "Masami, Thank you for the patch! Yet something to improve: [auto build test ERROR on rostedt-trace/for-next] [also build test ERROR on linus/master v5.19 next-20220728] [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/Masami-Hiramatsu-Google/tracing-hist-Add-percentage-histogram-suffixes/20220801-110217 base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next config: i386-randconfig-a001-20220801 (https://download.01.org/0day-ci/archive/20220802/202208021438.2r5RXlo9-lkp@intel.com/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e) 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/aef5f602ee3aa9ca07402c1d3da0642e932c1b3a git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Masami-Hiramatsu-Google/tracing-hist-Add-percentage-histogram-suffixes/20220801-110217 git checkout aef5f602ee3aa9ca07402c1d3da0642e932c1b3a # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: __udivdi3 >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a >>> referenced by trace_events_hist.c:0 (kernel/trace/trace_events_hist.c:0) >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a >>> referenced 1 more times -- 0-DAY CI Kernel Test Service https://01.org/lkp ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] tracing: Add .percent suffix option to histogram values 2022-08-02 6:49 ` [PATCH 1/2] tracing: Add .percent suffix option to histogram values kernel test robot @ 2022-08-02 14:56 ` Steven Rostedt 2022-08-04 14:57 ` Masami Hiramatsu 0 siblings, 1 reply; 3+ messages in thread From: Steven Rostedt @ 2022-08-02 14:56 UTC (permalink / raw) To: kernel test robot Cc: Masami Hiramatsu (Google), llvm, kbuild-all, Tom Zanussi, Ingo Molnar, linux-kernel On Tue, 2 Aug 2022 14:49:36 +0800 kernel test robot <lkp@intel.com> wrote: > All errors (new ones prefixed by >>): > > >> ld.lld: error: undefined symbol: __udivdi3 This is due to this: > @@ -5190,18 +5202,34 @@ static void hist_trigger_print_key(struct seq_file *m, > seq_puts(m, "}"); > } > > +/* Get the 100 times of the percentage of @val in @total */ > +static inline unsigned int __get_percentage(u64 val, u64 total) > +{ > + if (val < (U64_MAX / 10000)) > + return (unsigned int)(val * 10000 / total); > + else > + return val / (total / 10000); > +} > + You can't use '/' on u64 values. You have to use div64*(). Otherwise 32 bit architectures may use floating point operations or glibc helpers. See the other divisions in trace_events_hist.c that do so too. -- Steve > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced by trace_events_hist.c:0 (kernel/trace/trace_events_hist.c:0) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced 1 more times ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] tracing: Add .percent suffix option to histogram values 2022-08-02 14:56 ` Steven Rostedt @ 2022-08-04 14:57 ` Masami Hiramatsu 0 siblings, 0 replies; 3+ messages in thread From: Masami Hiramatsu @ 2022-08-04 14:57 UTC (permalink / raw) To: Steven Rostedt Cc: kernel test robot, Masami Hiramatsu (Google), llvm, kbuild-all, Tom Zanussi, Ingo Molnar, linux-kernel On Tue, 2 Aug 2022 10:56:46 -0400 Steven Rostedt <rostedt@goodmis.org> wrote: > On Tue, 2 Aug 2022 14:49:36 +0800 > kernel test robot <lkp@intel.com> wrote: > > > All errors (new ones prefixed by >>): > > > > >> ld.lld: error: undefined symbol: __udivdi3 > > This is due to this: > > > @@ -5190,18 +5202,34 @@ static void hist_trigger_print_key(struct seq_file *m, > > seq_puts(m, "}"); > > } > > > > +/* Get the 100 times of the percentage of @val in @total */ > > +static inline unsigned int __get_percentage(u64 val, u64 total) > > +{ > > + if (val < (U64_MAX / 10000)) > > + return (unsigned int)(val * 10000 / total); > > + else > > + return val / (total / 10000); > > +} > > + > > You can't use '/' on u64 values. You have to use div64*(). Otherwise 32 bit > architectures may use floating point operations or glibc helpers. Yeah, I forgot that. And also I have to check "total != 0" here. > > See the other divisions in trace_events_hist.c that do so too. Thanks! > > -- Steve > > > > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > > >>> referenced by trace_events_hist.c:0 (kernel/trace/trace_events_hist.c:0) > > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > > >>> referenced 1 more times > -- Masami Hiramatsu (Google) <mhiramat@kernel.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-04 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <165932284978.2881436.13536997915615710506.stgit@devnote2>
2022-08-02 6:49 ` [PATCH 1/2] tracing: Add .percent suffix option to histogram values kernel test robot
2022-08-02 14:56 ` Steven Rostedt
2022-08-04 14:57 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox