From 0c7abe2bf26c7542a5b01d8b42e8af062a9d6166 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 4 Nov 2022 21:50:48 -0400 Subject: [PATCH] Rename side_arg_dynamic_event_struct and side_arg_dynamic_event_field Remove "event" part in name. Signed-off-by: Mathieu Desnoyers --- include/side/trace.h | 28 ++++++++++++++-------------- src/side.c | 6 +++--- src/test.c | 2 +- src/tracer.c | 8 ++++---- src/tracer.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/side/trace.h b/include/side/trace.h index 967572f..33918ac 100644 --- a/include/side/trace.h +++ b/include/side/trace.h @@ -29,7 +29,7 @@ struct side_event_field; struct side_tracer_visitor_ctx; struct side_tracer_dynamic_struct_visitor_ctx; struct side_event_description; -struct side_arg_dynamic_event_struct; +struct side_arg_dynamic_struct; struct side_events_register_handle; enum side_type_label { @@ -388,7 +388,7 @@ struct side_callback { void *priv); void (*call_variadic)(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv); } SIDE_PACKED u; void *priv; @@ -449,7 +449,7 @@ struct side_arg_dynamic { } SIDE_PACKED side_float; /* Compound types */ - const struct side_arg_dynamic_event_struct *side_dynamic_struct; + const struct side_arg_dynamic_struct *side_dynamic_struct; struct { void *app_ctx; side_dynamic_struct_visitor visitor; @@ -500,13 +500,13 @@ struct side_arg_dynamic_vla { uint32_t nr_attr; } SIDE_PACKED; -struct side_arg_dynamic_event_field { +struct side_arg_dynamic_field { const char *field_name; const struct side_arg elem; } SIDE_PACKED; -struct side_arg_dynamic_event_struct { - const struct side_arg_dynamic_event_field *fields; +struct side_arg_dynamic_struct { + const struct side_arg_dynamic_field *fields; const struct side_attr *attr; uint32_t len; uint32_t nr_attr; @@ -523,7 +523,7 @@ struct side_tracer_visitor_ctx { struct side_tracer_dynamic_struct_visitor_ctx { enum side_visitor_status (*write_field)( const struct side_tracer_dynamic_struct_visitor_ctx *tracer_ctx, - const struct side_arg_dynamic_event_field *dynamic_field); + const struct side_arg_dynamic_field *dynamic_field); void *priv; /* Private tracer context. */ } SIDE_PACKED; @@ -1245,8 +1245,8 @@ struct side_tracer_dynamic_struct_visitor_ctx { } #define side_arg_dynamic_define_struct(_identifier, _struct_fields, _attr) \ - const struct side_arg_dynamic_event_field _identifier##_fields[] = { _struct_fields }; \ - const struct side_arg_dynamic_event_struct _identifier = { \ + const struct side_arg_dynamic_field _identifier##_fields[] = { _struct_fields }; \ + const struct side_arg_dynamic_struct _identifier = { \ .fields = _identifier##_fields, \ .attr = _attr, \ .len = SIDE_ARRAY_SIZE(_identifier##_fields), \ @@ -1343,8 +1343,8 @@ struct side_tracer_dynamic_struct_visitor_ctx { .sav = side_sav, \ .len = SIDE_ARRAY_SIZE(side_sav), \ }; \ - const struct side_arg_dynamic_event_field side_fields[] = { _var_fields }; \ - const struct side_arg_dynamic_event_struct var_struct = { \ + const struct side_arg_dynamic_field side_fields[] = { _var_fields }; \ + const struct side_arg_dynamic_struct var_struct = { \ .fields = side_fields, \ .attr = _attr, \ .len = SIDE_ARRAY_SIZE(side_fields), \ @@ -1411,7 +1411,7 @@ void side_call(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec); void side_call_variadic(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct); + const struct side_arg_dynamic_struct *var_struct); int side_tracer_callback_register(struct side_event_description *desc, void (*call)(const struct side_event_description *desc, @@ -1421,7 +1421,7 @@ int side_tracer_callback_register(struct side_event_description *desc, int side_tracer_callback_variadic_register(struct side_event_description *desc, void (*call_variadic)(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv), void *priv); int side_tracer_callback_unregister(struct side_event_description *desc, @@ -1432,7 +1432,7 @@ int side_tracer_callback_unregister(struct side_event_description *desc, int side_tracer_callback_variadic_unregister(struct side_event_description *desc, void (*call_variadic)(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv), void *priv); diff --git a/src/side.c b/src/side.c index 23bb743..5740a07 100644 --- a/src/side.c +++ b/src/side.c @@ -92,7 +92,7 @@ void side_call(const struct side_event_description *desc, const struct side_arg_ void side_call_variadic(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct) + const struct side_arg_dynamic_struct *var_struct) { const struct side_callback *side_cb; unsigned int rcu_period; @@ -195,7 +195,7 @@ int side_tracer_callback_register(struct side_event_description *desc, int side_tracer_callback_variadic_register(struct side_event_description *desc, void (*call_variadic)(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv), void *priv) { @@ -267,7 +267,7 @@ int side_tracer_callback_unregister(struct side_event_description *desc, int side_tracer_callback_variadic_unregister(struct side_event_description *desc, void (*call_variadic)(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv), void *priv) { diff --git a/src/test.c b/src/test.c index 8694ed7..8a690b6 100644 --- a/src/test.c +++ b/src/test.c @@ -704,7 +704,7 @@ enum side_visitor_status test_dynamic_struct_visitor(const struct side_tracer_dy uint32_t length = ctx->length, i; for (i = 0; i < length; i++) { - struct side_arg_dynamic_event_field dynamic_field = { + struct side_arg_dynamic_field dynamic_field = { .field_name = ctx->ptr[i].name, .elem = side_arg_dynamic_u32(ctx->ptr[i].value, side_attr_list()), }; diff --git a/src/tracer.c b/src/tracer.c index 0996f66..0558390 100644 --- a/src/tracer.c +++ b/src/tracer.c @@ -1412,9 +1412,9 @@ type_error: } static -void tracer_print_dynamic_struct(const struct side_arg_dynamic_event_struct *dynamic_struct) +void tracer_print_dynamic_struct(const struct side_arg_dynamic_struct *dynamic_struct) { - const struct side_arg_dynamic_event_field *fields = dynamic_struct->fields; + const struct side_arg_dynamic_field *fields = dynamic_struct->fields; uint32_t len = dynamic_struct->len; int i; @@ -1437,7 +1437,7 @@ struct tracer_dynamic_struct_visitor_priv { static enum side_visitor_status tracer_dynamic_struct_write_elem_cb( const struct side_tracer_dynamic_struct_visitor_ctx *tracer_ctx, - const struct side_arg_dynamic_event_field *dynamic_field) + const struct side_arg_dynamic_field *dynamic_field) { struct tracer_dynamic_struct_visitor_priv *tracer_priv = tracer_ctx->priv; @@ -1641,7 +1641,7 @@ void tracer_call(const struct side_event_description *desc, void tracer_call_variadic(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv __attribute__((unused))) { uint32_t var_struct_len = var_struct->len; diff --git a/src/tracer.h b/src/tracer.h index e6fc012..1a3465b 100644 --- a/src/tracer.h +++ b/src/tracer.h @@ -13,7 +13,7 @@ void tracer_call(const struct side_event_description *desc, void *priv); void tracer_call_variadic(const struct side_event_description *desc, const struct side_arg_vec *side_arg_vec, - const struct side_arg_dynamic_event_struct *var_struct, + const struct side_arg_dynamic_struct *var_struct, void *priv); #endif -- 2.34.1