Tracing kernel modules

"Filled Void" <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <op.tqqlhajdizhrf4@triton>
Hi,

I'm trying to trace my own kernel module, so I've created an XML  
facilities file with the events I want and used "genevent" to generate the  
necessary C code for it.  First, it seems that genevent doesn't create the  
ltt_get_index_from_facility_mymodule() function that the  
ltt-facility-mymodule.h uses.  Am I suppose to create this manually or add  
the following to the top of ltt-facility-mymodule.h:

#include <ltt/ltt-facility-select-default.h>
#define ltt_get_index_from_facility_mymodule ltt_get_index_from_facility

Second, I'd like to keep my module (and the facility loader) completely  
separate from the kernel source.  So I've got my module in a completely  
separate directory and the ltt facility loader in a subdirectory "ltt" of  
that directory.  Using the above method, I get the following errors when  
compiling my module:

WARNING: "ltt_facility_get_mymodule_29DE9FD8"  
[/home/fv/mymodule/mymodule.ko] undefined!
WARNING: "ltt_get_index_from_facility" [/home/fv/mymodule/mymodule.ko]  
undefined!

Since the facility loader is compiled as a separate module, it should wait  
until runtime to lookup those symbols.  What am I missing?  Is this the  
recommended approach for tracing modules?  Also, the QUICKSTART guide  
mentions creating a probe, but the README for genevent doesn't.  Isn't the  
README more up-to-date?

Thanks!

fv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.