+struct lttng_ctx_field {
+ struct lttng_event_field event_field;
+ size_t (*get_size)(size_t offset);
+ void (*record)(struct lttng_ctx_field *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;
+ } u;
+ void (*destroy)(struct lttng_ctx_field *field);
+};
+
+struct lttng_ctx {
+ struct lttng_ctx_field *fields;
+ unsigned int nr_fields;
+ unsigned int allocated_fields;
+};
+