I am trying to get the non-commercial version of VTune 9.1 to work on Ubuntu-9.10 (64 bit). I checked the requirements for VTune and I am aware that it only officially supports the 2.6.24-16-generic version on Ubuntu-8.04. But I was hoping that maybe someone here has gotten it to work and can share what they needed to do.
Here's what I have so far on building the sampling driver:
0) I am using the linux headers from /usr/src/linux-headers-2.6.31-14-generic (using sudo apt-get install linux-headers-2.6.31-14-generic ) 1) By changing the kernel_includes in the configure file (see this thread) and also using gcc-4.3 (instead of gcc-4.4), I have gotten the driver to compile.
But during compilation it throws this warning:
... LD /opt/intel/vtune/vdk/src/vtune_drv.o Building modules, stage 2. MODPOST 1 modules WARNING: "find_task_by_pid_ns" [/opt/intel/vtune/vdk/src/vtune_drv.ko] undefined! CC /opt/intel/vtune/vdk/src/vtune_drv.mod.o LD /opt/intel/vtune/vdk/src/vtune_drv.ko make: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic' Renamed vtune_drv.ko to vtune_drv-x32_64-2.6.31-14-genericsmp.ko .
2) I ignored the warning and ran insmod-vtune. Here's the result:
/opt/intel/vtune/vdk/src$ sudo ./insmod-vtune Executing: insmod ./vtune_drv-x32_64-2.6.31-14-genericsmp.ko insmod: error inserting './vtune_drv-x32_64-2.6.31-14-genericsmp.ko': -1 Unknown symbol in module
3) And I check to see what the error actually is:
/opt/intel/vtune/vdk/src$ sudo dmesg [15642.609120] vtune_drv: Unknown symbol find_task_by_pid_ns
I am stuck at this point since I am not sure why it can't find the find_task_by_pid_ns symbol. Earlier in the configure phase, it did find that symbol as evident from this message that it prints to the console:
... checking if kernel percpu segment is used ... no checking if on_each_cpu has retry parameter ... no checking which apic vector to use ... first device vector ## ## Here is where it checks for find_task_by_pid_ns and FINDS it! ## checking whether to use pid namespaces ... yes
Is there anything else that I need to do to help it locate that symbol?
That is, comment out the five lines I commented out and add the two lines I added at the end.
The proper fix requires testing the kernel version in configure, passing a new flag to Makefile.in and testing that flag in os_dependent.h. Unfortunately, I don't know the exact kernel version to make the switch flip on and don't have time to research it. This should get you going, but with this patch, you won't be able to compile drivers for older kernels.