<div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thank you. </div><div><br></div><div>I got most. To confirm, I have two header files, each defines its own tracepoint, they are from the same provider. The source files that use the header files have its own #define TRACEPOINT_CREATE_PROBES and #define TRACEPOINT_DEFINE. This won't work since two files have those defines. But if I remove #define TRACEPOINT_CREATE_PROBES#define TRACEPOINT_DEFINE from one of the two .c file, it should work. </div><div><br></div><div>tp_one.h file:</div><div><br></div><div><pre class="gmail-src" style="margin-top:0px;margin-bottom:0px;padding:10px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:rgba(0,0,0,0.05);overflow-x:auto;color:rgb(26,26,26)"><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#undef TRACEPOINT_PROVIDER</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_PROVIDER hello_world</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#undef TRACEPOINT_INCLUDE</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_INCLUDE "./tp_one.h"</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#if !defined(_TP_ONE_H) || defined(TRACEPOINT_HEADER_MULTI_READ)</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define _TP_ONE_H</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><lttng/tracepoint.h></span><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)"></span>

<span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TRACEPOINT_EVENT</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">hello_world</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_first_tracepoint</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TP_ARGS</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
        <span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">int</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
        <span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">char</span><span class="gmail-o" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(0,0,0)">*</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_arg</span>
    <span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">),</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TP_FIELDS</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
        <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">ctf_string</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span><span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_field</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
        <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">ctf_integer</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span><span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">int</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_field</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
    <span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
<span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#endif </span><span class="gmail-cm" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,136)">/* _TP_ONE_H */</span><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)"></span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><lttng/tracepoint-event.h></span></pre></div><div dir="ltr"><br></div><div dir="ltr"><div class="gmail-title" style="margin:0px;padding:3px 10px 5px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:inherit;font-family:"Open Sans",Frutiger,"Frutiger Linotype",Univers,Calibri,"Gill Sans","Gill Sans MT","Myriad Pro",Myriad,"DejaVu Sans Condensed","Liberation Sans","Nimbus Sans L",Tahoma,Geneva,"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;background-color:rgb(218,224,224);color:rgb(26,26,26)"><p style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11.2px;line-height:16.8px;font-family:inherit;vertical-align:baseline;color:rgb(86,101,102)"><code class="gmail-file" style="margin:0px 1px;padding:2px 0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:10.08px;line-height:inherit;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;white-space:nowrap">tp_one.c</code></p></div><pre class="gmail-src" style="margin-top:0px;margin-bottom:0px;padding:10px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:rgba(0,0,0,0.05);overflow-x:auto;color:rgb(26,26,26)"><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_CREATE_PROBES</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_DEFINE</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">"tp_one.h"</span></pre></div><div dir="ltr"><br></div><div dir="ltr"><div>tp_two.h file:</div><div><br></div><div><pre class="gmail-src" style="margin-top:0px;margin-bottom:0px;padding:10px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:rgba(0,0,0,0.05);overflow-x:auto;color:rgb(26,26,26)"><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#undef TRACEPOINT_PROVIDER</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_PROVIDER hello_world</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#undef TRACEPOINT_INCLUDE</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_INCLUDE "./tp_two.h"</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#if !defined(_TP_TWO_H) || defined(TRACEPOINT_HEADER_MULTI_READ)</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define _TP_TWO_H</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><lttng/tracepoint.h></span><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)"></span>

