X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Fevents.h;h=d25f4282dde15f79bd8e77202773307763fc6c1a;hb=a7eb2e3d0a4beb1ee80b132927641dd05ef2d542;hp=1eda3aca197fa5c69c197f09616e50198572a65a;hpb=f7d06400be7d046205c20277a03f3f31bf5b1703;p=lttng-modules.git diff --git a/include/lttng/events.h b/include/lttng/events.h index 1eda3aca..d25f4282 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -94,7 +94,7 @@ struct lttng_kernel_type_array { struct lttng_kernel_type_common parent; const struct lttng_kernel_type_common *elem_type; unsigned int length; /* Num. elems. */ - unsigned int alignment; + unsigned int alignment; /* Alignment in bytes before elements. */ enum lttng_kernel_string_encoding encoding; }; @@ -102,28 +102,28 @@ struct lttng_kernel_type_sequence { struct lttng_kernel_type_common parent; const char *length_name; /* Length field name. If NULL, use previous field. */ const struct lttng_kernel_type_common *elem_type; - unsigned int alignment; /* Alignment before elements. */ + unsigned int alignment; /* Alignment in bytes before elements. */ enum lttng_kernel_string_encoding encoding; }; struct lttng_kernel_type_struct { struct lttng_kernel_type_common parent; unsigned int nr_fields; - const struct lttng_kernel_event_field **fields; /* Array of pointers to fields. */ - unsigned int alignment; + const struct lttng_kernel_event_field * const *fields; /* Array of pointers to fields. */ + unsigned int alignment; /* Alignment in bits */ }; struct lttng_kernel_type_variant { struct lttng_kernel_type_common parent; const char *tag_name; /* Tag field name. If NULL, use previous field. */ - const struct lttng_kernel_event_field **choices; /* Array of pointers to fields. */ + const struct lttng_kernel_event_field * const *choices; /* Array of pointers to fields. */ unsigned int nr_choices; - unsigned int alignment; + unsigned int alignment; /* Alignment in bytes */ }; struct lttng_kernel_enum_desc { const char *name; - const struct lttng_kernel_enum_entry **entries; + const struct lttng_kernel_enum_entry * const *entries; unsigned int nr_entries; const struct lttng_kernel_probe_desc *probe_desc; }; @@ -300,7 +300,7 @@ struct lttng_kernel_probe_ctx { struct lttng_kernel_tracepoint_class { void (*probe_callback)(void); - const struct lttng_kernel_event_field **fields; /* event payload */ + const struct lttng_kernel_event_field * const *fields; /* event payload */ unsigned int nr_fields; const struct lttng_kernel_probe_desc *probe_desc; }; @@ -315,7 +315,7 @@ struct lttng_kernel_event_desc { struct lttng_kernel_probe_desc { const char *provider_name; - const struct lttng_kernel_event_desc **event_desc; + const struct lttng_kernel_event_desc * const *event_desc; unsigned int nr_events; struct list_head head; /* chain registered probes */ struct list_head lazy_init_head; @@ -383,15 +383,19 @@ struct lttng_kernel_channel_buffer_ops { 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); + size_t len, size_t alignment); void (*event_write_from_user)(struct lttng_kernel_ring_buffer_ctx *ctx, - const void *src, size_t len); + const void *src, size_t len, size_t alignment); void (*event_memset)(struct lttng_kernel_ring_buffer_ctx *ctx, int c, size_t len); void (*event_strcpy)(struct lttng_kernel_ring_buffer_ctx *ctx, const char *src, size_t len); void (*event_strcpy_from_user)(struct lttng_kernel_ring_buffer_ctx *ctx, const char __user *src, size_t len); + void (*event_pstrcpy_pad)(struct lttng_kernel_ring_buffer_ctx *ctx, + const char *src, size_t len); + void (*event_pstrcpy_pad_from_user)(struct lttng_kernel_ring_buffer_ctx *ctx, + const char __user *src, size_t len); void (*lost_event_too_big)(struct lttng_kernel_channel_buffer *lttng_channel); };