X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Fust%2Fust_trace.h;h=66f1e878f355de9ab2651325ffdd73b5c3c92178;hb=7f0357f05bf1dae6e371b04a6f94d6912f0a0303;hp=01c241d644763e57a079878178e83cec68645e61;hpb=0c0686eefbf60682c54bc4b3c0bc593250deedc1;p=ust.git diff --git a/include/ust/ust_trace.h b/include/ust/ust_trace.h index 01c241d..66f1e87 100644 --- a/include/ust/ust_trace.h +++ b/include/ust/ust_trace.h @@ -76,16 +76,18 @@ { \ return unregister_trace_##name(trace_printf_##name, data); \ } \ - struct trace_event __event_##name \ - __attribute__((section("__trace_events"), aligned(32))) = { \ + struct trace_event __event_##name = { \ __tpstrtab_##name, \ register_event_##name, \ unregister_event_##name \ }; \ + static struct trace_event * const __event_ptrs_##name \ + __attribute__((used, section("__trace_events_ptrs"))) = \ + &__event_##name; \ + \ static void __attribute__((constructor)) init_##name() \ { \ - void *dummy; \ - printf("connecting tracepoint " #name "\n"); \ + void *dummy = NULL; \ register_trace_##name(trace_printf_##name, dummy); \ }