Discussion:
Missing location information for drivers
Balavinayagam Samynathan
2017-01-20 19:58:57 UTC
Permalink
Hi ,

I am profiling a dma_driver (dma_driv.ko module) in Ubuntu 14.04 (kernel
version 3.13.0-32-generic).
For opreport and opannotate I use the -p option to point to the driver
module. The driver code exists in the same directory, but I still see "*no
location information" *next to the driver
For opannotate I also used the following options

"""
*opannotate --source --base-dirs=/root/rdma_driver/linux/
--search-dirs=/root/dma_driver/linux/ -p /root/dma_driver/linux/
./testDriver*
"""

I did get the debug version of the kernel and I can see the opreport on
individual functions in the kernel. Only location information for my driver
module is not found.
I compiled my driver with "*-g*" option and placed them under

"""
*/usr/lib/debug/lib/modules/3.13.0-32-generic/kernel/drivers/dma_driver*
"""

But I am still getting "(no location information)" next to my driver
functions
--
Thanks in advance
Bala
William Cohen
2017-01-23 15:55:08 UTC
Permalink
Hi ,
Hi Bala,

So the dma_driver is being compiled separately from the kernel?
I am profiling a dma_driver (dma_driv.ko module) in Ubuntu 14.04 (kernel version 3.13.0-32-generic).
For opreport and opannotate I use the -p option to point to the driver module. The driver code exists in the same directory, but I still see "*no location information" *next to the driver
For opannotate I also used the following options
"""
/opannotate --source --base-dirs=/root/rdma_driver/linux/ --search-dirs=/root/dma_driver/linux/ -p /root/dma_driver/linux/ ./testDriver/
"""
Are there two directories, /root/rdma_driver and /root/dma_drivers?

Check that the driver does have the debug info in it. Something like the following with dma_driv.ko replaced with approriate name

readelf --debug-dump=line dma_driv.ko

The above command should provide a bunch of information if there is debuginfo in the driver.

Is there a similarly named kernel driver elsewhere that could be causing confusion for oprofile?
Is the kernel driver in /root/dma_driver/linux or some subdirectory of that? It might be wise to verify tha "-p /root/dma_driver/linux" is the correct directory and contains dma_driv.ko.

-Will
I did get the debug version of the kernel and I can see the opreport on individual functions in the kernel. Only location information for my driver module is not found.
I compiled my driver with "*-g*" option and placed them under
"""
//usr/lib/debug/lib/modules/3.13.0-32-generic/kernel/drivers/dma_driver/
"""
But I am still getting "(no location information)" next to my driver functions
--
Thanks in advance
Bala
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
oprofile-list mailing list
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Loading...