[lttng-dev] Undefined reference to __tracepoint_provider_mk_linuxtrace

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Sat Nov 23 12:45:04 EST 2013


----- Original Message -----

> From: "Eduardo Silva" <edsiper at gmail.com>
> To: lttng-dev at lists.lttng.org
> Sent: Saturday, November 23, 2013 12:24:07 PM
> Subject: [lttng-dev] Undefined reference to
> __tracepoint_provider_mk_linuxtrace

> Hi,

> i am adding support of Lttng to monkey-project.com but the compiler is
> claiming an undefined reference, of course there is something wrong in my
> provider header but i am not able to catch the error.

> My code structure is as follows:

> monkey.c (src/monkey.c)
> ====================
> #define TRACEPOINT_DEFINE

You'll want to add: 

#define TRACEPOINT_CREATE_PROBES 

here. It is missing from the lttng-ust(3) man page though. I'll fix it. 

Thanks, 

Mathieu 

> #include "mk_linuxtrace_provider.h"

> int main()
> {
> ...
> }

> mk_linuxtrace_provider.h (src/include/mk_linuxtrace_provider.h)
> ====================================================
> #undef TRACEPOINT_PROVIDER
> #define TRACEPOINT_PROVIDER mk_linuxtrace

> #undef TRACEPOINT_INCLUDE
> #define TRACEPOINT_INCLUDE "mk_linuxtrace_provider.h"

> #if !defined(_MK_LINUXTRACE_PROVIDER_H) ||
> defined(TRACEPOINT_HEADER_MULTI_READ)
> #define _MK_LINUXTRACE_PROVIDER_H
> #include <lttng/tracepoint.h>

> TRACEPOINT_EVENT(
> mk_linuxtrace,
> message,
> TP_ARGS(char *, text),
> TP_FIELDS(ctf_string(message, text))
> )

> TRACEPOINT_LOGLEVEL(
> mk_linuxtrace,
> message,
> TRACE_WARNING)
> #endif

> #include <lttng/tracepoint-event.h>

> ---EOF---

> any help is appreciated,

> thanks

> --
> Eduardo Silva
> http://edsiper.linuxchile.cl
> http://monkey-project.com

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131123/6705df58/attachment.html>


More information about the lttng-dev mailing list