System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to trace dyn kernel modules with Caliper, WDB, etc?

mvpel
Trusted Contributor

How to trace dyn kernel modules with Caliper, WDB, etc?

I've been rummaging through documentation but so far I haven't found the magic incantation to trace or monitor the activity of dynamically-loaded kernel modules.

I seem to be able to watch static mods with ktracer, for example, but not dynamic mods. When I specify to trace the functions in a given mod.o, it complains that the functions aren't found in /stand/vmunix - well, duh.

Can someone help me out or point me in the right direction? Thanks!
3 REPLIES
Don Morris_1
Honored Contributor

Re: How to trace dyn kernel modules with Caliper, WDB, etc?

Are you using the -m option to specify the module in question? The docs read to me that this is what you want to do. While I still didn't enable tracing on the system I tried it on (which doesn't surprise me since the modules in /usr/conf/mod and the actual kernel are significantly different), it did look at the module and try to analyze said functions.
mvpel
Trusted Contributor

Re: How to trace dyn kernel modules with Caliper, WDB, etc?

Yes, that's correct, I tried "-m."

I do kmadmin -s and see, for example, an fxsla module that's listed as LOADED.

Then ktracer -m fxsla tries to find it in /usr/conf/mod, which directory doesn't exist - maybe I have an old version? If I instead do "ktracer -m /usr/conf/km.d/fxsla/mod.o, then it goes through each function in the object saying "no function in vmunix matches given address." Does it perhaps need fxsla:function_name? I'll try that...

Or maybe something with kitrace?
mvpel
Trusted Contributor

Re: How to trace dyn kernel modules with Caliper, WDB, etc?

Hm, maybe since the one I'm interested in is a PCI card driver, perhaps I need to look at IO tools?