X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flttng-context-preemptible.c;h=2d6b2e344cb046f4bd1218a7f2550f52f34a7408;hb=928a843e1f731fd83e17ff90af697eb39387d7f7;hp=c6203a3c92d1b0ccd1dbcc8728ace8c890f50a98;hpb=a73e53681bc45743f2967be906dd3b587b99f09c;p=lttng-modules.git diff --git a/src/lttng-context-preemptible.c b/src/lttng-context-preemptible.c index c6203a3c..2d6b2e34 100644 --- a/src/lttng-context-preemptible.c +++ b/src/lttng-context-preemptible.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,7 @@ #define LTTNG_PREEMPT_DISABLE_NESTING 2 static -size_t preemptible_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset) +size_t preemptible_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { size_t size = 0; @@ -35,9 +36,9 @@ size_t preemptible_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_ } static -void preemptible_record(void *priv, struct lttng_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, - struct lttng_channel *chan) +void preemptible_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, + struct lttng_kernel_channel_buffer *chan) { int pc = preempt_count(); uint8_t preemptible = 0; @@ -45,13 +46,12 @@ void preemptible_record(void *priv, struct lttng_probe_ctx *probe_ctx, WARN_ON_ONCE(pc < LTTNG_PREEMPT_DISABLE_NESTING); if (pc == LTTNG_PREEMPT_DISABLE_NESTING) preemptible = 1; - lib_ring_buffer_align_ctx(ctx, lttng_alignof(preemptible)); - chan->ops->event_write(ctx, &preemptible, sizeof(preemptible)); + chan->ops->event_write(ctx, &preemptible, sizeof(preemptible), lttng_alignof(preemptible)); } static void preemptible_get_value(void *priv, - struct lttng_probe_ctx *lttng_probe_ctx, + struct lttng_kernel_probe_ctx *lttng_probe_ctx, struct lttng_ctx_value *value) { int pc = preempt_count(); @@ -66,7 +66,7 @@ void preemptible_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("preemptible", lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10), - false, false, false), + false, false), preemptible_get_size, preemptible_record, preemptible_get_value,