[lttng-dev] Can I use function to retrieve socket information in the SC_TRACE_EVENT macro?
Rui Han
r.han at umiami.edu
Mon Aug 13 14:05:33 EDT 2012
Dear all,
I am working on retrieving socket information for socket related syscalls
by the kernel trace, such as sys_connect() and sys_bind(). What I did is in
the .h file
"instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_pointers.h", I
modify the sys_connect SC_TRACE_EVENT. I add _field(size_t, port) and
tp_assign(port, getport() ) to the TP_STRUCT_entry() and TP_fast_assign(),
respectively. The getport() function is a function I wrote to retrieve the
port number and ip address by the function getpeername(). The lttng module
got installed correctly after the modification, (with some #ifndef
manipulations), However, when I reboot the machine and try to do the kernel
trace. It gives me error messages:
Spawning a session daemon
FATAL: Error inserting lttng_tracer
(/lib/modules/3.2.0-29-generic/extra/lttng-tracer.ko): Unknown symbol in
module, or unknown parameter (see dmesg)
Error: Unable to load module lttng-tracer
Warning: No kernel tracer available
Warning: No tracing group detected
Session rui-session created.
Traces will be written in /root/lttng-traces/rui-session-20120813-133953
FATAL: Error inserting lttng_tracer
(/lib/modules/3.2.0-29-generic/extra/lttng-tracer.ko): Unknown symbol in
module, or unknown parameter (see dmesg)
Error: Unable to load module lttng-tracer
Warning: No kernel tracer available
and in the syslog file: I got the following error:
[ 82.001603] lttng_tracer: Unknown symbol getport (err 0)
[ 82.377213] lttng_tracer: Unknown symbol getport (err 0)
I am new to the kernel module programming. My question is: should I do some
kinds of symbol register before define a function in the kernel space? Any
suggestion for solving the problem?
Thanks,
Rui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20120813/c57bbf5f/attachment.html>
More information about the lttng-dev
mailing list