X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-perf-counters.c;h=dac953ffe961852dc21ce01cf85c3f7c66431929;hb=5152f6df156d6ccb234965d1b3d26b167bd6b94e;hp=75f6e66f576785aea09e9839d8a28c0d9290152a;hpb=3b8bedd809f1a5b56da5fc101a90b44263b0f473;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-perf-counters.c b/liblttng-ust/lttng-context-perf-counters.c index 75f6e66f..dac953ff 100644 --- a/liblttng-ust/lttng-context-perf-counters.c +++ b/liblttng-ust/lttng-context-perf-counters.c @@ -158,11 +158,12 @@ void lttng_perf_unlock(void) } static -size_t perf_counter_get_size(struct lttng_ust_ctx_field *field, size_t offset) +size_t perf_counter_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)), + size_t offset) { size_t size = 0; - size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); + size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t)); size += sizeof(uint64_t); return size; } @@ -445,8 +446,7 @@ void perf_counter_record(struct lttng_ust_ctx_field *field, uint64_t value; value = wrapper_perf_counter_read(field); - lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(value)); - chan->ops->event_write(ctx, &value, sizeof(value)); + chan->ops->event_write(ctx, &value, sizeof(value), lttng_ust_rb_alignof(value)); } static @@ -547,7 +547,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, goto perf_field_alloc_error; } ust_type = lttng_ust_create_type_integer(sizeof(uint64_t) * CHAR_BIT, - lttng_alignof(uint64_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint64_t) * CHAR_BIT, lttng_ust_is_signed_type(uint64_t), BYTE_ORDER, 10); if (!ust_type) {