<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Eduardo Silva" <edsiper@gmail.com><br><b>To: </b>lttng-dev@lists.lttng.org<br><b>Sent: </b>Saturday, November 23, 2013 12:24:07 PM<br><b>Subject: </b>[lttng-dev] Undefined reference to __tracepoint_provider_mk_linuxtrace<br><div><br></div><div dir="ltr">Hi, <div><br></div><div>i am adding support of Lttng to <a href="http://monkey-project.com" target="_blank">monkey-project.com</a> 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. </div><div><br></div><div>My code structure is as follows:</div><div><br></div><div><div>monkey.c (src/monkey.c) </div><div>====================</div><div>#define TRACEPOINT_DEFINE</div></div></div></blockquote><div><br></div><div>You'll want to add:<br></div><div><br></div><div>#define TRACEPOINT_CREATE_PROBES<br></div><div><br></div><div>here. It is missing from the lttng-ust(3) man page though. I'll fix it.<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div><div>#include "mk_linuxtrace_provider.h"</div><div><br></div><div>int main()</div><div>{</div><div> ...</div><div>}</div><div><br></div><div><br></div><div>mk_linuxtrace_provider.h (src/include/mk_linuxtrace_provider.h)</div><div>====================================================</div><div>#undef TRACEPOINT_PROVIDER</div><div>#define TRACEPOINT_PROVIDER mk_linuxtrace</div><div><br></div><div>#undef TRACEPOINT_INCLUDE</div><div>#define TRACEPOINT_INCLUDE "mk_linuxtrace_provider.h"</div><div><br></div><div>#if !defined(_MK_LINUXTRACE_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ)</div><div>#define _MK_LINUXTRACE_PROVIDER_H</div><div>#include <lttng/tracepoint.h></div><div><br></div><div>TRACEPOINT_EVENT(</div><div> mk_linuxtrace,</div><div> message,</div><div> TP_ARGS(char *, text),</div><div> TP_FIELDS(ctf_string(message, text))</div><div> )</div><div><br></div><div>TRACEPOINT_LOGLEVEL(</div><div> mk_linuxtrace,</div><div> message,</div><div> TRACE_WARNING)</div><div>#endif</div><div><br></div><div>#include <lttng/tracepoint-event.h></div><div><br></div><div style="">---EOF---</div><div style=""><br></div><div style="">any help is appreciated, </div><div style=""><br></div><div style="">thanks</div><div><br></div><div>-- <br></div></div><div><div dir="ltr">Eduardo Silva<br><a href="http://edsiper.linuxchile.cl" target="_blank">http://edsiper.linuxchile.cl</a><br><a href="http://monkey-project.com" target="_blank">http://monkey-project.com</a><br data-mce-bogus="1"></div></div></div><br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com<span name="x"></span><br></div></div></body></html>