- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
# Problem
The vtsspp driver fails to compile during the modpost stage. The kernel's inline function set_tsk_need_resched() now references tracepoints that are not exported to modules in newer kernel versions.
Environment:
OS: Fedora 43
Kernel: Linux 6.17.12
VTune Version: Intel(R) VTune(TM) Profiler 2025.8.0
Compiler: GCC 15.2.1
# Build Log
ERROR: modpost: "__tracepoint_sched_set_need_resched_tp" [vtsspp.ko] undefined!
ERROR: modpost: "__trace_set_need_resched" [vtsspp.ko] undefined!
# Extra Info
With the help from AI, I found it is caused by the following code in vtsspp/workqueue.h:
```
if (rc) set_tsk_need_resched(current);
```
This inlined function used the tracepoint sched_set_need_resched which is not exported:
```
static inline void set_tsk_need_resched(struct task_struct *tsk)
{
if (tracepoint_enabled(sched_set_need_resched_tp) && !test_tsk_thread_flag(tsk, TIF_NEED_RESCHED))
__trace_set_need_resched(tsk, TIF_NEED_RESCHED);
set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
}
```
# Workaround
Add the code below to workqueue.h after including linux/workqueue.h:
```
static inline void vtss_fixed_set_tsk_need_resched(struct task_struct *tsk)
{
set_tsk_thread_flag(tsk, TIF_NEED_RESCHED);
}
#define set_tsk_need_resched vtss_fixed_set_tsk_need_resched
```
After rebuilding the ko, all modules are loaded successfully.
P.S. I am aware this OS/Kernel is not yet officially supported, but sharing this to help others and assist the dev team in future porting. Even though modules are loaded, hardware event collection still fails on Kernel 6.17:
HW event-based analysis with stacks
Example of analysis types: Hotspots with HW event-based sampling and call stacks
Collection: Fail
vtune: Warning: To profile kernel modules during the session, make sure they are available in the /lib/modules/kernel_version/ location.
vtune: Error: The following events cannot be collected: INST_RETIRED.ANY,CPU_CLK_UNHALTED.THREAD,CPU_CLK_UNHALTED.REF_TSC,TOPDOWN.SLOTS,CPU_CLK_UNHALTED.DISTRIBUTED,UOPS_RETIRED.SLOTS,TOPDOWN.SLOTS_P,FP_ARITH_INST_RETIRED.SCALAR_SINGLE,FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE,FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE,FP_ARITH_INST_RETIRED.SCALAR_DOUBLE,FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE,INST_RETIRED.ANY,CPU_CLK_UNHALTED.THREAD,CPU_CLK_UNHALTED.REF_TSC,TOPDOWN.SLOTS,FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE,UOPS_EXECUTED.X87,UOPS_EXECUTED.THREAD. Consider removing the events from the collection, loading the VTune Profiler sampling driver using the root credentials, or updating the OS kernel.
I will post this issue in another thread.
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page