[lttng-dev] ERROR: No buffer space available
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Sun Aug 5 13:03:10 EDT 2012
* Rui Han (r.han at umiami.edu) wrote:
> Hi,
>
> I try to modified the lttng2.0 source code for my research. For example, I
> try to log the "comm" for the write system call, I add the following filed
> in the file x86-64-syscalls-3.0.4_pointers.h located at the path
> lttng-modules-2.0.3/instrumentation/syscalls/headers. I modify the
> TRACE_EVENTS() macro from the original one:
>
> #ifndef OVERRIDE_64_sys_write
> SC_TRACE_EVENT(sys_write,
> TP_PROTO(unsigned int fd, const char * buf, size_t count),
> TP_ARGS(fd, buf, count),
> TP_STRUCT__entry(__field(unsigned int, fd) __field_hex(const char *, buf)
> __field(size_t, count)),
> TP_fast_assign(tp_assign(fd, fd) tp_assign(buf, buf) tp_assign(count,
> count)),
> TP_printk()
> )
> #endif
>
> to the following one:
>
> #ifndef OVERRIDE_64_sys_write
> SC_TRACE_EVENT(sys_write,
> TP_PROTO(unsigned int fd, const char * buf, size_t count, struct
> task_struct *p),
> TP_ARGS(fd, buf, count, p),
> TP_STRUCT__entry( __field(unsigned int, fd) __field_hex(const char *,
> buf) __field(size_t,
> count) __array_text(char, comm, TASK_COMM_LEN)),
> TP_fast_assign( tp_assign(fd, fd) tp_assign(buf, buf) tp_assign(count,
> 2064) tp_memcpy(comm,
> p->comm, TASK_COMM_LEN)),
> TP_printk()
> )
> #endif
>
> I add one argument *p and one filed "comm" for the macro. It was able to
> be compiled, however, after reload the lttng modules, It will show the
> following error messages when I start lttng.
>
> PERROR: ioctl start session: No buffer space available [in
> kernel_start_session() at kernel.c:397]
> Error: Starting kernel trace failed
I don't see how modifying the system call tracing macro would trigger
this error at start. Try restarting lttng-sessiond. Try unloading the
lttng modules, and, maybe, as last resort, rebooting your system.
Thanks,
Mathieu
>
> It won't work. Please help me out with this. My next step is try to add
> extra fields in the sys_connect macros to enable the logging of the
> connected IP/port from the socket. Is this method right? what are other
> possible solutions in order to logging the details of the socket
> information?
>
> Thank you very much.
>
> Regards,
> Rui
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list