Skip to contentSkip to conversation

kernel/trace/trace_events_synth.c:862:7: error: use of undeclared identifier 'TRACE_REG_PERF_REGISTER'

PATCH kernel test robot 1 participant 1 message Mar 23, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/for-next
head:   a1e3ad43115efe4c764775dc3e6d8e22e5870339
commit: 21581dd4e7ff6c07d0ab577e3c32b13a74b31522 [15/16] tracing: Ensure module defining synth event cannot be unloaded while tracing
config: um-randconfig-002-20250323 (https://download.01.org/0day-ci/archive/20250323/[email protected]/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> kernel/trace/trace_events_synth.c:862:7: error: use of undeclared identifier 'TRACE_REG_PERF_REGISTER'
     862 |         case TRACE_REG_PERF_REGISTER:
         |              ^
>> kernel/trace/trace_events_synth.c:874:7: error: use of undeclared identifier 'TRACE_REG_PERF_UNREGISTER'; did you mean 'TRACE_REG_UNREGISTER'?
     874 |         case TRACE_REG_PERF_UNREGISTER:
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~
         |              TRACE_REG_UNREGISTER
   include/linux/trace_events.h:249:2: note: 'TRACE_REG_UNREGISTER' declared here
     249 |         TRACE_REG_UNREGISTER,
         |         ^
>> kernel/trace/trace_events_synth.c:874:7: error: duplicate case value 'TRACE_REG_UNREGISTER'

874 | case TRACE_REG_PERF_UNREGISTER:
| ^
kernel/trace/trace_events_synth.c:873:7: note: previous case defined here
873 | case TRACE_REG_UNREGISTER:
| ^
3 errors generated.

vim +/TRACE_REG_PERF_REGISTER +862 kernel/trace/trace_events_synth.c

854
855 static int synth_event_reg(struct trace_event_call *call,
856 enum trace_reg type, void *data)
857 {
858 struct synth_event *event = container_of(call, struct synth_event, call);
859
860 switch (type) {
861 case TRACE_REG_REGISTER:

 > 862		case TRACE_REG_PERF_REGISTER:
   863			if (!try_module_get(event->mod))
   864				return -EBUSY;
   865			break;
   866		default:
   867			break;
   868		}
   869	
   870		int ret = trace_event_reg(call, type, data);
   871	
   872		switch (type) {
   873		case TRACE_REG_UNREGISTER:
 > 874		case TRACE_REG_PERF_UNREGISTER:

875 module_put(event->mod);
876 break;
877 default:
878 break;
879 }
880 return ret;
881 }
882

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