X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt-events.h;h=31a50ca5f34968d0705e22885d30d54289d0db51;hb=2001023e1ab9ae4bf85cad1dfb4c9aefb2e40dcf;hp=8cbe8efb5c691de42d845c9442c9e5aed91c3e8d;hpb=4cae220c1be2cc73008603a21152fce7643cfc35;p=lttng-modules.git diff --git a/ltt-events.h b/ltt-events.h index 8cbe8efb..31a50ca5 100644 --- a/ltt-events.h +++ b/ltt-events.h @@ -119,6 +119,17 @@ struct lttng_event_field { struct lttng_type type; }; +/* + * We need to keep this perf counter field separately from struct + * lttng_ctx_field because cpu hotplug needs fixed-location addresses. + */ +struct lttng_perf_counter_field { + struct notifier_block nb; + int hp_enable; + struct perf_event_attr *attr; + struct perf_event **e; /* per-cpu array */ +}; + struct lttng_ctx_field { struct lttng_event_field event_field; size_t (*get_size)(size_t offset); @@ -126,12 +137,7 @@ struct lttng_ctx_field { struct lib_ring_buffer_ctx *ctx, struct ltt_channel *chan); union { - struct { - struct perf_event **e; /* per-cpu array */ - struct notifier_block nb; - int hp_enable; - struct perf_event_attr *attr; - } perf_counter; + struct lttng_perf_counter_field *perf_counter; } u; void (*destroy)(struct lttng_ctx_field *field); };