From 8a57ec025ffbe56153748fd69b60118862707182 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 3 May 2021 11:23:44 -0400 Subject: [PATCH] Rename struct lib_ring_buffer_ctx to struct lttng_kernel_ring_buffer_ctx Signed-off-by: Mathieu Desnoyers Change-Id: I81c3ef6dd226f2a27a32b303a096f60927462615 --- include/lttng/events-internal.h | 2 +- include/lttng/events.h | 16 +++++------ include/lttng/tracepoint-event-impl.h | 2 +- include/ringbuffer/backend.h | 10 +++---- include/ringbuffer/backend_internal.h | 4 +-- include/ringbuffer/config.h | 10 +++---- include/ringbuffer/frontend_api.h | 8 +++--- include/ringbuffer/frontend_internal.h | 2 +- src/lib/ringbuffer/ring_buffer_frontend.c | 4 +-- src/lttng-context-callstack-legacy-impl.h | 4 +-- src/lttng-context-callstack-stackwalk-impl.h | 4 +-- src/lttng-context-cgroup-ns.c | 2 +- src/lttng-context-cpu-id.c | 2 +- src/lttng-context-egid.c | 2 +- src/lttng-context-euid.c | 2 +- src/lttng-context-gid.c | 2 +- src/lttng-context-hostname.c | 2 +- src/lttng-context-interruptible.c | 2 +- src/lttng-context-ipc-ns.c | 2 +- src/lttng-context-migratable.c | 2 +- src/lttng-context-mnt-ns.c | 2 +- src/lttng-context-need-reschedule.c | 2 +- src/lttng-context-net-ns.c | 2 +- src/lttng-context-nice.c | 2 +- src/lttng-context-perf-counters.c | 2 +- src/lttng-context-pid-ns.c | 2 +- src/lttng-context-pid.c | 2 +- src/lttng-context-ppid.c | 2 +- src/lttng-context-preemptible.c | 2 +- src/lttng-context-prio.c | 2 +- src/lttng-context-procname.c | 2 +- src/lttng-context-sgid.c | 2 +- src/lttng-context-suid.c | 2 +- src/lttng-context-tid.c | 2 +- src/lttng-context-time-ns.c | 2 +- src/lttng-context-uid.c | 2 +- src/lttng-context-user-ns.c | 2 +- src/lttng-context-uts-ns.c | 2 +- src/lttng-context-vegid.c | 2 +- src/lttng-context-veuid.c | 2 +- src/lttng-context-vgid.c | 2 +- src/lttng-context-vpid.c | 2 +- src/lttng-context-vppid.c | 2 +- src/lttng-context-vsgid.c | 2 +- src/lttng-context-vsuid.c | 2 +- src/lttng-context-vtid.c | 2 +- src/lttng-context-vuid.c | 2 +- src/lttng-event-notifier-notification.c | 2 +- src/lttng-events.c | 2 +- src/lttng-ring-buffer-client.h | 28 +++++++++---------- src/lttng-ring-buffer-event-notifier-client.h | 18 ++++++------ src/lttng-ring-buffer-metadata-client.h | 16 +++++------ src/probes/lttng-kprobes.c | 2 +- src/probes/lttng-kretprobes.c | 2 +- src/probes/lttng-uprobes.c | 2 +- 55 files changed, 105 insertions(+), 105 deletions(-) diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index 9a807408..6b418977 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -216,7 +216,7 @@ struct lttng_kernel_ctx_field { size_t (*get_size)(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset); void (*record)(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan); void (*get_value)(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, struct lttng_ctx_value *value); diff --git a/include/lttng/events.h b/include/lttng/events.h index 9cc552bc..f852676b 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -28,7 +28,7 @@ struct lttng_channel; struct lttng_session; struct lttng_metadata_cache; -struct lib_ring_buffer_ctx; +struct lttng_kernel_ring_buffer_ctx; struct perf_event; struct perf_event_attr; struct lib_ring_buffer_config; @@ -374,17 +374,17 @@ struct lttng_kernel_event_notifier { struct lttng_kernel_channel_buffer_ops { struct lttng_kernel_channel_buffer_ops_private *priv; /* Private channel buffer ops interface. */ - int (*event_reserve)(struct lib_ring_buffer_ctx *ctx); - void (*event_commit)(struct lib_ring_buffer_ctx *ctx); - void (*event_write)(struct lib_ring_buffer_ctx *ctx, const void *src, + int (*event_reserve)(struct lttng_kernel_ring_buffer_ctx *ctx); + void (*event_commit)(struct lttng_kernel_ring_buffer_ctx *ctx); + void (*event_write)(struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len); - void (*event_write_from_user)(struct lib_ring_buffer_ctx *ctx, + void (*event_write_from_user)(struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len); - void (*event_memset)(struct lib_ring_buffer_ctx *ctx, + void (*event_memset)(struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len); - void (*event_strcpy)(struct lib_ring_buffer_ctx *ctx, const char *src, + void (*event_strcpy)(struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len); - void (*event_strcpy_from_user)(struct lib_ring_buffer_ctx *ctx, + void (*event_strcpy_from_user)(struct lttng_kernel_ring_buffer_ctx *ctx, const char __user *src, size_t len); }; diff --git a/include/lttng/tracepoint-event-impl.h b/include/lttng/tracepoint-event-impl.h index 8ddacaae..b75a791e 100644 --- a/include/lttng/tracepoint-event-impl.h +++ b/include/lttng/tracepoint-event-impl.h @@ -1080,7 +1080,7 @@ static void __event_probe__##_name(_data_proto) \ struct lttng_kernel_event_recorder *__event_recorder = \ container_of(__event, struct lttng_kernel_event_recorder, parent); \ struct lttng_channel *__chan = __event_recorder->chan; \ - struct lib_ring_buffer_ctx __ctx; \ + struct lttng_kernel_ring_buffer_ctx __ctx; \ ssize_t __event_len; \ size_t __event_align; \ int __ret; \ diff --git a/include/ringbuffer/backend.h b/include/ringbuffer/backend.h index 5ceb4f1a..5f0fd969 100644 --- a/include/ringbuffer/backend.h +++ b/include/ringbuffer/backend.h @@ -72,7 +72,7 @@ lib_ring_buffer_read_offset_address(struct lib_ring_buffer_backend *bufb, */ static inline __attribute__((always_inline)) void lib_ring_buffer_write(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; @@ -113,7 +113,7 @@ void lib_ring_buffer_write(const struct lib_ring_buffer_config *config, */ static inline void lib_ring_buffer_memset(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, int c, size_t len) + struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; @@ -210,7 +210,7 @@ size_t lib_ring_buffer_do_strcpy_from_user_inatomic(const struct lib_ring_buffer */ static inline void lib_ring_buffer_strcpy(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len, int pad) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; @@ -268,7 +268,7 @@ void lib_ring_buffer_strcpy(const struct lib_ring_buffer_config *config, */ static inline __attribute__((always_inline)) void lib_ring_buffer_copy_from_user_inatomic(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, const void __user *src, size_t len) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; @@ -335,7 +335,7 @@ fill_buffer: */ static inline void lib_ring_buffer_strcpy_from_user_inatomic(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, const void __user *src, size_t len, int pad) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; diff --git a/include/ringbuffer/backend_internal.h b/include/ringbuffer/backend_internal.h index 8a93ab07..9ab55e75 100644 --- a/include/ringbuffer/backend_internal.h +++ b/include/ringbuffer/backend_internal.h @@ -192,7 +192,7 @@ int subbuffer_id_check_index(const struct lib_ring_buffer_config *config, static inline void lib_ring_buffer_backend_get_pages(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lib_ring_buffer_backend_pages **backend_pages) { struct lib_ring_buffer_backend *bufb = &ctx->priv.buf->backend; @@ -216,7 +216,7 @@ void lib_ring_buffer_backend_get_pages(const struct lib_ring_buffer_config *conf static inline struct lib_ring_buffer_backend_pages * lib_ring_buffer_get_backend_pages_from_ctx(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx) + struct lttng_kernel_ring_buffer_ctx *ctx) { return ctx->priv.backend_pages; } diff --git a/include/ringbuffer/config.h b/include/ringbuffer/config.h index 9fc3f54e..4ce36d18 100644 --- a/include/ringbuffer/config.h +++ b/include/ringbuffer/config.h @@ -19,7 +19,7 @@ struct lib_ring_buffer; struct channel; struct lib_ring_buffer_config; -struct lib_ring_buffer_ctx; +struct lttng_kernel_ring_buffer_ctx; struct lttng_kernel_ring_buffer_ctx_private; /* @@ -36,7 +36,7 @@ struct lib_ring_buffer_client_cb { size_t (*record_header_size) (const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx); /* Slow path only, at subbuffer switch */ @@ -198,7 +198,7 @@ struct lttng_kernel_ring_buffer_ctx_private { * lib_ring_buffer_try_discard_reserve(), lib_ring_buffer_align_ctx() and * lib_ring_buffer_write(). */ -struct lib_ring_buffer_ctx { +struct lttng_kernel_ring_buffer_ctx { /* Private ring buffer context, set by reserve callback. */ struct lttng_kernel_ring_buffer_ctx_private priv; @@ -221,7 +221,7 @@ struct lib_ring_buffer_ctx { * @largest_align: largest alignment within data payload types */ static inline -void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx, +void lib_ring_buffer_ctx_init(struct lttng_kernel_ring_buffer_ctx *ctx, void *client_priv, size_t data_size, int largest_align, struct lttng_kernel_probe_ctx *probe_ctx) @@ -294,7 +294,7 @@ unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type) * @ctx: ring buffer context. */ static inline -void lib_ring_buffer_align_ctx(struct lib_ring_buffer_ctx *ctx, +void lib_ring_buffer_align_ctx(struct lttng_kernel_ring_buffer_ctx *ctx, size_t alignment) { ctx->priv.buf_offset += lib_ring_buffer_align(ctx->priv.buf_offset, diff --git a/include/ringbuffer/frontend_api.h b/include/ringbuffer/frontend_api.h index 1444e60a..49f0eee2 100644 --- a/include/ringbuffer/frontend_api.h +++ b/include/ringbuffer/frontend_api.h @@ -70,7 +70,7 @@ void lib_ring_buffer_put_cpu(const struct lib_ring_buffer_config *config) */ static inline int lib_ring_buffer_try_reserve(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx, unsigned long *o_begin, unsigned long *o_end, unsigned long *o_old, size_t *before_hdr_pad) @@ -140,7 +140,7 @@ int lib_ring_buffer_try_reserve(const struct lib_ring_buffer_config *config, static inline int lib_ring_buffer_reserve(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { struct channel *chan = ctx->priv.chan; @@ -229,7 +229,7 @@ void lib_ring_buffer_switch(const struct lib_ring_buffer_config *config, */ static inline void lib_ring_buffer_commit(const struct lib_ring_buffer_config *config, - const struct lib_ring_buffer_ctx *ctx) + const struct lttng_kernel_ring_buffer_ctx *ctx) { struct channel *chan = ctx->priv.chan; struct lib_ring_buffer *buf = ctx->priv.buf; @@ -301,7 +301,7 @@ void lib_ring_buffer_commit(const struct lib_ring_buffer_config *config, */ static inline int lib_ring_buffer_try_discard_reserve(const struct lib_ring_buffer_config *config, - const struct lib_ring_buffer_ctx *ctx) + const struct lttng_kernel_ring_buffer_ctx *ctx) { struct lib_ring_buffer *buf = ctx->priv.buf; unsigned long end_offset = ctx->priv.pre_offset + ctx->priv.slot_size; diff --git a/include/ringbuffer/frontend_internal.h b/include/ringbuffer/frontend_internal.h index 680c65bb..2624b4dc 100644 --- a/include/ringbuffer/frontend_internal.h +++ b/include/ringbuffer/frontend_internal.h @@ -134,7 +134,7 @@ int last_tsc_overflow(const struct lib_ring_buffer_config *config, #endif extern -int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx, +int lib_ring_buffer_reserve_slow(struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx); extern diff --git a/src/lib/ringbuffer/ring_buffer_frontend.c b/src/lib/ringbuffer/ring_buffer_frontend.c index d9e64dff..cd8d0aaa 100644 --- a/src/lib/ringbuffer/ring_buffer_frontend.c +++ b/src/lib/ringbuffer/ring_buffer_frontend.c @@ -1997,7 +1997,7 @@ static int lib_ring_buffer_try_reserve_slow(struct lib_ring_buffer *buf, struct channel *chan, struct switch_offsets *offsets, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { const struct lib_ring_buffer_config *config = &chan->backend.config; @@ -2172,7 +2172,7 @@ EXPORT_SYMBOL_GPL(lib_ring_buffer_lost_event_too_big); * -EIO for other errors, else returns 0. * It will take care of sub-buffer switching. */ -int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx, +int lib_ring_buffer_reserve_slow(struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { struct channel *chan = ctx->priv.chan; diff --git a/src/lttng-context-callstack-legacy-impl.h b/src/lttng-context-callstack-legacy-impl.h index 7d818e38..0e59aa6d 100644 --- a/src/lttng-context-callstack-legacy-impl.h +++ b/src/lttng-context-callstack-legacy-impl.h @@ -189,7 +189,7 @@ size_t lttng_callstack_sequence_get_size(void *priv, struct lttng_kernel_probe_c static void lttng_callstack_length_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int cpu = ctx->priv.reserve_cpu; @@ -209,7 +209,7 @@ void lttng_callstack_length_record(void *priv, struct lttng_kernel_probe_ctx *pr } static void lttng_callstack_sequence_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int cpu = ctx->priv.reserve_cpu; diff --git a/src/lttng-context-callstack-stackwalk-impl.h b/src/lttng-context-callstack-stackwalk-impl.h index 9c8f6d38..d3a57d86 100644 --- a/src/lttng-context-callstack-stackwalk-impl.h +++ b/src/lttng-context-callstack-stackwalk-impl.h @@ -194,7 +194,7 @@ size_t lttng_callstack_sequence_get_size(void *priv, struct lttng_kernel_probe_c static void lttng_callstack_length_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int cpu = ctx->priv.reserve_cpu; @@ -215,7 +215,7 @@ void lttng_callstack_length_record(void *priv, struct lttng_kernel_probe_ctx *pr static void lttng_callstack_sequence_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int cpu = ctx->priv.reserve_cpu; diff --git a/src/lttng-context-cgroup-ns.c b/src/lttng-context-cgroup-ns.c index 5e8c6155..3588d9cd 100644 --- a/src/lttng-context-cgroup-ns.c +++ b/src/lttng-context-cgroup-ns.c @@ -36,7 +36,7 @@ size_t cgroup_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, static void cgroup_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int cgroup_ns_inum = 0; diff --git a/src/lttng-context-cpu-id.c b/src/lttng-context-cpu-id.c index 1fa32ac2..467aef95 100644 --- a/src/lttng-context-cpu-id.c +++ b/src/lttng-context-cpu-id.c @@ -28,7 +28,7 @@ size_t cpu_id_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void cpu_id_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int cpu; diff --git a/src/lttng-context-egid.c b/src/lttng-context-egid.c index e1674fb8..902a5701 100644 --- a/src/lttng-context-egid.c +++ b/src/lttng-context-egid.c @@ -30,7 +30,7 @@ size_t egid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void egid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t egid; diff --git a/src/lttng-context-euid.c b/src/lttng-context-euid.c index 855e2552..6076a316 100644 --- a/src/lttng-context-euid.c +++ b/src/lttng-context-euid.c @@ -30,7 +30,7 @@ size_t euid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void euid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t euid; diff --git a/src/lttng-context-gid.c b/src/lttng-context-gid.c index 6d611088..c1906e25 100644 --- a/src/lttng-context-gid.c +++ b/src/lttng-context-gid.c @@ -30,7 +30,7 @@ size_t gid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t static void gid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t gid; diff --git a/src/lttng-context-hostname.c b/src/lttng-context-hostname.c index b12ff0bc..c34ed5cd 100644 --- a/src/lttng-context-hostname.c +++ b/src/lttng-context-hostname.c @@ -30,7 +30,7 @@ size_t hostname_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, s static void hostname_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { struct nsproxy *nsproxy; diff --git a/src/lttng-context-interruptible.c b/src/lttng-context-interruptible.c index 971b8b03..933b4d1f 100644 --- a/src/lttng-context-interruptible.c +++ b/src/lttng-context-interruptible.c @@ -33,7 +33,7 @@ size_t interruptible_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_c static void interruptible_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { struct lttng_kernel_probe_ctx *lttng_probe_ctx = ctx->probe_ctx; diff --git a/src/lttng-context-ipc-ns.c b/src/lttng-context-ipc-ns.c index 3bc3ffcb..5a805f1e 100644 --- a/src/lttng-context-ipc-ns.c +++ b/src/lttng-context-ipc-ns.c @@ -35,7 +35,7 @@ size_t ipc_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void ipc_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int ipc_ns_inum = 0; diff --git a/src/lttng-context-migratable.c b/src/lttng-context-migratable.c index 82401138..ed5200ea 100644 --- a/src/lttng-context-migratable.c +++ b/src/lttng-context-migratable.c @@ -29,7 +29,7 @@ size_t migratable_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, static void migratable_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uint8_t migratable = !current->migrate_disable; diff --git a/src/lttng-context-mnt-ns.c b/src/lttng-context-mnt-ns.c index 0f970699..b58a151e 100644 --- a/src/lttng-context-mnt-ns.c +++ b/src/lttng-context-mnt-ns.c @@ -37,7 +37,7 @@ size_t mnt_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void mnt_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int mnt_ns_inum = 0; diff --git a/src/lttng-context-need-reschedule.c b/src/lttng-context-need-reschedule.c index 090e6e55..0ceb6a5d 100644 --- a/src/lttng-context-need-reschedule.c +++ b/src/lttng-context-need-reschedule.c @@ -29,7 +29,7 @@ size_t need_reschedule_get_size(void *priv, struct lttng_kernel_probe_ctx *probe static void need_reschedule_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uint8_t need_reschedule = test_tsk_need_resched(current); diff --git a/src/lttng-context-net-ns.c b/src/lttng-context-net-ns.c index e0b4b4db..54c28e0f 100644 --- a/src/lttng-context-net-ns.c +++ b/src/lttng-context-net-ns.c @@ -36,7 +36,7 @@ size_t net_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void net_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int net_ns_inum = 0; diff --git a/src/lttng-context-nice.c b/src/lttng-context-nice.c index 031d39d9..fb698648 100644 --- a/src/lttng-context-nice.c +++ b/src/lttng-context-nice.c @@ -28,7 +28,7 @@ size_t nice_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void nice_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int nice; diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c index f3d7bdf1..72e920af 100644 --- a/src/lttng-context-perf-counters.c +++ b/src/lttng-context-perf-counters.c @@ -32,7 +32,7 @@ size_t perf_counter_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ct static void perf_counter_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { struct lttng_perf_counter_field *perf_field = (struct lttng_perf_counter_field *) priv; diff --git a/src/lttng-context-pid-ns.c b/src/lttng-context-pid-ns.c index d4ff5153..4c5a3e19 100644 --- a/src/lttng-context-pid-ns.c +++ b/src/lttng-context-pid-ns.c @@ -35,7 +35,7 @@ size_t pid_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void pid_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { struct pid_namespace *ns; diff --git a/src/lttng-context-pid.c b/src/lttng-context-pid.c index b43503e6..5f5a65a7 100644 --- a/src/lttng-context-pid.c +++ b/src/lttng-context-pid.c @@ -28,7 +28,7 @@ size_t pid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t static void pid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { pid_t pid; diff --git a/src/lttng-context-ppid.c b/src/lttng-context-ppid.c index c9a0d5c3..93cbc03c 100644 --- a/src/lttng-context-ppid.c +++ b/src/lttng-context-ppid.c @@ -29,7 +29,7 @@ size_t ppid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void ppid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { pid_t ppid; diff --git a/src/lttng-context-preemptible.c b/src/lttng-context-preemptible.c index 41b8ae5c..ac9aab59 100644 --- a/src/lttng-context-preemptible.c +++ b/src/lttng-context-preemptible.c @@ -37,7 +37,7 @@ size_t preemptible_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx static void preemptible_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int pc = preempt_count(); diff --git a/src/lttng-context-prio.c b/src/lttng-context-prio.c index f8f18a83..97c0672c 100644 --- a/src/lttng-context-prio.c +++ b/src/lttng-context-prio.c @@ -55,7 +55,7 @@ size_t prio_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void prio_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { int prio; diff --git a/src/lttng-context-procname.c b/src/lttng-context-procname.c index 22714946..e2517bc6 100644 --- a/src/lttng-context-procname.c +++ b/src/lttng-context-procname.c @@ -34,7 +34,7 @@ size_t procname_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, s */ static void procname_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { chan->ops->event_write(ctx, current->comm, sizeof(current->comm)); diff --git a/src/lttng-context-sgid.c b/src/lttng-context-sgid.c index 9af1a484..23c594f0 100644 --- a/src/lttng-context-sgid.c +++ b/src/lttng-context-sgid.c @@ -30,7 +30,7 @@ size_t sgid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void sgid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t sgid; diff --git a/src/lttng-context-suid.c b/src/lttng-context-suid.c index 916219eb..4d9b5af3 100644 --- a/src/lttng-context-suid.c +++ b/src/lttng-context-suid.c @@ -30,7 +30,7 @@ size_t suid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void suid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t suid; diff --git a/src/lttng-context-tid.c b/src/lttng-context-tid.c index 0b763fce..9438cb63 100644 --- a/src/lttng-context-tid.c +++ b/src/lttng-context-tid.c @@ -28,7 +28,7 @@ size_t tid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t static void tid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { pid_t tid; diff --git a/src/lttng-context-time-ns.c b/src/lttng-context-time-ns.c index 0fceef47..e6300b52 100644 --- a/src/lttng-context-time-ns.c +++ b/src/lttng-context-time-ns.c @@ -35,7 +35,7 @@ size_t time_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, si static void time_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int time_ns_inum = 0; diff --git a/src/lttng-context-uid.c b/src/lttng-context-uid.c index 9e17d5bc..434f7199 100644 --- a/src/lttng-context-uid.c +++ b/src/lttng-context-uid.c @@ -30,7 +30,7 @@ size_t uid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t static void uid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t uid; diff --git a/src/lttng-context-user-ns.c b/src/lttng-context-user-ns.c index 4ca4df2f..ae674667 100644 --- a/src/lttng-context-user-ns.c +++ b/src/lttng-context-user-ns.c @@ -35,7 +35,7 @@ size_t user_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, si static void user_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int user_ns_inum = 0; diff --git a/src/lttng-context-uts-ns.c b/src/lttng-context-uts-ns.c index 1f660215..35c4aded 100644 --- a/src/lttng-context-uts-ns.c +++ b/src/lttng-context-uts-ns.c @@ -35,7 +35,7 @@ size_t uts_ns_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, siz static void uts_ns_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { unsigned int uts_ns_inum = 0; diff --git a/src/lttng-context-vegid.c b/src/lttng-context-vegid.c index 3e43f6b0..9c010824 100644 --- a/src/lttng-context-vegid.c +++ b/src/lttng-context-vegid.c @@ -30,7 +30,7 @@ size_t vegid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size static void vegid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t vegid; diff --git a/src/lttng-context-veuid.c b/src/lttng-context-veuid.c index 965c3eec..775c078b 100644 --- a/src/lttng-context-veuid.c +++ b/src/lttng-context-veuid.c @@ -30,7 +30,7 @@ size_t veuid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size static void veuid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t veuid; diff --git a/src/lttng-context-vgid.c b/src/lttng-context-vgid.c index 1a03dd1a..689f2708 100644 --- a/src/lttng-context-vgid.c +++ b/src/lttng-context-vgid.c @@ -30,7 +30,7 @@ size_t vgid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void vgid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t vgid; diff --git a/src/lttng-context-vpid.c b/src/lttng-context-vpid.c index 83091db1..6a01e431 100644 --- a/src/lttng-context-vpid.c +++ b/src/lttng-context-vpid.c @@ -28,7 +28,7 @@ size_t vpid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void vpid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { pid_t vpid; diff --git a/src/lttng-context-vppid.c b/src/lttng-context-vppid.c index 5b438840..4d61fef0 100644 --- a/src/lttng-context-vppid.c +++ b/src/lttng-context-vppid.c @@ -29,7 +29,7 @@ size_t vppid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size static void vppid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { struct task_struct *parent; diff --git a/src/lttng-context-vsgid.c b/src/lttng-context-vsgid.c index f47f0d14..eb051f27 100644 --- a/src/lttng-context-vsgid.c +++ b/src/lttng-context-vsgid.c @@ -30,7 +30,7 @@ size_t vsgid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size static void vsgid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { gid_t vsgid; diff --git a/src/lttng-context-vsuid.c b/src/lttng-context-vsuid.c index 29ff30dc..8210e8f8 100644 --- a/src/lttng-context-vsuid.c +++ b/src/lttng-context-vsuid.c @@ -30,7 +30,7 @@ size_t vsuid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size static void vsuid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t vsuid; diff --git a/src/lttng-context-vtid.c b/src/lttng-context-vtid.c index 4e227577..17c4bf6f 100644 --- a/src/lttng-context-vtid.c +++ b/src/lttng-context-vtid.c @@ -28,7 +28,7 @@ size_t vtid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void vtid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { pid_t vtid; diff --git a/src/lttng-context-vuid.c b/src/lttng-context-vuid.c index 2ecc411e..2330991a 100644 --- a/src/lttng-context-vuid.c +++ b/src/lttng-context-vuid.c @@ -30,7 +30,7 @@ size_t vuid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_ static void vuid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_channel *chan) { uid_t vuid; diff --git a/src/lttng-event-notifier-notification.c b/src/lttng-event-notifier-notification.c index 0d4415db..1e4aa777 100644 --- a/src/lttng-event-notifier-notification.c +++ b/src/lttng-event-notifier-notification.c @@ -381,7 +381,7 @@ void notification_send(struct lttng_event_notifier_notification *notif, struct lttng_kernel_event_notifier *event_notifier) { struct lttng_event_notifier_group *event_notifier_group = event_notifier->priv->group; - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; struct lttng_kernel_abi_event_notifier_notification kernel_notif; size_t capture_buffer_content_len, reserve_size; int ret; diff --git a/src/lttng-events.c b/src/lttng-events.c index 172513f3..9d3631e4 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -2852,7 +2852,7 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group int lttng_metadata_output_channel(struct lttng_metadata_stream *stream, struct channel *chan, bool *coherent) { - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; int ret = 0; size_t len, reserve_len; diff --git a/src/lttng-ring-buffer-client.h b/src/lttng-ring-buffer-client.h index 8fa62073..1667095f 100644 --- a/src/lttng-ring-buffer-client.h +++ b/src/lttng-ring-buffer-client.h @@ -89,7 +89,7 @@ size_t ctx_get_aligned_size(size_t offset, struct lttng_kernel_ctx *ctx, static inline void ctx_get_struct_size(struct lttng_kernel_ctx *ctx, size_t *ctx_len, - struct lttng_channel *chan, struct lib_ring_buffer_ctx *bufctx) + struct lttng_channel *chan, struct lttng_kernel_ring_buffer_ctx *bufctx) { int i; size_t offset = 0; @@ -106,7 +106,7 @@ void ctx_get_struct_size(struct lttng_kernel_ctx *ctx, size_t *ctx_len, } static inline -void ctx_record(struct lib_ring_buffer_ctx *bufctx, +void ctx_record(struct lttng_kernel_ring_buffer_ctx *bufctx, struct lttng_channel *chan, struct lttng_kernel_ctx *ctx) { @@ -137,7 +137,7 @@ static __inline__ size_t record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, struct lttng_client_ctx *client_ctx) { struct lttng_channel *lttng_chan = channel_get_private(chan); @@ -189,7 +189,7 @@ size_t record_header_size(const struct lib_ring_buffer_config *config, static void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, uint32_t event_id); /* @@ -203,7 +203,7 @@ void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, */ static __inline__ void lttng_write_event_header(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, uint32_t event_id) { struct lttng_channel *lttng_chan = channel_get_private(ctx->priv.chan); @@ -252,7 +252,7 @@ slow_path: static void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, uint32_t event_id) { struct lttng_channel *lttng_chan = channel_get_private(ctx->priv.chan); @@ -326,7 +326,7 @@ static size_t client_record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { return record_header_size(config, chan, offset, @@ -603,7 +603,7 @@ void lttng_buffer_read_close(struct lib_ring_buffer *buf) } static -int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) +int lttng_event_reserve(struct lttng_kernel_ring_buffer_ctx *ctx) { struct lttng_kernel_event_recorder *event_recorder = ctx->client_priv; struct lttng_channel *lttng_chan = event_recorder->chan; @@ -648,42 +648,42 @@ put: } static -void lttng_event_commit(struct lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lttng_kernel_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); lib_ring_buffer_put_cpu(&client_config); } static -void lttng_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -void lttng_event_write_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_write_from_user(struct lttng_kernel_ring_buffer_ctx *ctx, const void __user *src, size_t len) { lib_ring_buffer_copy_from_user_inatomic(&client_config, ctx, src, len); } static -void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, +void lttng_event_memset(struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len) { lib_ring_buffer_memset(&client_config, ctx, c, len); } static -void lttng_event_strcpy(struct lib_ring_buffer_ctx *ctx, const char *src, +void lttng_event_strcpy(struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len) { lib_ring_buffer_strcpy(&client_config, ctx, src, len, '#'); } static -void lttng_event_strcpy_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_strcpy_from_user(struct lttng_kernel_ring_buffer_ctx *ctx, const char __user *src, size_t len) { lib_ring_buffer_strcpy_from_user_inatomic(&client_config, ctx, src, diff --git a/src/lttng-ring-buffer-event-notifier-client.h b/src/lttng-ring-buffer-event-notifier-client.h index 3b9dbfb7..9f438258 100644 --- a/src/lttng-ring-buffer-event-notifier-client.h +++ b/src/lttng-ring-buffer-event-notifier-client.h @@ -40,7 +40,7 @@ static inline size_t record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { size_t orig_offset = offset; @@ -67,7 +67,7 @@ static size_t client_record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { return record_header_size(config, chan, offset, @@ -288,7 +288,7 @@ void lttng_buffer_read_close(struct lib_ring_buffer *buf) static void lttng_write_event_notifier_header(const struct lib_ring_buffer_config *config, - struct lib_ring_buffer_ctx *ctx) + struct lttng_kernel_ring_buffer_ctx *ctx) { uint32_t data_size; @@ -302,7 +302,7 @@ void lttng_write_event_notifier_header(const struct lib_ring_buffer_config *conf } static -int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) +int lttng_event_reserve(struct lttng_kernel_ring_buffer_ctx *ctx) { struct channel *chan = ctx->client_priv; int ret; @@ -321,34 +321,34 @@ int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) } static -void lttng_event_commit(struct lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lttng_kernel_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); } static -void lttng_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -void lttng_event_write_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_write_from_user(struct lttng_kernel_ring_buffer_ctx *ctx, const void __user *src, size_t len) { lib_ring_buffer_copy_from_user_inatomic(&client_config, ctx, src, len); } static -void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, +void lttng_event_memset(struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len) { lib_ring_buffer_memset(&client_config, ctx, c, len); } static -void lttng_event_strcpy(struct lib_ring_buffer_ctx *ctx, const char *src, +void lttng_event_strcpy(struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len) { lib_ring_buffer_strcpy(&client_config, ctx, src, len, '#'); diff --git a/src/lttng-ring-buffer-metadata-client.h b/src/lttng-ring-buffer-metadata-client.h index ab393c8e..ff39fb04 100644 --- a/src/lttng-ring-buffer-metadata-client.h +++ b/src/lttng-ring-buffer-metadata-client.h @@ -46,7 +46,7 @@ static inline size_t record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { return 0; @@ -63,7 +63,7 @@ static size_t client_record_header_size(const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx) { return 0; @@ -301,7 +301,7 @@ void lttng_buffer_read_close(struct lib_ring_buffer *buf) } static -int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) +int lttng_event_reserve(struct lttng_kernel_ring_buffer_ctx *ctx) { struct channel *chan = ctx->client_priv; int ret; @@ -319,34 +319,34 @@ int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) } static -void lttng_event_commit(struct lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lttng_kernel_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); } static -void lttng_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lttng_kernel_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -void lttng_event_write_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_write_from_user(struct lttng_kernel_ring_buffer_ctx *ctx, const void __user *src, size_t len) { lib_ring_buffer_copy_from_user_inatomic(&client_config, ctx, src, len); } static -void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, +void lttng_event_memset(struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len) { lib_ring_buffer_memset(&client_config, ctx, c, len); } static -void lttng_event_strcpy(struct lib_ring_buffer_ctx *ctx, const char *src, +void lttng_event_strcpy(struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len) { lib_ring_buffer_strcpy(&client_config, ctx, src, len, '#'); diff --git a/src/probes/lttng-kprobes.c b/src/probes/lttng-kprobes.c index 1db8be49..7c77c566 100644 --- a/src/probes/lttng-kprobes.c +++ b/src/probes/lttng-kprobes.c @@ -60,7 +60,7 @@ int lttng_kprobes_event_handler_pre(struct kprobe *p, struct pt_regs *regs) struct lttng_kernel_event_recorder *event_recorder = container_of(event, struct lttng_kernel_event_recorder, parent); struct lttng_channel *chan = event_recorder->chan; - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; int ret; lib_ring_buffer_ctx_init(&ctx, event_recorder, sizeof(data), diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c index 30604b50..2677f8ab 100644 --- a/src/probes/lttng-kretprobes.c +++ b/src/probes/lttng-kretprobes.c @@ -75,7 +75,7 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, struct lttng_kernel_event_recorder *event_recorder = container_of(event, struct lttng_kernel_event_recorder, parent); struct lttng_channel *chan = event_recorder->chan; - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; int ret; payload.ip = (unsigned long) lttng_get_kretprobe(krpi)->kp.addr; diff --git a/src/probes/lttng-uprobes.c b/src/probes/lttng-uprobes.c index 4f2504e9..0240aaca 100644 --- a/src/probes/lttng-uprobes.c +++ b/src/probes/lttng-uprobes.c @@ -65,7 +65,7 @@ int lttng_uprobes_event_handler_pre(struct uprobe_consumer *uc, struct pt_regs * struct lttng_kernel_event_recorder *event_recorder = container_of(event, struct lttng_kernel_event_recorder, parent); struct lttng_channel *chan = event_recorder->chan; - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; int ret; lib_ring_buffer_ctx_init(&ctx, event_recorder, -- 2.34.1