<span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TRACEPOINT_EVENT</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">hello_world</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_second_tracepoint</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TP_ARGS</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
        <span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">int</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span>
        <span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">char</span><span class="gmail-o" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(0,0,0)">*</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_arg</span>
    <span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">),</span>
    <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">TP_FIELDS</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span>
        <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">ctf_string</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span><span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_field</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_string_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
        <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">ctf_integer</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">(</span><span class="gmail-kt" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(68,85,136)">int</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_field</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">,</span> <span class="gmail-n" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">my_integer_arg</span><span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
    <span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>
<span class="gmail-p" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">)</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#endif </span><span class="gmail-cm" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,136)">/* _TP_TWO_H */</span><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)"></span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline"><lttng/tracepoint-event.h></span></pre></div><div dir="ltr"><br></div><div dir="ltr"><div class="gmail-title" style="margin:0px;padding:3px 10px 5px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:inherit;font-family:"Open Sans",Frutiger,"Frutiger Linotype",Univers,Calibri,"Gill Sans","Gill Sans MT","Myriad Pro",Myriad,"DejaVu Sans Condensed","Liberation Sans","Nimbus Sans L",Tahoma,Geneva,"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;background-color:rgb(218,224,224);color:rgb(26,26,26)"><p style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11.2px;line-height:16.8px;font-family:inherit;vertical-align:baseline;color:rgb(86,101,102)"><code class="gmail-file" style="margin:0px 1px;padding:2px 0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:10.08px;line-height:inherit;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;white-space:nowrap">tp_two.c</code></p></div><pre class="gmail-src" style="margin-top:0px;margin-bottom:0px;padding:10px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:rgba(0,0,0,0.05);overflow-x:auto;color:rgb(26,26,26)"><span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_CREATE_PROBES</span>
<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#define TRACEPOINT_DEFINE</span>

<span class="gmail-cp" style="margin:0px;padding:0px;border:0px;font-style:italic;font-variant:inherit;font-weight:700;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(153,153,153)">#include</span> <span class="gmail-cpf" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline">"tp_two.h"</span></pre></div><div dir="ltr"></div></div></div></div></div></div></div></div></div></div><div><br></div><div>hello.c</div><div>use the two tracepoints defined in the two files. </div><div><br></div><div>To compile (compile file one by one). </div><pre class="gmail-commands" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;overflow-x:auto;color:rgba(0,0,0,0.75)">gcc -o hello tp-one.c tp-two.c hello.c -llttng-ust -ldl</pre><pre class="gmail-commands" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;overflow-x:auto;color:rgba(0,0,0,0.75)"><br></pre><pre class="gmail-commands" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;overflow-x:auto;color:rgba(0,0,0,0.75)"><br></pre><pre class="gmail-commands" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:10.5px;line-height:13.125px;font-family:"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L","Ubuntu Mono",Monaco,Consolas,"Lucida Console","Lucida Sans Typewriter","Courier New",Courier,monospace;vertical-align:baseline;background-color:transparent;overflow-x:auto;color:rgba(0,0,0,0.75)"><br></pre><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 7, 2019 at 12:22 PM Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
----- On Oct 7, 2019, at 9:59 AM, Yonghong Yan <a href="mailto:yanyh15@gmail.com" target="_blank">yanyh15@gmail.com</a> wrote:<br>
<br>
> For lttng-ust, can I put the tracepoint definition in two files, but they use<br>
> the same provider.<br>
<br>
Based on the terminology here: <a href="https://lttng.org/docs/v2.10/#doc-tracing-your-own-user-application" rel="noreferrer" target="_blank">https://lttng.org/docs/v2.10/#doc-tracing-your-own-user-application</a><br>
<br>
You need to have at most one instance of your tracepoint provider where<br>
the header is included with TRACEPOINT_CREATE_PROBES, and exactly one<br>
instance where TRACEPOINT_DEFINE is defined. (both can end up being within<br>
the same object if you wish).<br>
<br>
Then you can include your tracepoint provider header file at will across<br>
other compile units in your program. Just make sure none of <br>
TRACEPOINT_CREATE_PROBES nor TRACEPOINT_DEFINE are defined in those other<br>
compile units. You can therefore call tracepoints from a given probe from<br>
various compile units in your program.<br>
<br>
Hoping this helps clarifying things,<br>
<br>
Mathieu<br>
<br>
> Thank you.<br>
> Yonghong<br>
<br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> <a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
-- <br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
<a href="http://www.efficios.com" rel="noreferrer" target="_blank">http://www.efficios.com</a><br>
</blockquote></div></div>