Hi Levi,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.11-rc7 next-20240912]
[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/Levi-Yun/trace-trace_event_perf-remove-duplicate-samples-on-the-first-tracepoint-event/20240911-202917
base:   linus/master
patch link:    
https://lore.kernel.org/r/20240911122747.4168556-1-yeoreum.yun%40arm.com
patch subject: [PATCH] trace/trace_event_perf: remove duplicate samples on the 
first tracepoint event
config: x86_64-rhel-8.3-rust 
(https://download.01.org/0day-ci/archive/20240913/202409130445.h7liigpd-...@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 
3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240913/202409130445.h7liigpd-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202409130445.h7liigpd-...@intel.com/

All errors (new ones prefixed by >>):

>> kernel/trace/trace_event_perf.c:360:24: error: use of undeclared identifier 
>> 'event'
     360 |         if (is_sampling_event(event)) {
         |                               ^
   1 error generated.


vim +/event +360 kernel/trace/trace_event_perf.c

   351  
   352  int perf_trace_add(struct perf_event *p_event, int flags)
   353  {
   354          struct trace_event_call *tp_event = p_event->tp_event;
   355          struct hw_perf_event *hwc = &p_event->hw;
   356  
   357          if (!(flags & PERF_EF_START))
   358                  p_event->hw.state = PERF_HES_STOPPED;
   359  
 > 360          if (is_sampling_event(event)) {
   361                  hwc->last_period = hwc->sample_period;
   362                  perf_swevent_set_period(p_event);
   363          }
   364  
   365          /*
   366           * If TRACE_REG_PERF_ADD returns false; no custom action was 
performed
   367           * and we need to take the default action of enqueueing our 
event on
   368           * the right per-cpu hlist.
   369           */
   370          if (!tp_event->class->reg(tp_event, TRACE_REG_PERF_ADD, 
p_event)) {
   371                  struct hlist_head __percpu *pcpu_list;
   372                  struct hlist_head *list;
   373  
   374                  pcpu_list = tp_event->perf_events;
   375                  if (WARN_ON_ONCE(!pcpu_list))
   376                          return -EINVAL;
   377  
   378                  list = this_cpu_ptr(pcpu_list);
   379                  hlist_add_head_rcu(&p_event->hlist_entry, list);
   380          }
   381  
   382          return 0;
   383  }
   384  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to