This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there a way to tell stap where to find include headers?


Thanks for quick reply, Frank!

In the exmaple you mentioned
    @cast(ptr, "typename", "kernel</path/to/header>")->field
I assume 'kernel' tells stap to look at /lib/modules/<uname -r>/build/include/. But for external kernel modules such as mofed, how can I tell stap what other location to look at? The mofed headers are installed to /usr/src/ofa_kernel/.../include/.

Thanks,
Jay

On 03/07/2019 06:32 PM, Frank Ch. Eigler wrote:

"Lan, Jay" <jay.lan@hpe.com><mailto:jay.lan@hpe.com> writes:



I am new to systemtap and am writing a systemtap script on Mellanox
OFED ('mofed') kernel modules. The mofed provides its subset of kernel
include files at different location from that of a kernel-devel. The
mofed header files should be checked ahead of those from kernel-devel.

Is there a way to tell stap where to find the mofed header files?



systemtap looks for headers in a couple of contexts: tracepoints (for
trace("...") probes), type declarations (for @cast ops).  For the
former, not sure.
For the latter,
   @cast(ptr, "typename", "kernel</path/to/header>")->field
does work.

- FChE



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]