X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fust%2Fust_trace.h;h=66f1e878f355de9ab2651325ffdd73b5c3c92178;hb=fc1caebc8a71283c7766549ebed47300d1b52945;hp=11d5940c68bed8ae85d1bb9b1f593fd8df9156d3;hpb=eb5d20c68aaf73661ffc02ba8fea3683c0358702;p=ust.git diff --git a/include/ust/ust_trace.h b/include/ust/ust_trace.h index 11d5940..66f1e87 100644 --- a/include/ust/ust_trace.h +++ b/include/ust/ust_trace.h @@ -76,12 +76,15 @@ { \ 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 = NULL; \