<div dir="ltr">Hi,<br><br>Thanks for your review.<br><br>> Why is this lttng_ust_lib_ring_buffer_config:: scoping needed in c++ ?<br><br>C++ will hide enumeration defined inside class/struct.<br><br>Quote from <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf</a>, page 158:<br>

> An enumerator declared in class scope can be referred to using the class member access<br>> operators (::, . (dot) and -> (arrow))  [Example:<br>> struct X {<br>>     enum direction { left=’l’, right=’r’ };<br>

> };<br>> void g(X* p) {<br>>     int i;<br>>     i = p->f(left); // error: left not in scope<br>>     i = p->f(X::right); // OK<br>> }<br>> — end example ]<br><br><br>> inlined precompiler directives like this make the function hard to<br>

> follow (mix of #if/#else/#endif and if/else).<br><br>I agree inlined precompiler directives is bad style. Could you suggest a way to remove the mix of #if/#else/#endif and if/else?<br><br>> So each field need to be listed ? We usually don't put NULL<br>

> initialization for structures that are always in zero-initialized<br>> memory. (coding style)<br><br>This is related to a known issue of g++: <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606</a> (Bug 55606 - sorry, unimplemented: non-trivial designated initializers not supported).<br>

<br>g++'s 'trivial designated initializers' means no out-of-order initialization, no missing<br>initialization (except the fields on the tail of a struct), and nested initialization should be done in the form {.foo = {.bar = 1}} instead of {.foo.bar = 1}. That's why I made such modification.<br>

<br>> Are those changes also compatible with the LLVM c++ compiler ?<br>Actually, clang++ have designated initializers better supported than g++. All the modification about designated initializers are not required for clang++. No need to add NULL initialization, reorder initializations or change {.foo.bar = 1} into {.foo = {.bar = 1}}. These (ugly) hacks are just to make g++ happy.<br>

<br>Cleaned-up patch attached.<br><div><br></div><div>Thanks.<div><br></div><div>From 36930fdfa25a6ea67de551300263dee353df43e5 Mon Sep 17 00:00:00 2001<br></div><div><div>From: Zifei Tong <<a href="mailto:soariez@gmail.com">soariez@gmail.com</a>></div>

<div>Date: Sat, 20 Apr 2013 19:38:39 +0800</div><div>Subject: [PATCH lttng-ust] Fix: make 'hello.cxx' compile with g++</div><div><br></div><div>Fixes #338</div><div><br></div><div>Signed-off-by: Zifei Tong <<a href="mailto:soariez@gmail.com">soariez@gmail.com</a>></div>

<div>---</div><div> include/lttng/ringbuffer-config.h    |  5 +++++</div><div> include/lttng/tracepoint-event.h     | 12 +++++------</div><div> include/lttng/ust-events.h           | 42 +++++++++++++++++++++++-------------</div>

<div> include/lttng/ust-tracepoint-event.h | 32 +++++++++++++++++----------</div><div> tests/hello.cxx/Makefile.am          |  2 +-</div><div> tests/hello.cxx/tp.c                 | 26 ----------------------</div><div> tests/hello.cxx/tp.cpp               | 26 ++++++++++++++++++++++</div>

<div> 7 files changed, 86 insertions(+), 59 deletions(-)</div><div> delete mode 100644 tests/hello.cxx/tp.c</div><div> create mode 100644 tests/hello.cxx/tp.cpp</div><div><br></div><div>diff --git a/include/lttng/ringbuffer-config.h b/include/lttng/ringbuffer-config.h</div>

<div>index ca52fc7..bb01eab 100644</div><div>--- a/include/lttng/ringbuffer-config.h</div><div>+++ b/include/lttng/ringbuffer-config.h</div><div>@@ -347,8 +347,13 @@ int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *</div>

<div> <span class="" style="white-space:pre">                  </span>     unsigned int switch_timer_interval,</div><div> <span class="" style="white-space:pre">                       </span>     unsigned int read_timer_interval)</div><div> {</div><div>+<span class="" style="white-space:pre">        </span>#ifdef __cplusplus</div>

<div>+<span class="" style="white-space:pre">   </span>if (config->alloc == lttng_ust_lib_ring_buffer_config::RING_BUFFER_ALLOC_GLOBAL</div><div>+<span class="" style="white-space:pre">        </span>    && config->sync == lttng_ust_lib_ring_buffer_config::RING_BUFFER_SYNC_PER_CPU</div>

<div>+<span class="" style="white-space:pre">   </span>#else</div><div> <span class="" style="white-space:pre">    </span>if (config->alloc == RING_BUFFER_ALLOC_GLOBAL</div><div> <span class="" style="white-space:pre"> </span>    && config->sync == RING_BUFFER_SYNC_PER_CPU</div>

<div>+<span class="" style="white-space:pre">   </span>#endif</div><div> <span class="" style="white-space:pre">   </span>    && switch_timer_interval)</div><div> <span class="" style="white-space:pre">          </span>return -EINVAL;</div>

<div> <span class="" style="white-space:pre">  </span>return 0;</div><div>diff --git a/include/lttng/tracepoint-event.h b/include/lttng/tracepoint-event.h</div><div>index 077eaa0..4630788 100644</div><div>--- a/include/lttng/tracepoint-event.h</div>

<div>+++ b/include/lttng/tracepoint-event.h</div><div>@@ -20,12 +20,12 @@</div><div>  * SOFTWARE.</div><div>  */</div><div> </div><div>+#ifdef TRACEPOINT_CREATE_PROBES</div><div>+</div><div> #ifdef __cplusplus</div><div>
 extern "C" {</div>
<div> #endif</div><div> </div><div>-#ifdef TRACEPOINT_CREATE_PROBES</div><div>-</div><div> #define __tp_stringify1(x)<span class="" style="white-space:pre"> </span>#x</div><div> #define __tp_stringify(x)<span class="" style="white-space:pre">      </span>__tp_stringify1(x)</div>

<div> </div><div>@@ -65,10 +65,10 @@ extern "C" {</div><div> #undef TRACEPOINT_INCLUDE_FILE</div><div> #undef TRACEPOINT_INCLUDE</div><div> </div><div>-#define TRACEPOINT_CREATE_PROBES</div><div>-</div><div>-#endif /* TRACEPOINT_CREATE_PROBES */</div>

<div>-</div><div> #ifdef __cplusplus</div><div> }</div><div> #endif</div><div>+</div><div>+#define TRACEPOINT_CREATE_PROBES</div><div>+</div><div>+#endif /* TRACEPOINT_CREATE_PROBES */</div><div>diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h</div>

<div>index 749478a..e97cc1b 100644</div><div>--- a/include/lttng/ust-events.h</div><div>+++ b/include/lttng/ust-events.h</div><div>@@ -89,15 +89,21 @@ struct lttng_enum_entry {</div><div> </div><div> #define __type_integer(_type, _byte_order, _base, _encoding)<span class="" style="white-space:pre">       </span>\</div>

<div> <span class="" style="white-space:pre">  </span>{<span class="" style="white-space:pre">                                                 </span>\</div><div>-<span class="" style="white-space:pre"> </span>    .atype = atype_integer,<span class="" style="white-space:pre">                             </span>\</div>

<div>-<span class="" style="white-space:pre">   </span>    .u.basic.integer =<span class="" style="white-space:pre">                                  </span>\</div><div>+<span class="" style="white-space:pre"> </span>  .atype = atype_integer,<span class="" style="white-space:pre">                                </span>\</div>

<div>+<span class="" style="white-space:pre">   </span>  .u =<span class="" style="white-space:pre">                                                   </span>\</div><div> <span class="" style="white-space:pre">                </span>{<span class="" style="white-space:pre">                                         </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .size = sizeof(_type) * CHAR_BIT,<span class="" style="white-space:pre">              </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .alignment = lttng_alignof(_type) * CHAR_BIT,<span class="" style="white-space:pre">  </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .signedness = lttng_is_signed_type(_type),<span class="" style="white-space:pre">     </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .reverse_byte_order = _byte_order != BYTE_ORDER,<span class="" style="white-space:pre">       </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .base = _base,<span class="" style="white-space:pre">                         </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .encoding = lttng_encode_##_encoding,<span class="" style="white-space:pre">          </span>\</div>

<div>+<span class="" style="white-space:pre">           </span>  .basic = <span class="" style="white-space:pre">                                      </span>\</div><div>+<span class="" style="white-space:pre">                 </span>{<span class="" style="white-space:pre">                                 </span>\</div>

<div>+<span class="" style="white-space:pre">                   </span>  .integer =<span class="" style="white-space:pre">                             </span>\</div><div>+<span class="" style="white-space:pre">                         </span>{<span class="" style="white-space:pre">                         </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .size = sizeof(_type) * CHAR_BIT,<span class="" style="white-space:pre">              </span>\</div><div>+<span class="" style="white-space:pre">                         </span>  .alignment = lttng_alignof(_type) * CHAR_BIT,<span class="" style="white-space:pre">  </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .signedness = lttng_is_signed_type(_type),<span class="" style="white-space:pre">     </span>\</div><div>+<span class="" style="white-space:pre">                         </span>  .reverse_byte_order = _byte_order != BYTE_ORDER,<span class="" style="white-space:pre">       </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .base = _base,<span class="" style="white-space:pre">                         </span>\</div><div>+<span class="" style="white-space:pre">                         </span>  .encoding = lttng_encode_##_encoding,<span class="" style="white-space:pre">          </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>}<span class="" style="white-space:pre">                         </span>\</div><div>+<span class="" style="white-space:pre">                 </span>}<span class="" style="white-space:pre">                                 </span>\</div>

<div> <span class="" style="white-space:pre">          </span>},<span class="" style="white-space:pre">                                                </span>\</div><div> <span class="" style="white-space:pre">        </span>}<span class="" style="white-space:pre">                                                 </span>\</div>

<div> </div><div>@@ -123,14 +129,20 @@ struct lttng_integer_type {</div><div> </div><div> #define __type_float(_type)<span class="" style="white-space:pre">                                     </span>\</div><div> <span class="" style="white-space:pre">        </span>{<span class="" style="white-space:pre">                                                 </span>\</div>

<div>-<span class="" style="white-space:pre">   </span>    .atype = atype_float,<span class="" style="white-space:pre">                               </span>\</div><div>-<span class="" style="white-space:pre"> </span>    .u.basic._float =<span class="" style="white-space:pre">                                   </span>\</div>

<div>+<span class="" style="white-space:pre">   </span>  .atype = atype_float,<span class="" style="white-space:pre">                                  </span>\</div><div>+<span class="" style="white-space:pre"> </span>  .u =<span class="" style="white-space:pre">                                                   </span>\</div>

<div> <span class="" style="white-space:pre">          </span>{<span class="" style="white-space:pre">                                         </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .exp_dig = sizeof(_type) * CHAR_BIT<span class="" style="white-space:pre">            </span>\</div>

<div>-<span class="" style="white-space:pre">                           </span>- _float_mant_dig(_type),<span class="" style="white-space:pre"> </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .mant_dig = _float_mant_dig(_type),<span class="" style="white-space:pre">            </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .alignment = lttng_alignof(_type) * CHAR_BIT,<span class="" style="white-space:pre">  </span>\</div><div>-<span class="" style="white-space:pre">         </span>  .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER, \</div>

<div>+<span class="" style="white-space:pre">           </span>  .basic =<span class="" style="white-space:pre">                                       </span>\</div><div>+<span class="" style="white-space:pre">                 </span>{<span class="" style="white-space:pre">                                 </span>\</div>

<div>+<span class="" style="white-space:pre">                   </span>  ._float =<span class="" style="white-space:pre">                              </span>\</div><div>+<span class="" style="white-space:pre">                         </span>{<span class="" style="white-space:pre">                         </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .exp_dig = sizeof(_type) * CHAR_BIT<span class="" style="white-space:pre">            </span>\</div><div>+<span class="" style="white-space:pre">                                         </span>  - _float_mant_dig(_type),<span class="" style="white-space:pre">      </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .mant_dig = _float_mant_dig(_type),<span class="" style="white-space:pre">            </span>\</div><div>+<span class="" style="white-space:pre">                         </span>  .alignment = lttng_alignof(_type) * CHAR_BIT,<span class="" style="white-space:pre">  </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER,<span class="" style="white-space:pre">  </span>\</div><div>+<span class="" style="white-space:pre">                         </span>}</div>

<div>+<span class="" style="white-space:pre">                   </span>}</div><div> <span class="" style="white-space:pre">                </span>},<span class="" style="white-space:pre">                                                </span>\</div><div> <span class="" style="white-space:pre">        </span>}<span class="" style="white-space:pre">                                                 </span>\</div>

<div> </div><div>diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h</div><div>index e46cc1a..3aa946d 100644</div><div>--- a/include/lttng/ust-tracepoint-event.h</div><div>+++ b/include/lttng/ust-tracepoint-event.h</div>

<div>@@ -147,11 +147,14 @@ static const char<span class="" style="white-space:pre">                                                     </span>\</div><div> <span class="" style="white-space:pre">        </span>  .type =<span class="" style="white-space:pre">                                                </span>\</div>

<div> <span class="" style="white-space:pre">          </span>{<span class="" style="white-space:pre">                                         </span>\</div><div> <span class="" style="white-space:pre">                </span>  .atype = atype_array,<span class="" style="white-space:pre">                          </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .u.array =<span class="" style="white-space:pre">                                     </span>\</div><div>+<span class="" style="white-space:pre">         </span>  .u =<span class="" style="white-space:pre">                                           </span>\</div>

<div> <span class="" style="white-space:pre">                  </span>{<span class="" style="white-space:pre">                                 </span>\</div><div>-<span class="" style="white-space:pre">                 </span>    .length = _length,<span class="" style="white-space:pre">                  </span>\</div>

<div>-<span class="" style="white-space:pre">                   </span>    .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \</div><div>-<span class="" style="white-space:pre">                    </span>},<span class="" style="white-space:pre">                                        </span>\</div>

<div>+<span class="" style="white-space:pre">                   </span>  .array =<span class="" style="white-space:pre">                               </span>\</div><div>+<span class="" style="white-space:pre">                         </span>{<span class="" style="white-space:pre">                         </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \</div><div>+<span class="" style="white-space:pre">                               </span>  .length = _length,<span class="" style="white-space:pre">             </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>}<span class="" style="white-space:pre">                         </span>\</div><div>+<span class="" style="white-space:pre">                 </span>}<span class="" style="white-space:pre">                                 </span>\</div>

<div> <span class="" style="white-space:pre">          </span>},<span class="" style="white-space:pre">                                                </span>\</div><div> <span class="" style="white-space:pre">        </span>  .nowrite = _nowrite,<span class="" style="white-space:pre">                                   </span>\</div>

<div> <span class="" style="white-space:pre">  </span>},</div><div>@@ -164,10 +167,13 @@ static const char<span class="" style="white-space:pre">                                                  </span>\</div><div> <span class="" style="white-space:pre">        </span>  .type =<span class="" style="white-space:pre">                                                </span>\</div>

<div> <span class="" style="white-space:pre">          </span>{<span class="" style="white-space:pre">                                         </span>\</div><div> <span class="" style="white-space:pre">                </span>  .atype = atype_sequence,<span class="" style="white-space:pre">                       </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .u.sequence =<span class="" style="white-space:pre">                                  </span>\</div><div>+<span class="" style="white-space:pre">         </span>  .u =<span class="" style="white-space:pre">                                           </span>\</div>

<div> <span class="" style="white-space:pre">                  </span>{<span class="" style="white-space:pre">                                 </span>\</div><div>-<span class="" style="white-space:pre">                 </span>    .length_type = __type_integer(_length_type, BYTE_ORDER, 10, none), \</div>

<div>-<span class="" style="white-space:pre">                   </span>    .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \</div><div>+<span class="" style="white-space:pre">                    </span>  .sequence =</div><div>+<span class="" style="white-space:pre">                            </span>{<span class="" style="white-space:pre">                         </span>\</div>

<div>+<span class="" style="white-space:pre">                           </span>  .length_type = __type_integer(_length_type, BYTE_ORDER, 10, none), \</div><div>+<span class="" style="white-space:pre">                           </span>  .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \</div>

<div>+<span class="" style="white-space:pre">                           </span>},<span class="" style="white-space:pre">                                </span>\</div><div> <span class="" style="white-space:pre">                        </span>},<span class="" style="white-space:pre">                                        </span>\</div>

<div> <span class="" style="white-space:pre">          </span>},<span class="" style="white-space:pre">                                                </span>\</div><div> <span class="" style="white-space:pre">        </span>  .nowrite = _nowrite,<span class="" style="white-space:pre">                                   </span>\</div>

<div>@@ -180,7 +186,10 @@ static const char<span class="" style="white-space:pre">                                                      </span>\</div><div> <span class="" style="white-space:pre">        </span>  .type =<span class="" style="white-space:pre">                                                </span>\</div>

<div> <span class="" style="white-space:pre">          </span>{<span class="" style="white-space:pre">                                         </span>\</div><div> <span class="" style="white-space:pre">                </span>  .atype = atype_string,<span class="" style="white-space:pre">                 </span>\</div>

<div>-<span class="" style="white-space:pre">           </span>  .u.basic.string.encoding = lttng_encode_UTF8,<span class="" style="white-space:pre">  </span>\</div><div>+<span class="" style="white-space:pre">         </span>  .u =</div>

<div>+<span class="" style="white-space:pre">                   </span>{</div><div>+<span class="" style="white-space:pre">                 </span>  .basic = { .string = { .encoding = lttng_encode_UTF8 } } \</div><div>+<span class="" style="white-space:pre">                     </span>},<span class="" style="white-space:pre">                                        </span>\</div>

<div> <span class="" style="white-space:pre">          </span>},<span class="" style="white-space:pre">                                                </span>\</div><div> <span class="" style="white-space:pre">        </span>  .nowrite = _nowrite,<span class="" style="white-space:pre">                                   </span>\</div>

<div> <span class="" style="white-space:pre">  </span>},</div><div>@@ -483,7 +492,7 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args));      \</div><div> static<span class="" style="white-space:pre">                                                                    </span>      \</div>

<div> void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))<span class="" style="white-space:pre">   </span>      \</div><div> {<span class="" style="white-space:pre">                                                                      </span>      \</div><div>-<span class="" style="white-space:pre">        </span>struct lttng_event *__event = __tp_data;<span class="" style="white-space:pre">                  </span>      \</div>

<div>+<span class="" style="white-space:pre">   </span>struct lttng_event *__event = (struct lttng_event *) __tp_data;<span class="" style="white-space:pre">                   </span>      \</div><div> <span class="" style="white-space:pre">       </span>struct lttng_channel *__chan = __event->chan;<span class="" style="white-space:pre">                  </span>      \</div>

<div> <span class="" style="white-space:pre">  </span>struct lttng_ust_lib_ring_buffer_ctx __ctx;<span class="" style="white-space:pre">                       </span>      \</div><div> <span class="" style="white-space:pre">       </span>size_t __event_len, __event_align;<span class="" style="white-space:pre">                                </span>      \</div>

<div>@@ -612,13 +621,14 @@ static const char *<span class="" style="white-space:pre">                                                   </span>       \</div><div> <span class="" style="white-space:pre">      </span>__ref_model_emf_uri___##_provider##___##_name<span class="" style="white-space:pre">                     </span>       \</div>

<div> <span class="" style="white-space:pre">  </span>__attribute__((weakref ("_model_emf_uri___" #_provider "___" #_name)));\</div><div> const struct lttng_event_desc __event_desc___##_provider##_##_name = {<span class="" style="white-space:pre">       </span>       \</div>

<div>-<span class="" style="white-space:pre">   </span>.fields = __event_fields___##_provider##___##_template,<span class="" style="white-space:pre">           </span>       \</div><div> <span class="" style="white-space:pre">      </span>.name = #_provider ":" #_name,<span class="" style="white-space:pre">                                  </span>       \</div>

<div> <span class="" style="white-space:pre">  </span>.probe_callback = (void (*)(void)) &__event_probe__##_provider##___##_template,\</div><div>+<span class="" style="white-space:pre">      </span>.ctx = NULL,<span class="" style="white-space:pre">                                                      </span>       \</div>

<div>+<span class="" style="white-space:pre">   </span>.fields = __event_fields___##_provider##___##_template,<span class="" style="white-space:pre">           </span>       \</div><div> <span class="" style="white-space:pre">      </span>.nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template), \</div>

<div> <span class="" style="white-space:pre">  </span>.loglevel = &__ref_loglevel___##_provider##___##_name,<span class="" style="white-space:pre">                </span>       \</div><div> <span class="" style="white-space:pre">      </span>.signature = __tp_event_signature___##_provider##___##_template,       \</div>

<div>-<span class="" style="white-space:pre">   </span>.u.ext.model_emf_uri = &__ref_model_emf_uri___##_provider##___##_name, \</div><div>+<span class="" style="white-space:pre">      </span>.u = { .ext = { .model_emf_uri = &__ref_model_emf_uri___##_provider##___##_name } }, \</div>

<div> };</div><div> </div><div> #include TRACEPOINT_INCLUDE</div><div>diff --git a/tests/hello.cxx/Makefile.am b/tests/hello.cxx/Makefile.am</div><div>index 897416d..5f6c615 100644</div><div>--- a/tests/hello.cxx/Makefile.am</div>

<div>+++ b/tests/hello.cxx/Makefile.am</div><div>@@ -1,7 +1,7 @@</div><div> AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers</div><div> </div><div> noinst_PROGRAMS = hello</div><div>-hello_SOURCES = hello.cpp tp.c ust_tests_hello.h</div>

<div>+hello_SOURCES = hello.cpp tp.cpp ust_tests_hello.h</div><div> hello_LDADD = $(top_builddir)/liblttng-ust/<a href="http://liblttng-ust.la">liblttng-ust.la</a></div><div> </div><div> if LTTNG_UST_BUILD_WITH_LIBDL</div>

<div>diff --git a/tests/hello.cxx/tp.c b/tests/hello.cxx/tp.c</div><div>deleted file mode 100644</div><div>index 4790965..0000000</div><div>--- a/tests/hello.cxx/tp.c</div><div>+++ /dev/null</div><div>@@ -1,26 +0,0 @@</div>

<div>-/*</div><div>- * tp.c</div><div>- *</div><div>- * Copyright (c) 2011 Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>></div><div>- *</div><div>- * Permission is hereby granted, free of charge, to any person obtaining a copy</div>

<div>- * of this software and associated documentation files (the "Software"), to deal</div><div>- * in the Software without restriction, including without limitation the rights</div><div>- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</div>

<div>- * copies of the Software, and to permit persons to whom the Software is</div><div>- * furnished to do so, subject to the following conditions:</div><div>- *</div><div>- * The above copyright notice and this permission notice shall be included in</div>

<div>- * all copies or substantial portions of the Software.</div><div>- *</div><div>- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</div><div>- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</div>

<div>- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</div><div>- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</div><div>- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</div>

<div>- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</div><div>- * SOFTWARE.</div><div>- */</div><div>-</div><div>-#define TRACEPOINT_CREATE_PROBES</div><div>-#include "ust_tests_hello.h"</div>

<div>diff --git a/tests/hello.cxx/tp.cpp b/tests/hello.cxx/tp.cpp</div><div>new file mode 100644</div><div>index 0000000..a2099ab</div><div>--- /dev/null</div><div>+++ b/tests/hello.cxx/tp.cpp</div><div>@@ -0,0 +1,26 @@</div>

<div>+/*</div><div>+ * tp.cpp</div><div>+ *</div><div>+ * Copyright (c) 2011 Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>></div><div>+ *</div><div>+ * Permission is hereby granted, free of charge, to any person obtaining a copy</div>

<div>+ * of this software and associated documentation files (the "Software"), to deal</div><div>+ * in the Software without restriction, including without limitation the rights</div><div>+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</div>

<div>+ * copies of the Software, and to permit persons to whom the Software is</div><div>+ * furnished to do so, subject to the following conditions:</div><div>+ *</div><div>+ * The above copyright notice and this permission notice shall be included in</div>

<div>+ * all copies or substantial portions of the Software.</div><div>+ *</div><div>+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</div><div>+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</div>

<div>+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</div><div>+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</div><div>+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</div>

<div>+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</div><div>+ * SOFTWARE.</div><div>+ */</div><div>+</div><div>+#define TRACEPOINT_CREATE_PROBES</div><div>+#include "ust_tests_hello.h"</div>

<div>-- </div><div>1.8.2.1</div></div><div><br>--<br>Best Regards,<br>仝子飞 (Zifei Tong)<br>College of Computer Science and Technology, Zhejiang University<br><br><a href="mailto:soariez@gmail.com">soariez@gmail.com</a> / <a href="mailto:tongzifei@zju.edu.cn">tongzifei@zju.edu.cn</a></div>

</div></div>