From: Simon Marchi Date: Tue, 21 Sep 2021 13:40:37 +0000 (-0400) Subject: liblttng-ctl: use export list to define exported symbols X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ca806b0b247f89c62ac628a7779ae84049a8c2d7;p=lttng-tools.git liblttng-ctl: use export list to define exported symbols Symbols are currently exported by default by liblttng-ctl.so (usable by other shared libraries / programs using liblttng-ctl.so), so we must use LTTNG_HIDDEN on all symbols that are meant to be internal to liblttng-ctl.so. Of course, this is easy to forget, so over the years many symbols that were not meant to be exported were exported, and must now stay exported to avoid breaking the ABI. As explained here [1], a better method is to make symbols hidden by default, and mark those we want to be exported as such. I have tried to use this, but when subsequently converting the code to C++, I have noticed that some symbols related to the STL were exported anyway, which is bad. The other alternative, implemented in this patch, is to use an explicit symbol export list [2], using libtool's -export-symbols (which uses the linker's -version-script option). Only the symbols listed here are exported. So, in practice, this patch: - Adds an liblttng-ctl.sym file with the list of exported symbols and adjusts the Makefile to use the -export-symbol option - Removes LTTNG_HIDDEN and all its uses abidiff shows no changes for liblttng-ctl.so between before and after this patch. [1] https://gcc.gnu.org/wiki/Visibility [2] https://www.gnu.org/software/libtool/manual/libtool.html#Link-mode Change-Id: I5d8c558303894b0ad8113c6e52f79a053bb580e1 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/action/action-internal.h b/include/lttng/action/action-internal.h index e97d4f032..71270a835 100644 --- a/include/lttng/action/action-internal.h +++ b/include/lttng/action/action-internal.h @@ -74,7 +74,6 @@ struct lttng_action_comm { int8_t action_type; } LTTNG_PACKED; -LTTNG_HIDDEN void lttng_action_init(struct lttng_action *action, enum lttng_action_type type, action_validate_cb validate, @@ -85,43 +84,31 @@ void lttng_action_init(struct lttng_action *action, action_add_error_query_results_cb add_error_query_results, action_mi_serialize_cb mi); -LTTNG_HIDDEN bool lttng_action_validate(struct lttng_action *action); -LTTNG_HIDDEN int lttng_action_serialize(struct lttng_action *action, struct lttng_payload *buf); -LTTNG_HIDDEN ssize_t lttng_action_create_from_payload(struct lttng_payload_view *view, struct lttng_action **action); -LTTNG_HIDDEN bool lttng_action_is_equal(const struct lttng_action *a, const struct lttng_action *b); -LTTNG_HIDDEN void lttng_action_get(struct lttng_action *action); -LTTNG_HIDDEN void lttng_action_put(struct lttng_action *action); -LTTNG_HIDDEN const char* lttng_action_type_string(enum lttng_action_type action_type); -LTTNG_HIDDEN void lttng_action_increase_execution_request_count(struct lttng_action *action); -LTTNG_HIDDEN void lttng_action_increase_execution_count(struct lttng_action *action); -LTTNG_HIDDEN void lttng_action_increase_execution_failure_count(struct lttng_action *action); -LTTNG_HIDDEN bool lttng_action_should_execute(const struct lttng_action *action); -LTTNG_HIDDEN enum lttng_action_status lttng_action_add_error_query_results( const struct lttng_action *action, struct lttng_error_query_results *results); @@ -131,11 +118,9 @@ enum lttng_action_status lttng_action_add_error_query_results( * behavior to the generic error "execution failure counter" that all actions * (except list, which passes-through) provide. */ -LTTNG_HIDDEN enum lttng_action_status lttng_action_generic_add_error_query_results( const struct lttng_action *action, struct lttng_error_query_results *results); -LTTNG_HIDDEN enum lttng_error_code lttng_action_mi_serialize(const struct lttng_trigger *trigger, const struct lttng_action *action, struct mi_writer *writer, diff --git a/include/lttng/action/list-internal.h b/include/lttng/action/list-internal.h index ea9fc0df0..231755fd6 100644 --- a/include/lttng/action/list-internal.h +++ b/include/lttng/action/list-internal.h @@ -25,16 +25,13 @@ struct lttng_trigger; * On success, return the number of bytes consumed from `view`, and the created * list in `*list`. On failure, return -1. */ -LTTNG_HIDDEN extern ssize_t lttng_action_list_create_from_payload( struct lttng_payload_view *view, struct lttng_action **list); -LTTNG_HIDDEN extern struct lttng_action *lttng_action_list_borrow_mutable_at_index( const struct lttng_action *list, unsigned int index); -LTTNG_HIDDEN enum lttng_error_code lttng_action_list_mi_serialize(const struct lttng_trigger *trigger, const struct lttng_action *action, struct mi_writer *writer, diff --git a/include/lttng/action/notify-internal.h b/include/lttng/action/notify-internal.h index d15532a04..8588ac295 100644 --- a/include/lttng/action/notify-internal.h +++ b/include/lttng/action/notify-internal.h @@ -16,7 +16,6 @@ struct lttng_action_notify { struct lttng_rate_policy *policy; }; -LTTNG_HIDDEN ssize_t lttng_action_notify_create_from_payload( struct lttng_payload_view *view, struct lttng_action **action); diff --git a/include/lttng/action/path-internal.h b/include/lttng/action/path-internal.h index 608f144c2..361c348fe 100644 --- a/include/lttng/action/path-internal.h +++ b/include/lttng/action/path-internal.h @@ -24,16 +24,13 @@ struct lttng_action_path { }; /* Assumes that 'dst' is uninitialized. */ -LTTNG_HIDDEN int lttng_action_path_copy(const struct lttng_action_path *src, struct lttng_action_path *dst); -LTTNG_HIDDEN ssize_t lttng_action_path_create_from_payload( struct lttng_payload_view *view, struct lttng_action_path **action_path); -LTTNG_HIDDEN int lttng_action_path_serialize(const struct lttng_action_path *action_path, struct lttng_payload *payload); diff --git a/include/lttng/action/rate-policy-internal.h b/include/lttng/action/rate-policy-internal.h index ca9d2c00e..c04cabcb2 100644 --- a/include/lttng/action/rate-policy-internal.h +++ b/include/lttng/action/rate-policy-internal.h @@ -15,31 +15,24 @@ struct mi_writer; -LTTNG_HIDDEN int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy, struct lttng_payload *buf); -LTTNG_HIDDEN ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view, struct lttng_rate_policy **rate_policy); -LTTNG_HIDDEN bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a, const struct lttng_rate_policy *b); -LTTNG_HIDDEN const char *lttng_rate_policy_type_string( enum lttng_rate_policy_type rate_policy_type); -LTTNG_HIDDEN struct lttng_rate_policy *lttng_rate_policy_copy( const struct lttng_rate_policy *source); -LTTNG_HIDDEN bool lttng_rate_policy_should_execute( const struct lttng_rate_policy *policy, uint64_t counter); -LTTNG_HIDDEN enum lttng_error_code lttng_rate_policy_mi_serialize( const struct lttng_rate_policy *policy, struct mi_writer *writer); diff --git a/include/lttng/action/rotate-session-internal.h b/include/lttng/action/rotate-session-internal.h index eb1e53451..9a451f81c 100644 --- a/include/lttng/action/rotate-session-internal.h +++ b/include/lttng/action/rotate-session-internal.h @@ -19,7 +19,6 @@ struct lttng_payload_view; * On success, return the number of bytes consumed from `view`, and the created * action in `*action`. On failure, return -1. */ -LTTNG_HIDDEN extern ssize_t lttng_action_rotate_session_create_from_payload( struct lttng_payload_view *view, struct lttng_action **action); diff --git a/include/lttng/action/snapshot-session-internal.h b/include/lttng/action/snapshot-session-internal.h index 87fbfa4d5..7396c2960 100644 --- a/include/lttng/action/snapshot-session-internal.h +++ b/include/lttng/action/snapshot-session-internal.h @@ -21,7 +21,6 @@ struct lttng_payload_view; * On success, return the number of bytes consumed from `view`, and the created * action in `*action`. On failure, return -1. */ -LTTNG_HIDDEN extern ssize_t lttng_action_snapshot_session_create_from_payload( struct lttng_payload_view *view, struct lttng_action **action); diff --git a/include/lttng/action/start-session-internal.h b/include/lttng/action/start-session-internal.h index bc15c78a6..56ffb71b4 100644 --- a/include/lttng/action/start-session-internal.h +++ b/include/lttng/action/start-session-internal.h @@ -19,7 +19,6 @@ struct lttng_payload_view; * On success, return the number of bytes consumed from `view`, and the created * action in `*action`. On failure, return -1. */ -LTTNG_HIDDEN extern ssize_t lttng_action_start_session_create_from_payload( struct lttng_payload_view *view, struct lttng_action **action); diff --git a/include/lttng/action/stop-session-internal.h b/include/lttng/action/stop-session-internal.h index 592ef0e2c..da4a5aac1 100644 --- a/include/lttng/action/stop-session-internal.h +++ b/include/lttng/action/stop-session-internal.h @@ -19,7 +19,6 @@ struct lttng_payload_view; * On success, return the number of bytes consumed from `view`, and the created * action in `*action`. On failure, return -1. */ -LTTNG_HIDDEN extern ssize_t lttng_action_stop_session_create_from_payload( struct lttng_payload_view *view, struct lttng_action **action); diff --git a/include/lttng/condition/buffer-usage-internal.h b/include/lttng/condition/buffer-usage-internal.h index be4eade5e..1e6d5a509 100644 --- a/include/lttng/condition/buffer-usage-internal.h +++ b/include/lttng/condition/buffer-usage-internal.h @@ -57,27 +57,22 @@ struct lttng_evaluation_buffer_usage_comm { uint64_t buffer_capacity; } LTTNG_PACKED; -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_buffer_usage_create( enum lttng_condition_type type, uint64_t use, uint64_t capacity); -LTTNG_HIDDEN ssize_t lttng_condition_buffer_usage_low_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN ssize_t lttng_condition_buffer_usage_high_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN ssize_t lttng_evaluation_buffer_usage_low_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation); -LTTNG_HIDDEN ssize_t lttng_evaluation_buffer_usage_high_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation); diff --git a/include/lttng/condition/condition-internal.h b/include/lttng/condition/condition-internal.h index 9552fa4a4..5bafaf05b 100644 --- a/include/lttng/condition/condition-internal.h +++ b/include/lttng/condition/condition-internal.h @@ -54,33 +54,25 @@ struct lttng_condition_comm { char payload[]; }; -LTTNG_HIDDEN void lttng_condition_get(struct lttng_condition *condition); -LTTNG_HIDDEN void lttng_condition_put(struct lttng_condition *condition); -LTTNG_HIDDEN void lttng_condition_init(struct lttng_condition *condition, enum lttng_condition_type type); -LTTNG_HIDDEN bool lttng_condition_validate(const struct lttng_condition *condition); -LTTNG_HIDDEN ssize_t lttng_condition_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN int lttng_condition_serialize(const struct lttng_condition *condition, struct lttng_payload *payload); -LTTNG_HIDDEN bool lttng_condition_is_equal(const struct lttng_condition *a, const struct lttng_condition *b); -LTTNG_HIDDEN enum lttng_error_code lttng_condition_mi_serialize( const struct lttng_trigger *trigger, const struct lttng_condition *condition, @@ -88,7 +80,6 @@ enum lttng_error_code lttng_condition_mi_serialize( const struct mi_lttng_error_query_callbacks *error_query_callbacks); -LTTNG_HIDDEN const char *lttng_condition_type_str(enum lttng_condition_type type); #endif /* LTTNG_CONDITION_INTERNAL_H */ diff --git a/include/lttng/condition/evaluation-internal.h b/include/lttng/condition/evaluation-internal.h index eaef721fb..12ea104d8 100644 --- a/include/lttng/condition/evaluation-internal.h +++ b/include/lttng/condition/evaluation-internal.h @@ -34,17 +34,14 @@ struct lttng_evaluation { evaluation_destroy_cb destroy; }; -LTTNG_HIDDEN void lttng_evaluation_init(struct lttng_evaluation *evaluation, enum lttng_condition_type type); -LTTNG_HIDDEN ssize_t lttng_evaluation_create_from_payload( const struct lttng_condition *condition, struct lttng_payload_view *view, struct lttng_evaluation **evaluation); -LTTNG_HIDDEN int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, struct lttng_payload *payload); diff --git a/include/lttng/condition/event-rule-matches-internal.h b/include/lttng/condition/event-rule-matches-internal.h index c98ab8c7f..ef39f4f04 100644 --- a/include/lttng/condition/event-rule-matches-internal.h +++ b/include/lttng/condition/event-rule-matches-internal.h @@ -51,45 +51,37 @@ struct lttng_evaluation_event_rule_matches { struct lttng_event_field_value *captured_values; }; -LTTNG_HIDDEN ssize_t lttng_condition_event_rule_matches_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN enum lttng_condition_status lttng_condition_event_rule_matches_borrow_rule_mutable( const struct lttng_condition *condition, struct lttng_event_rule **rule); -LTTNG_HIDDEN void lttng_condition_event_rule_matches_set_error_counter_index( struct lttng_condition *condition, uint64_t error_counter_index); -LTTNG_HIDDEN uint64_t lttng_condition_event_rule_matches_get_error_counter_index( const struct lttng_condition *condition); -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_event_rule_matches_create( const struct lttng_condition_event_rule_matches *condition, const char *capture_payload, size_t capture_payload_size, bool decode_capture_payload); -LTTNG_HIDDEN ssize_t lttng_evaluation_event_rule_matches_create_from_payload( const struct lttng_condition_event_rule_matches *condition, struct lttng_payload_view *view, struct lttng_evaluation **_evaluation); -LTTNG_HIDDEN enum lttng_error_code lttng_condition_event_rule_matches_generate_capture_descriptor_bytecode( struct lttng_condition *condition); -LTTNG_HIDDEN const struct lttng_bytecode * lttng_condition_event_rule_matches_get_capture_bytecode_at_index( const struct lttng_condition *condition, unsigned int index); diff --git a/include/lttng/condition/session-consumed-size-internal.h b/include/lttng/condition/session-consumed-size-internal.h index fdd3ecc11..9340a5f23 100644 --- a/include/lttng/condition/session-consumed-size-internal.h +++ b/include/lttng/condition/session-consumed-size-internal.h @@ -42,16 +42,13 @@ struct lttng_evaluation_session_consumed_size_comm { uint64_t session_consumed; } LTTNG_PACKED; -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_consumed_size_create( uint64_t consumed); -LTTNG_HIDDEN ssize_t lttng_condition_session_consumed_size_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN ssize_t lttng_evaluation_session_consumed_size_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation); diff --git a/include/lttng/condition/session-rotation-internal.h b/include/lttng/condition/session-rotation-internal.h index 7772b8bea..c723c6d6a 100644 --- a/include/lttng/condition/session-rotation-internal.h +++ b/include/lttng/condition/session-rotation-internal.h @@ -37,32 +37,26 @@ struct lttng_evaluation_session_rotation_comm { uint8_t has_location; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_condition_session_rotation_ongoing_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN ssize_t lttng_condition_session_rotation_completed_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition); -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create( uint64_t id); /* Ownership of location is transferred to the evaluation. */ -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_rotation_completed_create( uint64_t id, struct lttng_trace_archive_location *location); -LTTNG_HIDDEN ssize_t lttng_evaluation_session_rotation_ongoing_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation); -LTTNG_HIDDEN ssize_t lttng_evaluation_session_rotation_completed_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation); diff --git a/include/lttng/domain-internal.h b/include/lttng/domain-internal.h index 877fa2892..13d4a6bc1 100644 --- a/include/lttng/domain-internal.h +++ b/include/lttng/domain-internal.h @@ -15,7 +15,6 @@ extern "C" { #endif -LTTNG_HIDDEN const char *lttng_domain_type_str(enum lttng_domain_type domain_type); #ifdef __cplusplus diff --git a/include/lttng/error-query-internal.h b/include/lttng/error-query-internal.h index 506ebcf97..07e2280d7 100644 --- a/include/lttng/error-query-internal.h +++ b/include/lttng/error-query-internal.h @@ -23,73 +23,57 @@ enum lttng_error_query_target_type { LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION, }; -LTTNG_HIDDEN enum lttng_error_query_target_type lttng_error_query_get_target_type( const struct lttng_error_query *query); -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_trigger_borrow_target( const struct lttng_error_query *query); -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_condition_borrow_target( const struct lttng_error_query *query); -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target( const struct lttng_error_query *query); -LTTNG_HIDDEN struct lttng_action *lttng_error_query_action_borrow_action_target( const struct lttng_error_query *query, struct lttng_trigger *trigger); -LTTNG_HIDDEN int lttng_error_query_serialize(const struct lttng_error_query *query, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view, struct lttng_error_query **query); -LTTNG_HIDDEN int lttng_error_query_result_serialize( const struct lttng_error_query_result *result, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_error_query_result_create_from_payload( struct lttng_payload_view *view, struct lttng_error_query_result **result); -LTTNG_HIDDEN int lttng_error_query_results_serialize( const struct lttng_error_query_results *results, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_error_query_results_create_from_payload( struct lttng_payload_view *view, struct lttng_error_query_results **results); -LTTNG_HIDDEN struct lttng_error_query_result * lttng_error_query_result_counter_create( const char *name, const char *description, uint64_t value); -LTTNG_HIDDEN void lttng_error_query_result_destroy(struct lttng_error_query_result *result); -LTTNG_HIDDEN struct lttng_error_query_results *lttng_error_query_results_create(void); /* Ownership of `result` is transferred on success. */ -LTTNG_HIDDEN int lttng_error_query_results_add_result( struct lttng_error_query_results *results, struct lttng_error_query_result *result); -LTTNG_HIDDEN enum lttng_error_code lttng_error_query_results_mi_serialize( const struct lttng_error_query_results *results, struct mi_writer *writer); diff --git a/include/lttng/event-expr-internal.h b/include/lttng/event-expr-internal.h index 9d717b867..469fd17bb 100644 --- a/include/lttng/event-expr-internal.h +++ b/include/lttng/event-expr-internal.h @@ -57,11 +57,9 @@ bool lttng_event_expr_is_lvalue(const struct lttng_event_expr *expr) expr->type == LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT; } -LTTNG_HIDDEN int lttng_event_expr_to_bytecode(const struct lttng_event_expr *expr, struct lttng_bytecode **bytecode_out); -LTTNG_HIDDEN enum lttng_error_code lttng_event_expr_mi_serialize( const struct lttng_event_expr *expression, struct mi_writer *writer); diff --git a/include/lttng/event-field-value-internal.h b/include/lttng/event-field-value-internal.h index b7d513efd..510420ac0 100644 --- a/include/lttng/event-field-value-internal.h +++ b/include/lttng/event-field-value-internal.h @@ -113,7 +113,6 @@ struct lttng_event_field_value_array { * `LTTNG_EVENT_FIELD_VALUE_TYPE_SIGNED_ENUM`. * * `count` is `NULL`. */ -LTTNG_HIDDEN enum lttng_event_field_value_status lttng_event_field_value_enum_get_label_count( const struct lttng_event_field_value *field_val, @@ -130,60 +129,46 @@ lttng_event_field_value_enum_get_label_count( * * `index` is greater than or equal to the label count of `field_val`, * as returned by lttng_event_field_value_enum_get_label_count(). */ -LTTNG_HIDDEN const char *lttng_event_field_value_enum_get_label_at_index( const struct lttng_event_field_value *field_val, unsigned int index); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_uint_create( uint64_t val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_int_create( int64_t val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_enum_uint_create( uint64_t val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_enum_int_create( int64_t val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_real_create(double val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_string_create( const char *val); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_string_create_with_size( const char *val, size_t size); -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_array_create(void); -LTTNG_HIDDEN int lttng_event_field_value_enum_append_label( struct lttng_event_field_value *field_val, const char *label); -LTTNG_HIDDEN int lttng_event_field_value_enum_append_label_with_size( struct lttng_event_field_value *field_val, const char *label, size_t size); -LTTNG_HIDDEN int lttng_event_field_value_array_append( struct lttng_event_field_value *array_field_val, struct lttng_event_field_value *field_val); -LTTNG_HIDDEN int lttng_event_field_value_array_append_unavailable( struct lttng_event_field_value *array_field_val); -LTTNG_HIDDEN void lttng_event_field_value_destroy(struct lttng_event_field_value *field_val); #endif /* LTTNG_EVENT_FIELD_VALUE_INTERNAL_H */ diff --git a/include/lttng/event-internal.h b/include/lttng/event-internal.h index b3df4c9c2..8d03fbdec 100644 --- a/include/lttng/event-internal.h +++ b/include/lttng/event-internal.h @@ -33,7 +33,6 @@ struct lttng_event_extended { struct lttng_userspace_probe_location *probe_location; }; -LTTNG_HIDDEN struct lttng_event *lttng_event_copy(const struct lttng_event *event); #endif /* LTTNG_EVENT_INTERNAL_H */ diff --git a/include/lttng/event-rule/event-rule-internal.h b/include/lttng/event-rule/event-rule-internal.h index acd84827c..802674863 100644 --- a/include/lttng/event-rule/event-rule-internal.h +++ b/include/lttng/event-rule/event-rule-internal.h @@ -84,37 +84,28 @@ struct lttng_event_rule_comm { char payload[]; }; -LTTNG_HIDDEN void lttng_event_rule_init(struct lttng_event_rule *event_rule, enum lttng_event_rule_type type); -LTTNG_HIDDEN bool lttng_event_rule_validate(const struct lttng_event_rule *event_rule); -LTTNG_HIDDEN ssize_t lttng_event_rule_create_from_payload( struct lttng_payload_view *payload, struct lttng_event_rule **event_rule); -LTTNG_HIDDEN int lttng_event_rule_serialize(const struct lttng_event_rule *event_rule, struct lttng_payload *payload); -LTTNG_HIDDEN bool lttng_event_rule_is_equal(const struct lttng_event_rule *a, const struct lttng_event_rule *b); -LTTNG_HIDDEN bool lttng_event_rule_get(struct lttng_event_rule *rule); -LTTNG_HIDDEN void lttng_event_rule_put(struct lttng_event_rule *rule); -LTTNG_HIDDEN enum lttng_domain_type lttng_event_rule_get_domain_type( const struct lttng_event_rule *rule); -LTTNG_HIDDEN enum lttng_error_code lttng_event_rule_generate_filter_bytecode( struct lttng_event_rule *rule, const struct lttng_credentials *creds); @@ -123,14 +114,12 @@ enum lttng_error_code lttng_event_rule_generate_filter_bytecode( * If not present/implemented returns NULL. * Caller DOES NOT own the returned object. */ -LTTNG_HIDDEN const char *lttng_event_rule_get_filter(const struct lttng_event_rule *rule); /* * If not present/implemented returns NULL. * Caller DOES NOT own the returned object. */ -LTTNG_HIDDEN const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode( const struct lttng_event_rule *rule); @@ -138,15 +127,12 @@ const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode( * If not present/implemented return NULL. * Caller OWNS the returned object. */ -LTTNG_HIDDEN enum lttng_event_rule_generate_exclusions_status lttng_event_rule_generate_exclusions(const struct lttng_event_rule *rule, struct lttng_event_exclusion **exclusions); -LTTNG_HIDDEN const char *lttng_event_rule_type_str(enum lttng_event_rule_type type); -LTTNG_HIDDEN unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule); /* @@ -158,15 +144,12 @@ unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule); * * The caller owns the returned object. */ -LTTNG_HIDDEN struct lttng_event *lttng_event_rule_generate_lttng_event( const struct lttng_event_rule *rule); /* Test if an event rule targets an agent domain. */ -LTTNG_HIDDEN bool lttng_event_rule_targets_agent_domain(const struct lttng_event_rule *rule); -LTTNG_HIDDEN enum lttng_error_code lttng_event_rule_mi_serialize( const struct lttng_event_rule *rule, struct mi_writer *writer); diff --git a/include/lttng/event-rule/jul-logging-internal.h b/include/lttng/event-rule/jul-logging-internal.h index b1f6ee5be..21a99eb7e 100644 --- a/include/lttng/event-rule/jul-logging-internal.h +++ b/include/lttng/event-rule/jul-logging-internal.h @@ -51,7 +51,6 @@ struct lttng_event_rule_jul_logging_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_jul_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); diff --git a/include/lttng/event-rule/kernel-kprobe-internal.h b/include/lttng/event-rule/kernel-kprobe-internal.h index b6e40b3e2..16ac2bd3c 100644 --- a/include/lttng/event-rule/kernel-kprobe-internal.h +++ b/include/lttng/event-rule/kernel-kprobe-internal.h @@ -31,7 +31,6 @@ struct lttng_event_rule_kernel_kprobe_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_kprobe_create_from_payload( struct lttng_payload_view *payload, struct lttng_event_rule **rule); diff --git a/include/lttng/event-rule/kernel-syscall-internal.h b/include/lttng/event-rule/kernel-syscall-internal.h index a5b62743c..31905cef6 100644 --- a/include/lttng/event-rule/kernel-syscall-internal.h +++ b/include/lttng/event-rule/kernel-syscall-internal.h @@ -40,12 +40,10 @@ struct lttng_event_rule_kernel_syscall_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_syscall_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); -LTTNG_HIDDEN const char *lttng_event_rule_kernel_syscall_emission_site_str( enum lttng_event_rule_kernel_syscall_emission_site emission_site); #endif /* LTTNG_EVENT_RULE_KERNEL_SYSCALL_INTERNAL_H */ diff --git a/include/lttng/event-rule/kernel-tracepoint-internal.h b/include/lttng/event-rule/kernel-tracepoint-internal.h index f7065f924..e16596e64 100644 --- a/include/lttng/event-rule/kernel-tracepoint-internal.h +++ b/include/lttng/event-rule/kernel-tracepoint-internal.h @@ -44,7 +44,6 @@ struct lttng_event_rule_kernel_tracepoint_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_tracepoint_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); diff --git a/include/lttng/event-rule/kernel-uprobe-internal.h b/include/lttng/event-rule/kernel-uprobe-internal.h index e14dc431a..d8ce55793 100644 --- a/include/lttng/event-rule/kernel-uprobe-internal.h +++ b/include/lttng/event-rule/kernel-uprobe-internal.h @@ -32,12 +32,10 @@ struct lttng_event_rule_kernel_uprobe_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_uprobe_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); -LTTNG_HIDDEN struct lttng_userspace_probe_location * lttng_event_rule_kernel_uprobe_get_location_mutable( const struct lttng_event_rule *rule); diff --git a/include/lttng/event-rule/log4j-logging-internal.h b/include/lttng/event-rule/log4j-logging-internal.h index 14a662f68..7a1ac2831 100644 --- a/include/lttng/event-rule/log4j-logging-internal.h +++ b/include/lttng/event-rule/log4j-logging-internal.h @@ -51,7 +51,6 @@ struct lttng_event_rule_log4j_logging_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_log4j_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); diff --git a/include/lttng/event-rule/python-logging-internal.h b/include/lttng/event-rule/python-logging-internal.h index 13726a88f..9f6f7fe68 100644 --- a/include/lttng/event-rule/python-logging-internal.h +++ b/include/lttng/event-rule/python-logging-internal.h @@ -51,7 +51,6 @@ struct lttng_event_rule_python_logging_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_python_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); diff --git a/include/lttng/event-rule/user-tracepoint-internal.h b/include/lttng/event-rule/user-tracepoint-internal.h index bd391079c..9cd8b0582 100644 --- a/include/lttng/event-rule/user-tracepoint-internal.h +++ b/include/lttng/event-rule/user-tracepoint-internal.h @@ -58,7 +58,6 @@ struct lttng_event_rule_user_tracepoint_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN ssize_t lttng_event_rule_user_tracepoint_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **rule); diff --git a/include/lttng/kernel-probe-internal.h b/include/lttng/kernel-probe-internal.h index 2a655fb80..06c3d7c7e 100644 --- a/include/lttng/kernel-probe-internal.h +++ b/include/lttng/kernel-probe-internal.h @@ -84,30 +84,24 @@ struct lttng_kernel_probe_location_address { uint64_t address; }; -LTTNG_HIDDEN int lttng_kernel_probe_location_serialize( const struct lttng_kernel_probe_location *location, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_kernel_probe_location_create_from_payload( struct lttng_payload_view *view, struct lttng_kernel_probe_location **probe_location); -LTTNG_HIDDEN bool lttng_kernel_probe_location_is_equal( const struct lttng_kernel_probe_location *a, const struct lttng_kernel_probe_location *b); -LTTNG_HIDDEN struct lttng_kernel_probe_location *lttng_kernel_probe_location_copy( const struct lttng_kernel_probe_location *location); -LTTNG_HIDDEN unsigned long lttng_kernel_probe_location_hash( const struct lttng_kernel_probe_location *location); -LTTNG_HIDDEN enum lttng_error_code lttng_kernel_probe_location_mi_serialize( const struct lttng_kernel_probe_location *location, struct mi_writer *writer); diff --git a/include/lttng/location-internal.h b/include/lttng/location-internal.h index 45bd78a36..33498c90d 100644 --- a/include/lttng/location-internal.h +++ b/include/lttng/location-internal.h @@ -74,32 +74,26 @@ struct lttng_trace_archive_location_comm { } LTTNG_PACKED; -LTTNG_HIDDEN struct lttng_trace_archive_location *lttng_trace_archive_location_local_create( const char *path); -LTTNG_HIDDEN struct lttng_trace_archive_location *lttng_trace_archive_location_relay_create( const char *host, enum lttng_trace_archive_location_relay_protocol_type protocol, uint16_t control_port, uint16_t data_port, const char *relative_path); -LTTNG_HIDDEN ssize_t lttng_trace_archive_location_create_from_buffer( const struct lttng_buffer_view *buffer, struct lttng_trace_archive_location **location); -LTTNG_HIDDEN ssize_t lttng_trace_archive_location_serialize( const struct lttng_trace_archive_location *location, struct lttng_dynamic_buffer *buffer); -LTTNG_HIDDEN void lttng_trace_archive_location_get( struct lttng_trace_archive_location *location); -LTTNG_HIDDEN void lttng_trace_archive_location_put( struct lttng_trace_archive_location *location); diff --git a/include/lttng/log-level-rule-internal.h b/include/lttng/log-level-rule-internal.h index f3b2a1c2a..c17e590b7 100644 --- a/include/lttng/log-level-rule-internal.h +++ b/include/lttng/log-level-rule-internal.h @@ -35,34 +35,27 @@ struct lttng_log_level_rule_comm { int32_t level; }; -LTTNG_HIDDEN ssize_t lttng_log_level_rule_create_from_payload( struct lttng_payload_view *view, struct lttng_log_level_rule **rule); -LTTNG_HIDDEN int lttng_log_level_rule_serialize(const struct lttng_log_level_rule *rule, struct lttng_payload *payload); -LTTNG_HIDDEN bool lttng_log_level_rule_is_equal(const struct lttng_log_level_rule *a, const struct lttng_log_level_rule *b); -LTTNG_HIDDEN struct lttng_log_level_rule *lttng_log_level_rule_copy( const struct lttng_log_level_rule *source); -LTTNG_HIDDEN void lttng_log_level_rule_to_loglevel( const struct lttng_log_level_rule *log_level_rule, enum lttng_loglevel_type *loglevel_type, int *loglevel_value); -LTTNG_HIDDEN unsigned long lttng_log_level_rule_hash( const struct lttng_log_level_rule *log_level_rule); -LTTNG_HIDDEN enum lttng_error_code lttng_log_level_rule_mi_serialize( const struct lttng_log_level_rule *rule, struct mi_writer *writer); diff --git a/include/lttng/notification/notification-internal.h b/include/lttng/notification/notification-internal.h index dc3a0e1d6..7e601b0c7 100644 --- a/include/lttng/notification/notification-internal.h +++ b/include/lttng/notification/notification-internal.h @@ -29,16 +29,13 @@ struct lttng_notification_comm { char payload[]; } LTTNG_PACKED; -LTTNG_HIDDEN struct lttng_notification *lttng_notification_create( struct lttng_trigger *trigger, struct lttng_evaluation *evaluation); -LTTNG_HIDDEN int lttng_notification_serialize(const struct lttng_notification *notification, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_notification_create_from_payload( struct lttng_payload_view *view, struct lttng_notification **notification); diff --git a/include/lttng/session-descriptor-internal.h b/include/lttng/session-descriptor-internal.h index 96ba07c98..f438d4812 100644 --- a/include/lttng/session-descriptor-internal.h +++ b/include/lttng/session-descriptor-internal.h @@ -33,62 +33,50 @@ enum lttng_session_descriptor_output_type { LTTNG_SESSION_DESCRIPTOR_OUTPUT_TYPE_NETWORK = 2, }; -LTTNG_HIDDEN ssize_t lttng_session_descriptor_create_from_buffer( const struct lttng_buffer_view *view, struct lttng_session_descriptor **descriptor); -LTTNG_HIDDEN int lttng_session_descriptor_serialize( const struct lttng_session_descriptor *descriptor, struct lttng_dynamic_buffer *buffer); -LTTNG_HIDDEN enum lttng_session_descriptor_type lttng_session_descriptor_get_type( const struct lttng_session_descriptor *descriptor); -LTTNG_HIDDEN enum lttng_session_descriptor_output_type lttng_session_descriptor_get_output_type( const struct lttng_session_descriptor *descriptor); -LTTNG_HIDDEN void lttng_session_descriptor_get_local_output_uri( const struct lttng_session_descriptor *descriptor, struct lttng_uri *local_uri); -LTTNG_HIDDEN void lttng_session_descriptor_get_network_output_uris( const struct lttng_session_descriptor *descriptor, struct lttng_uri *control, struct lttng_uri *data); -LTTNG_HIDDEN unsigned long long lttng_session_descriptor_live_get_timer_interval( const struct lttng_session_descriptor *descriptor); -LTTNG_HIDDEN int lttng_session_descriptor_set_session_name( struct lttng_session_descriptor *descriptor, const char *name); -LTTNG_HIDDEN bool lttng_session_descriptor_is_output_destination_initialized( const struct lttng_session_descriptor *descriptor); -LTTNG_HIDDEN bool lttng_session_descriptor_has_output_directory( const struct lttng_session_descriptor *descriptor); -LTTNG_HIDDEN enum lttng_error_code lttng_session_descriptor_set_default_output( struct lttng_session_descriptor *descriptor, time_t *session_creation_time, const char *absolute_home_path); -LTTNG_HIDDEN int lttng_session_descriptor_assign( struct lttng_session_descriptor *dst_descriptor, const struct lttng_session_descriptor *src_descriptor); diff --git a/include/lttng/trigger/trigger-internal.h b/include/lttng/trigger/trigger-internal.h index 80cf0cb56..dab46ae07 100644 --- a/include/lttng/trigger/trigger-internal.h +++ b/include/lttng/trigger/trigger-internal.h @@ -105,53 +105,40 @@ struct lttng_triggers_comm { char payload[]; }; -LTTNG_HIDDEN ssize_t lttng_trigger_create_from_payload(struct lttng_payload_view *view, struct lttng_trigger **trigger); -LTTNG_HIDDEN int lttng_trigger_serialize(const struct lttng_trigger *trigger, struct lttng_payload *payload); -LTTNG_HIDDEN bool lttng_trigger_validate(const struct lttng_trigger *trigger); -LTTNG_HIDDEN int lttng_trigger_assign_name( struct lttng_trigger *dst, const struct lttng_trigger *src); -LTTNG_HIDDEN void lttng_trigger_set_tracer_token( struct lttng_trigger *trigger, uint64_t token); -LTTNG_HIDDEN uint64_t lttng_trigger_get_tracer_token(const struct lttng_trigger *trigger); -LTTNG_HIDDEN int lttng_trigger_generate_name(struct lttng_trigger *trigger, uint64_t unique_id); -LTTNG_HIDDEN bool lttng_trigger_is_equal( const struct lttng_trigger *a, const struct lttng_trigger *b); -LTTNG_HIDDEN bool lttng_trigger_is_hidden(const struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_set_hidden(struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_get(struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_put(struct lttng_trigger *trigger); /* * Serialize a trigger to a mi_writer. * Return LTTNG_OK in success, other enum lttng_error_code on error. */ -LTTNG_HIDDEN enum lttng_error_code lttng_trigger_mi_serialize(const struct lttng_trigger *trigger, struct mi_writer *writer, const struct mi_lttng_error_query_callbacks @@ -161,7 +148,6 @@ enum lttng_error_code lttng_trigger_mi_serialize(const struct lttng_trigger *tri * Allocate a new set of triggers. * The returned object must be freed via lttng_triggers_destroy. */ -LTTNG_HIDDEN struct lttng_triggers *lttng_triggers_create(void); /* @@ -174,7 +160,6 @@ struct lttng_triggers *lttng_triggers_create(void); * The ownership of the trigger set element is NOT transfered. * The returned object can NOT be freed via lttng_trigger_destroy. */ -LTTNG_HIDDEN struct lttng_trigger *lttng_triggers_borrow_mutable_at_index( const struct lttng_triggers *triggers, unsigned int index); @@ -184,25 +169,21 @@ struct lttng_trigger *lttng_triggers_borrow_mutable_at_index( * A reference to the added trigger is acquired on behalf of the trigger set * on success. */ -LTTNG_HIDDEN int lttng_triggers_add( struct lttng_triggers *triggers, struct lttng_trigger *trigger); /* * Remove all triggers marked as hidden from the provided trigger set. */ -LTTNG_HIDDEN int lttng_triggers_remove_hidden_triggers(struct lttng_triggers *triggers); /* * Serialize a trigger set to an lttng_payload object. * Return LTTNG_OK on success, negative lttng error code on error. */ -LTTNG_HIDDEN int lttng_triggers_serialize(const struct lttng_triggers *triggers, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_triggers_create_from_payload(struct lttng_payload_view *view, struct lttng_triggers **triggers); @@ -210,17 +191,14 @@ ssize_t lttng_triggers_create_from_payload(struct lttng_payload_view *view, * Serialize a trigger set to a mi_writer. * Return LTTNG_OK in success, other enum lttng_error_code on error. */ -LTTNG_HIDDEN enum lttng_error_code lttng_triggers_mi_serialize(const struct lttng_triggers *triggers, struct mi_writer *writer, const struct mi_lttng_error_query_callbacks *error_query_callbacks); -LTTNG_HIDDEN const struct lttng_credentials *lttng_trigger_get_credentials( const struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_set_credentials(struct lttng_trigger *trigger, const struct lttng_credentials *creds); @@ -228,7 +206,6 @@ void lttng_trigger_set_credentials(struct lttng_trigger *trigger, * Return the type of any underlying domain restriction. If no particular * requirement is present, returns LTTNG_DOMAIN_NONE. */ -LTTNG_HIDDEN enum lttng_domain_type lttng_trigger_get_underlying_domain_type_restriction( const struct lttng_trigger *trigger); @@ -236,7 +213,6 @@ enum lttng_domain_type lttng_trigger_get_underlying_domain_type_restriction( * Generate any bytecode related to the trigger. * On success LTTNG_OK. On error, returns lttng_error code. */ -LTTNG_HIDDEN enum lttng_error_code lttng_trigger_generate_bytecode( struct lttng_trigger *trigger, const struct lttng_credentials *creds); @@ -247,7 +223,6 @@ enum lttng_error_code lttng_trigger_generate_bytecode( * the moment of the copy, it is the caller's responsability to lock it for * the duration of the copy. */ -LTTNG_HIDDEN struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger); /* @@ -256,13 +231,10 @@ struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger); * AND * it has one or more sessiond-execution action. */ -LTTNG_HIDDEN bool lttng_trigger_needs_tracer_notifier(const struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_set_as_registered(struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_set_as_unregistered(struct lttng_trigger *trigger); /* @@ -274,26 +246,20 @@ void lttng_trigger_set_as_unregistered(struct lttng_trigger *trigger); * the trigger lock for the duration of the manipulation using * `lttng_trigger_lock` and `lttng_trigger_unlock`. */ -LTTNG_HIDDEN bool lttng_trigger_is_registered(struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_lock(struct lttng_trigger *trigger); -LTTNG_HIDDEN void lttng_trigger_unlock(struct lttng_trigger *trigger); -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results); -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_condition_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results); -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_action_error_query_results( struct lttng_trigger *trigger, struct lttng_error_query_results *results); @@ -309,7 +275,6 @@ enum lttng_trigger_status lttng_trigger_add_action_error_query_results( * Return LTTNG_TRIGGER_STATUS_OK on success, LTTNG_TRIGGER_STATUS_INVALID * if invalid parameters are passed. */ -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_set_name( struct lttng_trigger *trigger, const char *name); diff --git a/include/lttng/userspace-probe-internal.h b/include/lttng/userspace-probe-internal.h index e0075974f..5e960c106 100644 --- a/include/lttng/userspace-probe-internal.h +++ b/include/lttng/userspace-probe-internal.h @@ -124,12 +124,10 @@ struct lttng_userspace_probe_location_tracepoint { struct fd_handle *binary_fd_handle; }; -LTTNG_HIDDEN int lttng_userspace_probe_location_serialize( const struct lttng_userspace_probe_location *location, struct lttng_payload *payload); -LTTNG_HIDDEN int lttng_userspace_probe_location_create_from_payload( struct lttng_payload_view *view, struct lttng_userspace_probe_location **probe_location); @@ -139,30 +137,24 @@ int lttng_userspace_probe_location_create_from_payload( * of memory. Pass NULL to buffer to only get the storage requirement of the * flattened userspace probe location. */ -LTTNG_HIDDEN int lttng_userspace_probe_location_flatten( const struct lttng_userspace_probe_location *location, struct lttng_dynamic_buffer *buffer); -LTTNG_HIDDEN struct lttng_userspace_probe_location *lttng_userspace_probe_location_copy( const struct lttng_userspace_probe_location *location); -LTTNG_HIDDEN bool lttng_userspace_probe_location_lookup_method_is_equal( const struct lttng_userspace_probe_location_lookup_method *a, const struct lttng_userspace_probe_location_lookup_method *b); -LTTNG_HIDDEN bool lttng_userspace_probe_location_is_equal( const struct lttng_userspace_probe_location *a, const struct lttng_userspace_probe_location *b); -LTTNG_HIDDEN unsigned long lttng_userspace_probe_location_hash( const struct lttng_userspace_probe_location *location); -LTTNG_HIDDEN enum lttng_error_code lttng_userspace_probe_location_mi_serialize( const struct lttng_userspace_probe_location *location, struct mi_writer *writer); diff --git a/src/bin/lttng-relayd/tcp_keep_alive.c b/src/bin/lttng-relayd/tcp_keep_alive.c index 2a0264e11..94bf4ab93 100644 --- a/src/bin/lttng-relayd/tcp_keep_alive.c +++ b/src/bin/lttng-relayd/tcp_keep_alive.c @@ -518,7 +518,6 @@ void tcp_keep_alive_init(void) /* * Set the socket options regarding TCP keep-alive. */ -LTTNG_HIDDEN int socket_apply_keep_alive_config(int socket_fd) { int ret; diff --git a/src/bin/lttng-relayd/tcp_keep_alive.h b/src/bin/lttng-relayd/tcp_keep_alive.h index ae6db48ee..223602835 100644 --- a/src/bin/lttng-relayd/tcp_keep_alive.h +++ b/src/bin/lttng-relayd/tcp_keep_alive.h @@ -10,7 +10,6 @@ #include -LTTNG_HIDDEN int socket_apply_keep_alive_config(int socket_fd); #endif /* RELAYD_TCP_KEEP_ALIVE_H */ diff --git a/src/bin/lttng-sessiond/condition-internal.c b/src/bin/lttng-sessiond/condition-internal.c index caab613aa..dd9c244b3 100644 --- a/src/bin/lttng-sessiond/condition-internal.c +++ b/src/bin/lttng-sessiond/condition-internal.c @@ -131,7 +131,6 @@ unsigned long lttng_condition_hash(const struct lttng_condition *condition) } } -LTTNG_HIDDEN struct lttng_condition *lttng_condition_copy(const struct lttng_condition *condition) { int ret; diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 59b94137f..ffbde695e 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -1926,7 +1926,6 @@ error: /* * Setup necessary data for kernel tracer action. */ -LTTNG_HIDDEN int init_kernel_tracer(void) { int ret; @@ -2067,7 +2066,6 @@ error: } } -LTTNG_HIDDEN void cleanup_kernel_tracer(void) { DBG2("Closing kernel event notifier group notification file descriptor"); @@ -2121,7 +2119,6 @@ void cleanup_kernel_tracer(void) free(syscall_table); } -LTTNG_HIDDEN bool kernel_tracer_is_initialized(void) { return kernel_tracer_fd >= 0; diff --git a/src/bin/lttng-sessiond/notification-thread-commands.c b/src/bin/lttng-sessiond/notification-thread-commands.c index a083d51af..2908ccb76 100644 --- a/src/bin/lttng-sessiond/notification-thread-commands.c +++ b/src/bin/lttng-sessiond/notification-thread-commands.c @@ -414,7 +414,6 @@ end: /* * Takes ownership of the payload if present. */ -LTTNG_HIDDEN struct lttng_event_notifier_notification *lttng_event_notifier_notification_create( uint64_t tracer_token, enum lttng_domain_type domain, @@ -441,7 +440,6 @@ end: return notification; } -LTTNG_HIDDEN void lttng_event_notifier_notification_destroy( struct lttng_event_notifier_notification *notification) { diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index e2fa30681..38eb85a1e 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -654,7 +654,6 @@ error: return NULL; } -LTTNG_HIDDEN bool notification_client_list_get(struct notification_client_list *list) { return urcu_ref_get_unless_zero(&list->ref); @@ -4345,7 +4344,6 @@ int send_evaluation_to_clients(const struct lttng_trigger *trigger, * interference from external users (those could, for instance, unregister * their triggers). */ -LTTNG_HIDDEN int notification_client_list_send_evaluation( struct notification_client_list *client_list, const struct lttng_trigger *trigger, diff --git a/src/bin/lttng-sessiond/notification-thread-internal.h b/src/bin/lttng-sessiond/notification-thread-internal.h index 800e8fd83..9e7059acf 100644 --- a/src/bin/lttng-sessiond/notification-thread-internal.h +++ b/src/bin/lttng-sessiond/notification-thread-internal.h @@ -225,10 +225,8 @@ enum client_transmission_status { CLIENT_TRANSMISSION_STATUS_ERROR, }; -LTTNG_HIDDEN bool notification_client_list_get(struct notification_client_list *list); -LTTNG_HIDDEN void notification_client_list_put(struct notification_client_list *list); /* Only returns a non-zero value if a fatal error occurred. */ @@ -237,7 +235,6 @@ typedef int (*report_client_transmission_result_cb)( enum client_transmission_status status, void *user_data); -LTTNG_HIDDEN int notification_client_list_send_evaluation( struct notification_client_list *list, const struct lttng_trigger *trigger, @@ -246,7 +243,6 @@ int notification_client_list_send_evaluation( report_client_transmission_result_cb client_report, void *user_data); -LTTNG_HIDDEN int notification_thread_client_communication_update( struct notification_thread_handle *handle, notification_client_id id, @@ -255,14 +251,12 @@ int notification_thread_client_communication_update( /* * Takes ownership of the payload if present. */ -LTTNG_HIDDEN struct lttng_event_notifier_notification *lttng_event_notifier_notification_create( uint64_t tracer_token, enum lttng_domain_type domain, char *payload, size_t payload_size); -LTTNG_HIDDEN void lttng_event_notifier_notification_destroy( struct lttng_event_notifier_notification *event_notifier_notification); diff --git a/src/bin/lttng-sessiond/sessiond-config.c b/src/bin/lttng-sessiond/sessiond-config.c index 2cdbbad52..707e57950 100644 --- a/src/bin/lttng-sessiond/sessiond-config.c +++ b/src/bin/lttng-sessiond/sessiond-config.c @@ -80,7 +80,6 @@ void config_string_set_static(struct config_string *config_str, } /* Only use for dynamically-allocated strings. */ -LTTNG_HIDDEN void config_string_set(struct config_string *config_str, char *value) { LTTNG_ASSERT(config_str); @@ -93,7 +92,6 @@ void config_string_set(struct config_string *config_str, char *value) config_str->value = value; } -LTTNG_HIDDEN int sessiond_config_apply_env_config(struct sessiond_config *config) { int ret = 0; @@ -246,7 +244,6 @@ end: return ret; } -LTTNG_HIDDEN int sessiond_config_init(struct sessiond_config *config) { int ret; @@ -401,7 +398,6 @@ error: return ret; } -LTTNG_HIDDEN void sessiond_config_fini(struct sessiond_config *config) { config_string_fini(&config->tracing_group_name); @@ -457,7 +453,6 @@ end: if (resolve_path(path_config_str)) \ return -1 -LTTNG_HIDDEN int sessiond_config_resolve_paths(struct sessiond_config *config) { RESOLVE_CHECK(&config->apps_unix_sock_path); @@ -485,7 +480,6 @@ int sessiond_config_resolve_paths(struct sessiond_config *config) return 0; } -LTTNG_HIDDEN void sessiond_config_log(struct sessiond_config *config) { DBG_NO_LOC("[sessiond configuration]"); diff --git a/src/bin/lttng-sessiond/sessiond-config.h b/src/bin/lttng-sessiond/sessiond-config.h index a24a831f0..136ca95b8 100644 --- a/src/bin/lttng-sessiond/sessiond-config.h +++ b/src/bin/lttng-sessiond/sessiond-config.h @@ -21,7 +21,6 @@ struct config_int_range { }; /* Config string takes ownership of value. */ -LTTNG_HIDDEN void config_string_set(struct config_string *string, char *value); struct sessiond_config { @@ -84,20 +83,15 @@ struct sessiond_config { }; /* Initialize the sessiond_config values to build-defaults. */ -LTTNG_HIDDEN int sessiond_config_init(struct sessiond_config *config); /* Override sessiond_config values with values specified by the environment. */ -LTTNG_HIDDEN int sessiond_config_apply_env_config(struct sessiond_config *config); -LTTNG_HIDDEN void sessiond_config_fini(struct sessiond_config *config); -LTTNG_HIDDEN int sessiond_config_resolve_paths(struct sessiond_config *config); -LTTNG_HIDDEN void sessiond_config_log(struct sessiond_config *config); #endif /* LTTNG_SESSIOND_CONFIG_H */ diff --git a/src/bin/lttng-sessiond/trigger-error-query.c b/src/bin/lttng-sessiond/trigger-error-query.c index 9c6ff36de..8c39e1b06 100644 --- a/src/bin/lttng-sessiond/trigger-error-query.c +++ b/src/bin/lttng-sessiond/trigger-error-query.c @@ -10,7 +10,6 @@ #include #include -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results) @@ -18,7 +17,6 @@ enum lttng_trigger_status lttng_trigger_add_error_results( return LTTNG_TRIGGER_STATUS_OK; } -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_condition_add_error_results( const struct lttng_trigger *trigger, struct lttng_error_query_results *results) @@ -81,7 +79,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_add_action_error_query_results( struct lttng_trigger *trigger, struct lttng_error_query_results *results) diff --git a/src/bin/lttng/loglevel.c b/src/bin/lttng/loglevel.c index 07f3cb711..054510e85 100644 --- a/src/bin/lttng/loglevel.c +++ b/src/bin/lttng/loglevel.c @@ -210,7 +210,6 @@ end: return ret; } -LTTNG_HIDDEN int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel) { int ret = lookup_value_from_name(loglevel_values, @@ -224,7 +223,6 @@ int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel) return ret; } -LTTNG_HIDDEN bool loglevel_parse_range_string(const char *str, enum lttng_loglevel *min, enum lttng_loglevel *max) @@ -239,7 +237,6 @@ bool loglevel_parse_range_string(const char *str, return ret; } -LTTNG_HIDDEN int loglevel_log4j_name_to_value( const char *name, enum lttng_loglevel_log4j *loglevel) { @@ -255,7 +252,6 @@ int loglevel_log4j_name_to_value( return ret; } -LTTNG_HIDDEN bool loglevel_log4j_parse_range_string(const char *str, enum lttng_loglevel_log4j *min, enum lttng_loglevel_log4j *max) @@ -271,7 +267,6 @@ bool loglevel_log4j_parse_range_string(const char *str, return ret; } -LTTNG_HIDDEN int loglevel_jul_name_to_value( const char *name, enum lttng_loglevel_jul *loglevel) { @@ -287,7 +282,6 @@ int loglevel_jul_name_to_value( return ret; } -LTTNG_HIDDEN bool loglevel_jul_parse_range_string(const char *str, enum lttng_loglevel_jul *min, enum lttng_loglevel_jul *max) @@ -302,7 +296,6 @@ bool loglevel_jul_parse_range_string(const char *str, return ret; } -LTTNG_HIDDEN int loglevel_python_name_to_value( const char *name, enum lttng_loglevel_python *loglevel) { @@ -318,7 +311,6 @@ int loglevel_python_name_to_value( return ret; } -LTTNG_HIDDEN bool loglevel_python_parse_range_string(const char *str, enum lttng_loglevel_python *min, enum lttng_loglevel_python *max) @@ -353,28 +345,24 @@ end: return name; } -LTTNG_HIDDEN const char *loglevel_value_to_name(int loglevel) { return lookup_name_from_value( loglevel_values, ARRAY_SIZE(loglevel_values), loglevel); } -LTTNG_HIDDEN const char *loglevel_log4j_value_to_name(int loglevel) { return lookup_name_from_value(loglevel_log4j_values, ARRAY_SIZE(loglevel_log4j_values), loglevel); } -LTTNG_HIDDEN const char *loglevel_jul_value_to_name(int loglevel) { return lookup_name_from_value(loglevel_jul_values, ARRAY_SIZE(loglevel_jul_values), loglevel); } -LTTNG_HIDDEN const char *loglevel_python_value_to_name(int loglevel) { return lookup_name_from_value(loglevel_python_values, diff --git a/src/bin/lttng/loglevel.h b/src/bin/lttng/loglevel.h index 8724ab16c..43ae8e448 100644 --- a/src/bin/lttng/loglevel.h +++ b/src/bin/lttng/loglevel.h @@ -11,51 +11,39 @@ #include #include -LTTNG_HIDDEN int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel); -LTTNG_HIDDEN bool loglevel_parse_range_string(const char *str, enum lttng_loglevel *min, enum lttng_loglevel *max); -LTTNG_HIDDEN int loglevel_log4j_name_to_value( const char *name, enum lttng_loglevel_log4j *loglevel); -LTTNG_HIDDEN bool loglevel_log4j_parse_range_string(const char *str, enum lttng_loglevel_log4j *min, enum lttng_loglevel_log4j *max); -LTTNG_HIDDEN int loglevel_jul_name_to_value( const char *name, enum lttng_loglevel_jul *loglevel); -LTTNG_HIDDEN bool loglevel_jul_parse_range_string(const char *str, enum lttng_loglevel_jul *min, enum lttng_loglevel_jul *max); -LTTNG_HIDDEN int loglevel_python_name_to_value( const char *name, enum lttng_loglevel_python *loglevel); -LTTNG_HIDDEN bool loglevel_python_parse_range_string(const char *str, enum lttng_loglevel_python *min, enum lttng_loglevel_python *max); -LTTNG_HIDDEN const char *loglevel_value_to_name(int loglevel); -LTTNG_HIDDEN const char *loglevel_log4j_value_to_name(int loglevel); -LTTNG_HIDDEN const char *loglevel_jul_value_to_name(int loglevel); -LTTNG_HIDDEN const char *loglevel_python_value_to_name(int loglevel); #endif /* _LTTNG_LOGLEVEL_UTILS_H */ diff --git a/src/bin/lttng/uprobe.c b/src/bin/lttng/uprobe.c index 2d0bf4763..2a2890184 100644 --- a/src/bin/lttng/uprobe.c +++ b/src/bin/lttng/uprobe.c @@ -195,7 +195,6 @@ error: * Set the userspace probe fields in the lttng_event struct and set the * target_path to the path to the binary. */ -LTTNG_HIDDEN int parse_userspace_probe_opts(const char *opt, struct lttng_userspace_probe_location **probe_location) { diff --git a/src/bin/lttng/uprobe.h b/src/bin/lttng/uprobe.h index 852f36642..54dc674d5 100644 --- a/src/bin/lttng/uprobe.h +++ b/src/bin/lttng/uprobe.h @@ -12,7 +12,6 @@ struct lttng_userspace_probe_location; -LTTNG_HIDDEN int parse_userspace_probe_opts(const char *opt, struct lttng_userspace_probe_location **uprobe_loc); diff --git a/src/common/actions/action.c b/src/common/actions/action.c index 56bd2977a..21dee73fa 100644 --- a/src/common/actions/action.c +++ b/src/common/actions/action.c @@ -17,7 +17,6 @@ #include #include -LTTNG_HIDDEN const char *lttng_action_type_string(enum lttng_action_type action_type) { switch (action_type) { @@ -45,7 +44,6 @@ enum lttng_action_type lttng_action_get_type(const struct lttng_action *action) return action ? action->type : LTTNG_ACTION_TYPE_UNKNOWN; } -LTTNG_HIDDEN void lttng_action_init(struct lttng_action *action, enum lttng_action_type type, action_validate_cb validate, @@ -80,13 +78,11 @@ void action_destroy_ref(struct urcu_ref *ref) action->destroy(action); } -LTTNG_HIDDEN void lttng_action_get(struct lttng_action *action) { urcu_ref_get(&action->ref); } -LTTNG_HIDDEN void lttng_action_put(struct lttng_action *action) { if (!action) { @@ -102,7 +98,6 @@ void lttng_action_destroy(struct lttng_action *action) lttng_action_put(action); } -LTTNG_HIDDEN bool lttng_action_validate(struct lttng_action *action) { bool valid; @@ -123,7 +118,6 @@ end: return valid; } -LTTNG_HIDDEN int lttng_action_serialize(struct lttng_action *action, struct lttng_payload *payload) { @@ -146,7 +140,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_action_create_from_payload(struct lttng_payload_view *view, struct lttng_action **action) { @@ -230,7 +223,6 @@ end: return consumed_len; } -LTTNG_HIDDEN bool lttng_action_is_equal(const struct lttng_action *a, const struct lttng_action *b) { @@ -255,25 +247,21 @@ end: return is_equal; } -LTTNG_HIDDEN void lttng_action_increase_execution_request_count(struct lttng_action *action) { action->execution_request_counter++; } -LTTNG_HIDDEN void lttng_action_increase_execution_count(struct lttng_action *action) { action->execution_counter++; } -LTTNG_HIDDEN void lttng_action_increase_execution_failure_count(struct lttng_action *action) { uatomic_inc(&action->execution_failure_counter); } -LTTNG_HIDDEN bool lttng_action_should_execute(const struct lttng_action *action) { const struct lttng_rate_policy *policy = NULL; @@ -296,7 +284,6 @@ end: return execute; } -LTTNG_HIDDEN enum lttng_action_status lttng_action_add_error_query_results( const struct lttng_action *action, struct lttng_error_query_results *results) @@ -304,7 +291,6 @@ enum lttng_action_status lttng_action_add_error_query_results( return action->add_error_query_results(action, results); } -LTTNG_HIDDEN enum lttng_action_status lttng_action_generic_add_error_query_results( const struct lttng_action *action, struct lttng_error_query_results *results) @@ -337,7 +323,6 @@ end: return action_status; } -LTTNG_HIDDEN enum lttng_error_code lttng_action_mi_serialize(const struct lttng_trigger *trigger, const struct lttng_action *action, struct mi_writer *writer, diff --git a/src/common/actions/list.c b/src/common/actions/list.c index 4429c0d76..86eabda8a 100644 --- a/src/common/actions/list.c +++ b/src/common/actions/list.c @@ -278,7 +278,6 @@ end: return action_status; } -LTTNG_HIDDEN enum lttng_error_code lttng_action_list_mi_serialize( const struct lttng_trigger *trigger, const struct lttng_action *action, @@ -448,7 +447,6 @@ const struct lttng_action *lttng_action_list_get_at_index( return lttng_action_list_borrow_mutable_at_index(list, index); } -LTTNG_HIDDEN struct lttng_action *lttng_action_list_borrow_mutable_at_index( const struct lttng_action *list, unsigned int index) { diff --git a/src/common/actions/path.c b/src/common/actions/path.c index 9e1b448a6..09cf08a48 100644 --- a/src/common/actions/path.c +++ b/src/common/actions/path.c @@ -95,7 +95,6 @@ end: return; } -LTTNG_HIDDEN int lttng_action_path_copy(const struct lttng_action_path *src, struct lttng_action_path *dst) { @@ -126,7 +125,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_action_path_create_from_payload( struct lttng_payload_view *view, struct lttng_action_path **_action_path) @@ -181,7 +179,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_action_path_serialize(const struct lttng_action_path *action_path, struct lttng_payload *payload) { diff --git a/src/common/actions/rate-policy.c b/src/common/actions/rate-policy.c index bb1366eab..c47e17018 100644 --- a/src/common/actions/rate-policy.c +++ b/src/common/actions/rate-policy.c @@ -88,7 +88,6 @@ static bool lttng_rate_policy_every_n_should_execute( static bool lttng_rate_policy_once_after_n_should_execute( const struct lttng_rate_policy *policy, uint64_t counter); -LTTNG_HIDDEN const char *lttng_rate_policy_type_string( enum lttng_rate_policy_type rate_policy_type) { @@ -108,7 +107,6 @@ enum lttng_rate_policy_type lttng_rate_policy_get_type( return policy ? policy->type : LTTNG_RATE_POLICY_TYPE_UNKNOWN; } -LTTNG_HIDDEN void lttng_rate_policy_init(struct lttng_rate_policy *rate_policy, enum lttng_rate_policy_type type, rate_policy_serialize_cb serialize, @@ -134,7 +132,6 @@ void lttng_rate_policy_destroy(struct lttng_rate_policy *rate_policy) rate_policy->destroy(rate_policy); } -LTTNG_HIDDEN int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy, struct lttng_payload *payload) { @@ -231,7 +228,6 @@ end: return consumed_len; } -LTTNG_HIDDEN ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view, struct lttng_rate_policy **rate_policy) { @@ -304,7 +300,6 @@ end: return consumed_len; } -LTTNG_HIDDEN bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a, const struct lttng_rate_policy *b) { @@ -329,7 +324,6 @@ end: return is_equal; } -LTTNG_HIDDEN bool lttng_rate_policy_should_execute( const struct lttng_rate_policy *policy, uint64_t counter) { @@ -751,7 +745,6 @@ end: return status; } -LTTNG_HIDDEN struct lttng_rate_policy *lttng_rate_policy_copy( const struct lttng_rate_policy *source) { @@ -779,7 +772,6 @@ static bool lttng_rate_policy_once_after_n_should_execute( return counter == once_after_n_policy->threshold; } -LTTNG_HIDDEN enum lttng_error_code lttng_rate_policy_mi_serialize( const struct lttng_rate_policy *rate_policy, struct mi_writer *writer) diff --git a/src/common/buffer-view.c b/src/common/buffer-view.c index bab0559a9..bfd5ac6d7 100644 --- a/src/common/buffer-view.c +++ b/src/common/buffer-view.c @@ -9,7 +9,6 @@ #include #include -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_init( const char *src, size_t offset, ptrdiff_t len) { @@ -17,13 +16,11 @@ struct lttng_buffer_view lttng_buffer_view_init( return view; } -LTTNG_HIDDEN bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view) { return view && view->data && view->size > 0; } -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_from_view( const struct lttng_buffer_view *src, size_t offset, ptrdiff_t len) @@ -50,7 +47,6 @@ end: return view; } -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *src, size_t offset, ptrdiff_t len) @@ -77,7 +73,6 @@ end: return view; } -LTTNG_HIDDEN bool lttng_buffer_view_contains_string(const struct lttng_buffer_view *buf, const char *str, size_t len_with_null_terminator) diff --git a/src/common/buffer-view.h b/src/common/buffer-view.h index 47f09b430..58f1ede2e 100644 --- a/src/common/buffer-view.h +++ b/src/common/buffer-view.h @@ -31,7 +31,6 @@ struct lttng_buffer_view { * Note that a buffer view never assumes the ownership of the memory it * references. */ -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_init( const char *src, size_t offset, ptrdiff_t len); @@ -44,7 +43,6 @@ struct lttng_buffer_view lttng_buffer_view_init( * * @view Buffer view to validate */ -LTTNG_HIDDEN bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view); /** @@ -60,7 +58,6 @@ bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view); * Note that a buffer view never assumes the ownership of the memory it * references. */ -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_from_view( const struct lttng_buffer_view *src, size_t offset, ptrdiff_t len); @@ -78,7 +75,6 @@ struct lttng_buffer_view lttng_buffer_view_from_view( * Note that a buffer view never assumes the ownership of the memory it * references. */ -LTTNG_HIDDEN struct lttng_buffer_view lttng_buffer_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *src, size_t offset, ptrdiff_t len); @@ -92,7 +88,6 @@ struct lttng_buffer_view lttng_buffer_view_from_dynamic_buffer( * @len_with_null_terminator Expected length of the string, including the * NULL terminator. */ -LTTNG_HIDDEN bool lttng_buffer_view_contains_string(const struct lttng_buffer_view *buf, const char *str, size_t len_with_null_terminator); diff --git a/src/common/bytecode/bytecode.c b/src/common/bytecode/bytecode.c index 28224e30f..1798f9ba2 100644 --- a/src/common/bytecode/bytecode.c +++ b/src/common/bytecode/bytecode.c @@ -24,7 +24,6 @@ int get_count_order(unsigned int count) return order; } -LTTNG_HIDDEN int bytecode_init(struct lttng_bytecode_alloc **fb) { uint32_t alloc_len; @@ -70,7 +69,6 @@ int32_t bytecode_reserve(struct lttng_bytecode_alloc **fb, uint32_t align, uint3 return ret; } -LTTNG_HIDDEN int bytecode_push(struct lttng_bytecode_alloc **fb, const void *data, uint32_t align, uint32_t len) { @@ -83,7 +81,6 @@ int bytecode_push(struct lttng_bytecode_alloc **fb, const void *data, return 0; } -LTTNG_HIDDEN int bytecode_push_logical(struct lttng_bytecode_alloc **fb, struct logical_op *data, uint32_t align, uint32_t len, @@ -101,7 +98,6 @@ int bytecode_push_logical(struct lttng_bytecode_alloc **fb, return 0; } -LTTNG_HIDDEN int bytecode_push_get_payload_root(struct lttng_bytecode_alloc **bytecode) { int ret; @@ -121,7 +117,6 @@ end: return ret; } -LTTNG_HIDDEN int bytecode_push_get_context_root(struct lttng_bytecode_alloc **bytecode) { int ret; @@ -141,7 +136,6 @@ end: return ret; } -LTTNG_HIDDEN int bytecode_push_get_app_context_root(struct lttng_bytecode_alloc **bytecode) { int ret; @@ -161,7 +155,6 @@ end: return ret; } -LTTNG_HIDDEN int bytecode_push_get_index_u64(struct lttng_bytecode_alloc **bytecode, uint64_t index) { @@ -187,7 +180,6 @@ end: return ret; } -LTTNG_HIDDEN int bytecode_push_get_symbol(struct lttng_bytecode_alloc **bytecode, struct lttng_bytecode_alloc **bytecode_reloc, const char *symbol) @@ -255,7 +247,6 @@ end: * * Return allocated bytecode or NULL on error. */ -LTTNG_HIDDEN struct lttng_bytecode *lttng_bytecode_copy( const struct lttng_bytecode *orig_f) { diff --git a/src/common/bytecode/bytecode.h b/src/common/bytecode/bytecode.h index 7e9b9f09e..d7ef4aedd 100644 --- a/src/common/bytecode/bytecode.h +++ b/src/common/bytecode/bytecode.h @@ -234,24 +234,24 @@ struct lttng_bytecode_alloc { struct lttng_bytecode b; }; -LTTNG_HIDDEN int bytecode_init(struct lttng_bytecode_alloc **fb); -LTTNG_HIDDEN int bytecode_push(struct lttng_bytecode_alloc **fb, +int bytecode_init(struct lttng_bytecode_alloc **fb); +int bytecode_push(struct lttng_bytecode_alloc **fb, const void *data, uint32_t align, uint32_t len); -LTTNG_HIDDEN int bytecode_push_logical(struct lttng_bytecode_alloc **fb, +int bytecode_push_logical(struct lttng_bytecode_alloc **fb, struct logical_op *data, uint32_t align, uint32_t len, uint16_t *skip_offset); -LTTNG_HIDDEN struct lttng_bytecode *lttng_bytecode_copy( +struct lttng_bytecode *lttng_bytecode_copy( const struct lttng_bytecode *orig_f); -LTTNG_HIDDEN int bytecode_push_get_payload_root( +int bytecode_push_get_payload_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_context_root( +int bytecode_push_get_context_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_app_context_root( +int bytecode_push_get_app_context_root( struct lttng_bytecode_alloc **bytecode); -LTTNG_HIDDEN int bytecode_push_get_index_u64( +int bytecode_push_get_index_u64( struct lttng_bytecode_alloc **bytecode, uint64_t index); -LTTNG_HIDDEN int bytecode_push_get_symbol( +int bytecode_push_get_symbol( struct lttng_bytecode_alloc **bytecode, struct lttng_bytecode_alloc **bytecode_reloc, const char *symbol); diff --git a/src/common/compat/compat-fcntl.c b/src/common/compat/compat-fcntl.c index 95999686a..bc014d640 100644 --- a/src/common/compat/compat-fcntl.c +++ b/src/common/compat/compat-fcntl.c @@ -12,7 +12,6 @@ #ifdef __linux__ -LTTNG_HIDDEN int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) { diff --git a/src/common/compat/directory-handle.c b/src/common/compat/directory-handle.c index ed7f46a18..9b98e0482 100644 --- a/src/common/compat/directory-handle.c +++ b/src/common/compat/directory-handle.c @@ -99,7 +99,6 @@ void lttng_directory_handle_release(struct urcu_ref *ref); (ino_t) reserved_val; \ }) -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create(const char *path) { const struct lttng_directory_handle cwd_handle = { @@ -110,7 +109,6 @@ struct lttng_directory_handle *lttng_directory_handle_create(const char *path) return lttng_directory_handle_create_from_handle(path, &cwd_handle); } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_handle( const char *path, const struct lttng_directory_handle *ref_handle) @@ -146,7 +144,6 @@ error_close: return NULL; } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd( int dirfd) { @@ -198,7 +195,6 @@ end: free(handle); } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_copy( const struct lttng_directory_handle *handle) { @@ -223,7 +219,6 @@ end: return new_handle; } -LTTNG_HIDDEN bool lttng_directory_handle_equals(const struct lttng_directory_handle *lhs, const struct lttng_directory_handle *rhs) { @@ -236,14 +231,12 @@ void lttng_directory_handle_invalidate(struct lttng_directory_handle *handle) handle->dirfd = -1; } -LTTNG_HIDDEN int lttng_directory_handle_stat(const struct lttng_directory_handle *handle, const char *path, struct stat *st) { return fstatat(handle->dirfd, path, st, 0); } -LTTNG_HIDDEN bool lttng_directory_handle_uses_fd( const struct lttng_directory_handle *handle) { @@ -424,7 +417,6 @@ end: return handle; } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create( const char *path) { @@ -472,7 +464,6 @@ end: return new_handle; } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_handle( const char *path, const struct lttng_directory_handle *ref_handle) @@ -556,7 +547,6 @@ end: return new_handle; } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd( int dirfd) { @@ -575,7 +565,6 @@ void lttng_directory_handle_release(struct urcu_ref *ref) free(handle); } -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_copy( const struct lttng_directory_handle *handle) { @@ -593,7 +582,6 @@ end: return new_handle; } -LTTNG_HIDDEN bool lttng_directory_handle_equals(const struct lttng_directory_handle *lhs, const struct lttng_directory_handle *rhs) { @@ -606,7 +594,6 @@ void lttng_directory_handle_invalidate(struct lttng_directory_handle *handle) handle->base_path = NULL; } -LTTNG_HIDDEN int lttng_directory_handle_stat(const struct lttng_directory_handle *handle, const char *subdirectory, struct stat *st) { @@ -624,7 +611,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_directory_handle_uses_fd( const struct lttng_directory_handle *handle) { @@ -989,13 +975,11 @@ error: return ret; } -LTTNG_HIDDEN bool lttng_directory_handle_get(struct lttng_directory_handle *handle) { return urcu_ref_get_unless_zero(&handle->ref); } -LTTNG_HIDDEN void lttng_directory_handle_put(struct lttng_directory_handle *handle) { if (!handle) { @@ -1005,7 +989,6 @@ void lttng_directory_handle_put(struct lttng_directory_handle *handle) urcu_ref_put(&handle->ref, lttng_directory_handle_release); } -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_as_user( const struct lttng_directory_handle *handle, const char *subdirectory, @@ -1026,7 +1009,6 @@ int lttng_directory_handle_create_subdirectory_as_user( return ret; } -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_recursive_as_user( const struct lttng_directory_handle *handle, const char *subdirectory_path, @@ -1046,7 +1028,6 @@ int lttng_directory_handle_create_subdirectory_recursive_as_user( return ret; } -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory( const struct lttng_directory_handle *handle, const char *subdirectory, @@ -1056,7 +1037,6 @@ int lttng_directory_handle_create_subdirectory( handle, subdirectory, mode, NULL); } -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_recursive( const struct lttng_directory_handle *handle, const char *subdirectory_path, @@ -1066,7 +1046,6 @@ int lttng_directory_handle_create_subdirectory_recursive( handle, subdirectory_path, mode, NULL); } -LTTNG_HIDDEN int lttng_directory_handle_open_file_as_user( const struct lttng_directory_handle *handle, const char *filename, @@ -1086,7 +1065,6 @@ int lttng_directory_handle_open_file_as_user( return ret; } -LTTNG_HIDDEN int lttng_directory_handle_open_file( const struct lttng_directory_handle *handle, const char *filename, @@ -1096,7 +1074,6 @@ int lttng_directory_handle_open_file( mode, NULL); } -LTTNG_HIDDEN int lttng_directory_handle_unlink_file_as_user( const struct lttng_directory_handle *handle, const char *filename, @@ -1113,7 +1090,6 @@ int lttng_directory_handle_unlink_file_as_user( return ret; } -LTTNG_HIDDEN int lttng_directory_handle_unlink_file( const struct lttng_directory_handle *handle, const char *filename) @@ -1122,7 +1098,6 @@ int lttng_directory_handle_unlink_file( filename, NULL); } -LTTNG_HIDDEN int lttng_directory_handle_rename( const struct lttng_directory_handle *old_handle, const char *old_name, @@ -1133,7 +1108,6 @@ int lttng_directory_handle_rename( new_handle, new_name, NULL); } -LTTNG_HIDDEN int lttng_directory_handle_rename_as_user( const struct lttng_directory_handle *old_handle, const char *old_name, @@ -1154,7 +1128,6 @@ int lttng_directory_handle_rename_as_user( return ret; } -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory( const struct lttng_directory_handle *handle, const char *name) @@ -1163,7 +1136,6 @@ int lttng_directory_handle_remove_subdirectory( NULL); } -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_as_user( const struct lttng_directory_handle *handle, const char *name, @@ -1386,7 +1358,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_recursive( const struct lttng_directory_handle *handle, const char *name, @@ -1396,7 +1367,6 @@ int lttng_directory_handle_remove_subdirectory_recursive( handle, name, NULL, flags); } -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_recursive_as_user( const struct lttng_directory_handle *handle, const char *name, diff --git a/src/common/compat/directory-handle.h b/src/common/compat/directory-handle.h index 24f1e6f68..50185a526 100644 --- a/src/common/compat/directory-handle.h +++ b/src/common/compat/directory-handle.h @@ -61,7 +61,6 @@ struct lttng_directory_handle { * The reference to the directory handle must be released using * lttng_directory_handle_put(). */ -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create( const char *path); @@ -78,7 +77,6 @@ struct lttng_directory_handle *lttng_directory_handle_create( * The reference to the directory handle must be released using * lttng_directory_handle_put(). */ -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_handle( const char *path, const struct lttng_directory_handle *ref_handle); @@ -93,7 +91,6 @@ struct lttng_directory_handle *lttng_directory_handle_create_from_handle( * The reference to the directory handle must be released using * lttng_directory_handle_put(). */ -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd( int dirfd); @@ -103,26 +100,22 @@ struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd( * The reference to the directory handle must be released using * lttng_directory_handle_put(). */ -LTTNG_HIDDEN struct lttng_directory_handle *lttng_directory_handle_copy( const struct lttng_directory_handle *handle); /* * Acquire a reference to a directory handle. */ -LTTNG_HIDDEN bool lttng_directory_handle_get(struct lttng_directory_handle *handle); /* * Release a reference to a directory handle. */ -LTTNG_HIDDEN void lttng_directory_handle_put(struct lttng_directory_handle *handle); /* * Create a subdirectory relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory( const struct lttng_directory_handle *handle, const char *subdirectory, @@ -132,7 +125,6 @@ int lttng_directory_handle_create_subdirectory( * Create a subdirectory relative to a directory handle * as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_as_user( const struct lttng_directory_handle *handle, const char *subdirectory, @@ -141,7 +133,6 @@ int lttng_directory_handle_create_subdirectory_as_user( /* * Recursively create a directory relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_recursive( const struct lttng_directory_handle *handle, const char *subdirectory_path, @@ -151,7 +142,6 @@ int lttng_directory_handle_create_subdirectory_recursive( * Recursively create a directory relative to a directory handle * as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_create_subdirectory_recursive_as_user( const struct lttng_directory_handle *handle, const char *subdirectory_path, @@ -160,7 +150,6 @@ int lttng_directory_handle_create_subdirectory_recursive_as_user( /* * Open a file descriptor to a path relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_open_file( const struct lttng_directory_handle *handle, const char *filename, @@ -170,7 +159,6 @@ int lttng_directory_handle_open_file( * Open a file descriptor to a path relative to a directory handle * as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_open_file_as_user( const struct lttng_directory_handle *handle, const char *filename, @@ -180,7 +168,6 @@ int lttng_directory_handle_open_file_as_user( /* * Unlink a file to a path relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_unlink_file( const struct lttng_directory_handle *handle, const char *filename); @@ -188,7 +175,6 @@ int lttng_directory_handle_unlink_file( /* * Unlink a file to a path relative to a directory handle as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_unlink_file_as_user( const struct lttng_directory_handle *handle, const char *filename, @@ -198,7 +184,6 @@ int lttng_directory_handle_unlink_file_as_user( * Rename a file from a path relative to a directory handle to a new * name relative to another directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_rename( const struct lttng_directory_handle *old_handle, const char *old_name, @@ -209,7 +194,6 @@ int lttng_directory_handle_rename( * Rename a file from a path relative to a directory handle to a new * name relative to another directory handle as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_rename_as_user( const struct lttng_directory_handle *old_handle, const char *old_name, @@ -220,7 +204,6 @@ int lttng_directory_handle_rename_as_user( /* * Remove a subdirectory relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory( const struct lttng_directory_handle *handle, const char *name); @@ -228,7 +211,6 @@ int lttng_directory_handle_remove_subdirectory( /* * Remove a subdirectory relative to a directory handle as a given user. */ -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_as_user( const struct lttng_directory_handle *handle, const char *name, @@ -239,7 +221,6 @@ int lttng_directory_handle_remove_subdirectory_as_user( * consists in empty directories. * @flags: enum lttng_directory_handle_rmdir_recursive_flags */ -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_recursive( const struct lttng_directory_handle *handle, const char *name, int flags); @@ -249,7 +230,6 @@ int lttng_directory_handle_remove_subdirectory_recursive( * consists in empty directories as a given user. * @flags: enum lttng_directory_handle_rmdir_recursive_flags */ -LTTNG_HIDDEN int lttng_directory_handle_remove_subdirectory_recursive_as_user( const struct lttng_directory_handle *handle, const char *name, @@ -259,7 +239,6 @@ int lttng_directory_handle_remove_subdirectory_recursive_as_user( /* * stat() a file relative to a directory handle. */ -LTTNG_HIDDEN int lttng_directory_handle_stat( const struct lttng_directory_handle *handle, const char *name, @@ -269,7 +248,6 @@ int lttng_directory_handle_stat( * Returns true if this directory handle is backed by a file * descriptor, false otherwise. */ -LTTNG_HIDDEN bool lttng_directory_handle_uses_fd( const struct lttng_directory_handle *handle); @@ -278,7 +256,6 @@ bool lttng_directory_handle_uses_fd( * * Returns true if the two directory handles are equal, false otherwise. */ -LTTNG_HIDDEN bool lttng_directory_handle_equals(const struct lttng_directory_handle *lhs, const struct lttng_directory_handle *rhs); diff --git a/src/common/compat/poll.c b/src/common/compat/poll.c index 398d9d7b0..9da2470d0 100644 --- a/src/common/compat/poll.c +++ b/src/common/compat/poll.c @@ -71,7 +71,6 @@ error: /* * Create epoll set and allocate returned events structure. */ -LTTNG_HIDDEN int compat_epoll_create(struct lttng_poll_event *events, int size, int flags) { int ret; @@ -124,7 +123,6 @@ error: /* * Add a fd to the epoll set with requesting events. */ -LTTNG_HIDDEN int compat_epoll_add(struct lttng_poll_event *events, int fd, uint32_t req_events) { int ret; @@ -172,7 +170,6 @@ error: /* * Remove a fd from the epoll set. */ -LTTNG_HIDDEN int compat_epoll_del(struct lttng_poll_event *events, int fd) { int ret; @@ -207,7 +204,6 @@ error: /* * Set an fd's events. */ -LTTNG_HIDDEN int compat_epoll_mod(struct lttng_poll_event *events, int fd, uint32_t req_events) { int ret; @@ -249,7 +245,6 @@ error: /* * Wait on epoll set. This is a blocking call of timeout value. */ -LTTNG_HIDDEN int compat_epoll_wait(struct lttng_poll_event *events, int timeout, bool interruptible) { @@ -304,7 +299,6 @@ error: /* * Setup poll set maximum size. */ -LTTNG_HIDDEN int compat_epoll_set_max_size(void) { int ret, fd, retval = 0; @@ -434,7 +428,6 @@ error: /* * Create pollfd data structure. */ -LTTNG_HIDDEN int compat_poll_create(struct lttng_poll_event *events, int size) { struct compat_poll_event_array *current, *wait; @@ -487,7 +480,6 @@ error: /* * Add fd to pollfd data structure with requested events. */ -LTTNG_HIDDEN int compat_poll_add(struct lttng_poll_event *events, int fd, uint32_t req_events) { @@ -534,7 +526,6 @@ error: /* * Modify an fd's events.. */ -LTTNG_HIDDEN int compat_poll_mod(struct lttng_poll_event *events, int fd, uint32_t req_events) { @@ -571,7 +562,6 @@ error: /* * Remove a fd from the pollfd structure. */ -LTTNG_HIDDEN int compat_poll_del(struct lttng_poll_event *events, int fd) { int i, count = 0, ret; @@ -626,7 +616,6 @@ error: /* * Wait on poll() with timeout. Blocking call. */ -LTTNG_HIDDEN int compat_poll_wait(struct lttng_poll_event *events, int timeout, bool interruptible) { @@ -706,7 +695,6 @@ error: /* * Setup poll set maximum size. */ -LTTNG_HIDDEN int compat_poll_set_max_size(void) { int ret, retval = 0; diff --git a/src/common/conditions/buffer-usage.c b/src/common/conditions/buffer-usage.c index 22da01c7a..714ba582c 100644 --- a/src/common/conditions/buffer-usage.c +++ b/src/common/conditions/buffer-usage.c @@ -461,7 +461,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_condition_buffer_usage_low_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **_condition) @@ -487,7 +486,6 @@ error: return ret; } -LTTNG_HIDDEN ssize_t lttng_condition_buffer_usage_high_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **_condition) @@ -532,7 +530,6 @@ end: return evaluation; } -LTTNG_HIDDEN ssize_t lttng_evaluation_buffer_usage_low_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **_evaluation) @@ -560,7 +557,6 @@ error: return ret; } -LTTNG_HIDDEN ssize_t lttng_evaluation_buffer_usage_high_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **_evaluation) @@ -863,7 +859,6 @@ void lttng_evaluation_buffer_usage_destroy( free(usage); } -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_buffer_usage_create( enum lttng_condition_type type, uint64_t use, uint64_t capacity) { diff --git a/src/common/conditions/condition.c b/src/common/conditions/condition.c index 564b9c344..18b756dce 100644 --- a/src/common/conditions/condition.c +++ b/src/common/conditions/condition.c @@ -37,13 +37,11 @@ static void condition_destroy_ref(struct urcu_ref *ref) condition->destroy(condition); } -LTTNG_HIDDEN void lttng_condition_get(struct lttng_condition *condition) { urcu_ref_get(&condition->ref); } -LTTNG_HIDDEN void lttng_condition_put(struct lttng_condition *condition) { if (!condition) { @@ -55,7 +53,6 @@ void lttng_condition_put(struct lttng_condition *condition) } -LTTNG_HIDDEN bool lttng_condition_validate(const struct lttng_condition *condition) { bool valid; @@ -76,7 +73,6 @@ end: return valid; } -LTTNG_HIDDEN int lttng_condition_serialize(const struct lttng_condition *condition, struct lttng_payload *payload) { @@ -104,7 +100,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_condition_is_equal(const struct lttng_condition *a, const struct lttng_condition *b) { @@ -128,7 +123,6 @@ end: return is_equal; } -LTTNG_HIDDEN ssize_t lttng_condition_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition) @@ -202,7 +196,6 @@ end: return ret; } -LTTNG_HIDDEN void lttng_condition_init(struct lttng_condition *condition, enum lttng_condition_type type) { @@ -210,7 +203,6 @@ void lttng_condition_init(struct lttng_condition *condition, urcu_ref_init(&condition->ref); } -LTTNG_HIDDEN const char *lttng_condition_type_str(enum lttng_condition_type type) { switch (type) { @@ -240,7 +232,6 @@ const char *lttng_condition_type_str(enum lttng_condition_type type) } } -LTTNG_HIDDEN enum lttng_error_code lttng_condition_mi_serialize( const struct lttng_trigger *trigger, const struct lttng_condition *condition, diff --git a/src/common/conditions/event-rule-matches.c b/src/common/conditions/event-rule-matches.c index 52bb6ae19..d91a2c3e7 100644 --- a/src/common/conditions/event-rule-matches.c +++ b/src/common/conditions/event-rule-matches.c @@ -702,7 +702,6 @@ end: return expr; } -LTTNG_HIDDEN ssize_t lttng_condition_event_rule_matches_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **_condition) @@ -780,7 +779,6 @@ end: return consumed_length; } -LTTNG_HIDDEN enum lttng_condition_status lttng_condition_event_rule_matches_borrow_rule_mutable( const struct lttng_condition *condition, @@ -820,7 +818,6 @@ enum lttng_condition_status lttng_condition_event_rule_matches_get_rule( return status; } -LTTNG_HIDDEN void lttng_condition_event_rule_matches_set_error_counter_index( struct lttng_condition *condition, uint64_t error_counter_index) { @@ -833,7 +830,6 @@ void lttng_condition_event_rule_matches_set_error_counter_index( error_counter_index); } -LTTNG_HIDDEN uint64_t lttng_condition_event_rule_matches_get_error_counter_index( const struct lttng_condition *condition) { @@ -958,7 +954,6 @@ end: return expr; } -LTTNG_HIDDEN ssize_t lttng_evaluation_event_rule_matches_create_from_payload( const struct lttng_condition_event_rule_matches *condition, struct lttng_payload_view *view, @@ -1381,7 +1376,6 @@ end: return ret; } -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_event_rule_matches_create( const struct lttng_condition_event_rule_matches *condition, const char *capture_payload, @@ -1464,7 +1458,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_error_code lttng_condition_event_rule_matches_generate_capture_descriptor_bytecode( struct lttng_condition *condition) @@ -1512,7 +1505,6 @@ end: return ret; } -LTTNG_HIDDEN const struct lttng_bytecode * lttng_condition_event_rule_matches_get_capture_bytecode_at_index( const struct lttng_condition *condition, unsigned int index) diff --git a/src/common/conditions/session-consumed-size.c b/src/common/conditions/session-consumed-size.c index 3c1721ff8..2f95bd82a 100644 --- a/src/common/conditions/session-consumed-size.c +++ b/src/common/conditions/session-consumed-size.c @@ -286,7 +286,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_condition_session_consumed_size_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **_condition) @@ -330,7 +329,6 @@ end: return evaluation; } -LTTNG_HIDDEN ssize_t lttng_evaluation_session_consumed_size_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **_evaluation) @@ -481,7 +479,6 @@ void lttng_evaluation_session_consumed_size_destroy( free(consumed); } -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_consumed_size_create( uint64_t consumed) { diff --git a/src/common/conditions/session-rotation.c b/src/common/conditions/session-rotation.c index e2a5adf2d..d352718e1 100644 --- a/src/common/conditions/session-rotation.c +++ b/src/common/conditions/session-rotation.c @@ -307,7 +307,6 @@ error: return ret; } -LTTNG_HIDDEN ssize_t lttng_condition_session_rotation_ongoing_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition) @@ -317,7 +316,6 @@ ssize_t lttng_condition_session_rotation_ongoing_create_from_payload( LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING); } -LTTNG_HIDDEN ssize_t lttng_condition_session_rotation_completed_create_from_payload( struct lttng_payload_view *view, struct lttng_condition **condition) @@ -428,7 +426,6 @@ error: return ret; } -LTTNG_HIDDEN ssize_t lttng_evaluation_session_rotation_ongoing_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation) @@ -438,7 +435,6 @@ ssize_t lttng_evaluation_session_rotation_ongoing_create_from_payload( view, evaluation); } -LTTNG_HIDDEN ssize_t lttng_evaluation_session_rotation_completed_create_from_payload( struct lttng_payload_view *view, struct lttng_evaluation **evaluation) @@ -448,7 +444,6 @@ ssize_t lttng_evaluation_session_rotation_completed_create_from_payload( view, evaluation); } -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create( uint64_t id) { @@ -457,7 +452,6 @@ struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create( NULL); } -LTTNG_HIDDEN struct lttng_evaluation *lttng_evaluation_session_rotation_completed_create( uint64_t id, struct lttng_trace_archive_location *location) { diff --git a/src/common/config/ini.c b/src/common/config/ini.c index 826d9afa3..1d967a49d 100644 --- a/src/common/config/ini.c +++ b/src/common/config/ini.c @@ -90,7 +90,6 @@ static char* strncpy0(char* dest, const char* src, size_t size) } /* See documentation in header file. */ -LTTNG_HIDDEN int ini_parse_file(FILE* file, ini_entry_handler handler, void* user) { /* Uses a fair bit of stack (use heap instead if you need to) */ @@ -203,7 +202,6 @@ int ini_parse_file(FILE* file, ini_entry_handler handler, void* user) } /* See documentation in header file. */ -LTTNG_HIDDEN int ini_parse(const char* filename, ini_entry_handler handler, void* user) { FILE* file; diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index 416f9046e..cf785c8b5 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -51,7 +51,7 @@ struct session_config_validation_ctx { xmlSchemaValidCtxtPtr schema_validation_ctx; }; -LTTNG_HIDDEN const char * const config_element_all = "all"; +const char * const config_element_all = "all"; const char * const config_str_yes = "yes"; const char * const config_str_true = "true"; const char * const config_str_on = "on"; @@ -81,16 +81,16 @@ const char * const config_element_symbol_name = "symbol_name"; const char * const config_element_address = "address"; const char * const config_element_offset = "offset"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_lookup = "lookup_method"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_lookup_function_default = "DEFAULT"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_lookup_function_elf = "ELF"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_lookup_tracepoint_sdt = "SDT"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_location_binary_path = "binary_path"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_function_attributes = "userspace_probe_function_attributes"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_function_location_function_name = "function_name"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_tracepoint_attributes = "userspace_probe_tracepoint_attributes"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_tracepoint_location_provider_name = "provider_name"; -LTTNG_HIDDEN const char * const config_element_userspace_probe_tracepoint_location_probe_name = "probe_name"; +const char * const config_element_userspace_probe_lookup = "lookup_method"; +const char * const config_element_userspace_probe_lookup_function_default = "DEFAULT"; +const char * const config_element_userspace_probe_lookup_function_elf = "ELF"; +const char * const config_element_userspace_probe_lookup_tracepoint_sdt = "SDT"; +const char * const config_element_userspace_probe_location_binary_path = "binary_path"; +const char * const config_element_userspace_probe_function_attributes = "userspace_probe_function_attributes"; +const char * const config_element_userspace_probe_function_location_function_name = "function_name"; +const char * const config_element_userspace_probe_tracepoint_attributes = "userspace_probe_tracepoint_attributes"; +const char * const config_element_userspace_probe_tracepoint_location_provider_name = "provider_name"; +const char * const config_element_userspace_probe_tracepoint_location_probe_name = "probe_name"; const char * const config_element_name = "name"; const char * const config_element_enabled = "enabled"; @@ -99,30 +99,30 @@ const char * const config_element_subbuf_size = "subbuffer_size"; const char * const config_element_num_subbuf = "subbuffer_count"; const char * const config_element_switch_timer_interval = "switch_timer_interval"; const char * const config_element_read_timer_interval = "read_timer_interval"; -LTTNG_HIDDEN const char * const config_element_monitor_timer_interval = "monitor_timer_interval"; -LTTNG_HIDDEN const char * const config_element_blocking_timeout = "blocking_timeout"; +const char * const config_element_monitor_timer_interval = "monitor_timer_interval"; +const char * const config_element_blocking_timeout = "blocking_timeout"; const char * const config_element_output = "output"; const char * const config_element_output_type = "output_type"; const char * const config_element_tracefile_size = "tracefile_size"; const char * const config_element_tracefile_count = "tracefile_count"; const char * const config_element_live_timer_interval = "live_timer_interval"; -LTTNG_HIDDEN const char * const config_element_discarded_events = "discarded_events"; -LTTNG_HIDDEN const char * const config_element_lost_packets = "lost_packets"; +const char * const config_element_discarded_events = "discarded_events"; +const char * const config_element_lost_packets = "lost_packets"; const char * const config_element_type = "type"; const char * const config_element_buffer_type = "buffer_type"; const char * const config_element_session = "session"; const char * const config_element_sessions = "sessions"; -LTTNG_HIDDEN const char * const config_element_context_perf = "perf"; -LTTNG_HIDDEN const char * const config_element_context_app = "app"; -LTTNG_HIDDEN const char * const config_element_context_app_provider_name = "provider_name"; -LTTNG_HIDDEN const char * const config_element_context_app_ctx_name = "ctx_name"; +const char * const config_element_context_perf = "perf"; +const char * const config_element_context_app = "app"; +const char * const config_element_context_app_provider_name = "provider_name"; +const char * const config_element_context_app_ctx_name = "ctx_name"; const char * const config_element_config = "config"; const char * const config_element_started = "started"; const char * const config_element_snapshot_mode = "snapshot_mode"; const char * const config_element_loglevel = "loglevel"; const char * const config_element_loglevel_type = "loglevel_type"; const char * const config_element_filter = "filter"; -LTTNG_HIDDEN const char * const config_element_filter_expression = "filter_expression"; +const char * const config_element_filter_expression = "filter_expression"; const char * const config_element_snapshot_outputs = "snapshot_outputs"; const char * const config_element_consumer_output = "consumer_output"; const char * const config_element_destination = "destination"; @@ -135,36 +135,36 @@ const char * const config_element_pid = "pid"; const char * const config_element_pids = "pids"; const char * const config_element_shared_memory_path = "shared_memory_path"; -LTTNG_HIDDEN const char * const config_element_process_attr_id = "id"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_pid = "pid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_vpid = "vpid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_uid = "uid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_vuid = "vuid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_gid = "gid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_vgid = "vgid_process_attr_tracker"; -LTTNG_HIDDEN const char * const config_element_process_attr_trackers = "process_attr_trackers"; -LTTNG_HIDDEN const char * const config_element_process_attr_values = "process_attr_values"; -LTTNG_HIDDEN const char * const config_element_process_attr_value_type = "process_attr_value_type"; -LTTNG_HIDDEN const char * const config_element_process_attr_pid_value = "pid"; -LTTNG_HIDDEN const char * const config_element_process_attr_vpid_value = "vpid"; -LTTNG_HIDDEN const char * const config_element_process_attr_uid_value = "uid"; -LTTNG_HIDDEN const char * const config_element_process_attr_vuid_value = "vuid"; -LTTNG_HIDDEN const char * const config_element_process_attr_gid_value = "gid"; -LTTNG_HIDDEN const char * const config_element_process_attr_vgid_value = "vgid"; -LTTNG_HIDDEN const char * const config_element_process_attr_tracker_type = "process_attr_tracker_type"; +const char * const config_element_process_attr_id = "id"; +const char * const config_element_process_attr_tracker_pid = "pid_process_attr_tracker"; +const char * const config_element_process_attr_tracker_vpid = "vpid_process_attr_tracker"; +const char * const config_element_process_attr_tracker_uid = "uid_process_attr_tracker"; +const char * const config_element_process_attr_tracker_vuid = "vuid_process_attr_tracker"; +const char * const config_element_process_attr_tracker_gid = "gid_process_attr_tracker"; +const char * const config_element_process_attr_tracker_vgid = "vgid_process_attr_tracker"; +const char * const config_element_process_attr_trackers = "process_attr_trackers"; +const char * const config_element_process_attr_values = "process_attr_values"; +const char * const config_element_process_attr_value_type = "process_attr_value_type"; +const char * const config_element_process_attr_pid_value = "pid"; +const char * const config_element_process_attr_vpid_value = "vpid"; +const char * const config_element_process_attr_uid_value = "uid"; +const char * const config_element_process_attr_vuid_value = "vuid"; +const char * const config_element_process_attr_gid_value = "gid"; +const char * const config_element_process_attr_vgid_value = "vgid"; +const char * const config_element_process_attr_tracker_type = "process_attr_tracker_type"; /* Used for support of legacy tracker serialization (< 2.12). */ -LTTNG_HIDDEN const char * const config_element_trackers_legacy = "trackers"; -LTTNG_HIDDEN const char * const config_element_pid_tracker_legacy = "pid_tracker"; -LTTNG_HIDDEN const char * const config_element_tracker_targets_legacy = "targets"; -LTTNG_HIDDEN const char * const config_element_tracker_pid_target_legacy = "pid_target"; -LTTNG_HIDDEN const char * const config_element_tracker_pid_legacy = "pid"; - -LTTNG_HIDDEN const char * const config_element_rotation_schedules = "rotation_schedules"; -LTTNG_HIDDEN const char * const config_element_rotation_schedule_periodic = "periodic"; -LTTNG_HIDDEN const char * const config_element_rotation_schedule_periodic_time_us = "time_us"; -LTTNG_HIDDEN const char * const config_element_rotation_schedule_size_threshold = "size_threshold"; -LTTNG_HIDDEN const char * const config_element_rotation_schedule_size_threshold_bytes = "bytes"; +const char * const config_element_trackers_legacy = "trackers"; +const char * const config_element_pid_tracker_legacy = "pid_tracker"; +const char * const config_element_tracker_targets_legacy = "targets"; +const char * const config_element_tracker_pid_target_legacy = "pid_target"; +const char * const config_element_tracker_pid_legacy = "pid"; + +const char * const config_element_rotation_schedules = "rotation_schedules"; +const char * const config_element_rotation_schedule_periodic = "periodic"; +const char * const config_element_rotation_schedule_periodic_time_us = "time_us"; +const char * const config_element_rotation_schedule_size_threshold = "size_threshold"; +const char * const config_element_rotation_schedule_size_threshold_bytes = "bytes"; const char * const config_domain_type_kernel = "KERNEL"; const char * const config_domain_type_ust = "UST"; @@ -189,7 +189,7 @@ const char * const config_loglevel_type_single = "SINGLE"; const char * const config_event_type_all = "ALL"; const char * const config_event_type_tracepoint = "TRACEPOINT"; const char * const config_event_type_probe = "PROBE"; -LTTNG_HIDDEN const char * const config_event_type_userspace_probe = "USERSPACE_PROBE"; +const char * const config_event_type_userspace_probe = "USERSPACE_PROBE"; const char * const config_event_type_function = "FUNCTION"; const char * const config_event_type_function_entry = "FUNCTION_ENTRY"; const char * const config_event_type_noop = "NOOP"; @@ -210,33 +210,33 @@ const char * const config_event_context_pthread_id = "PTHREAD_ID"; const char * const config_event_context_hostname = "HOSTNAME"; const char * const config_event_context_ip = "IP"; const char * const config_event_context_perf_thread_counter = "PERF_THREAD_COUNTER"; -LTTNG_HIDDEN const char * const config_event_context_app = "APP"; -LTTNG_HIDDEN const char * const config_event_context_interruptible = "INTERRUPTIBLE"; -LTTNG_HIDDEN const char * const config_event_context_preemptible = "PREEMPTIBLE"; -LTTNG_HIDDEN const char * const config_event_context_need_reschedule = "NEED_RESCHEDULE"; -LTTNG_HIDDEN const char * const config_event_context_migratable = "MIGRATABLE"; -LTTNG_HIDDEN const char * const config_event_context_callstack_user= "CALLSTACK_USER"; -LTTNG_HIDDEN const char * const config_event_context_callstack_kernel = "CALLSTACK_KERNEL"; -LTTNG_HIDDEN const char * const config_event_context_cgroup_ns = "CGROUP_NS"; -LTTNG_HIDDEN const char * const config_event_context_ipc_ns = "IPC_NS"; -LTTNG_HIDDEN const char * const config_event_context_mnt_ns = "MNT_NS"; -LTTNG_HIDDEN const char * const config_event_context_net_ns = "NET_NS"; -LTTNG_HIDDEN const char * const config_event_context_pid_ns = "PID_NS"; -LTTNG_HIDDEN const char * const config_event_context_time_ns = "TIME_NS"; -LTTNG_HIDDEN const char * const config_event_context_user_ns = "USER_NS"; -LTTNG_HIDDEN const char * const config_event_context_uts_ns = "UTS_NS"; -LTTNG_HIDDEN const char * const config_event_context_uid = "UID"; -LTTNG_HIDDEN const char * const config_event_context_euid = "EUID"; -LTTNG_HIDDEN const char * const config_event_context_suid = "SUID"; -LTTNG_HIDDEN const char * const config_event_context_gid = "GID"; -LTTNG_HIDDEN const char * const config_event_context_egid = "EGID"; -LTTNG_HIDDEN const char * const config_event_context_sgid = "SGID"; -LTTNG_HIDDEN const char * const config_event_context_vuid = "VUID"; -LTTNG_HIDDEN const char * const config_event_context_veuid = "VEUID"; -LTTNG_HIDDEN const char * const config_event_context_vsuid = "VSUID"; -LTTNG_HIDDEN const char * const config_event_context_vgid = "VGID"; -LTTNG_HIDDEN const char * const config_event_context_vegid = "VEGID"; -LTTNG_HIDDEN const char * const config_event_context_vsgid = "VSGID"; +const char * const config_event_context_app = "APP"; +const char * const config_event_context_interruptible = "INTERRUPTIBLE"; +const char * const config_event_context_preemptible = "PREEMPTIBLE"; +const char * const config_event_context_need_reschedule = "NEED_RESCHEDULE"; +const char * const config_event_context_migratable = "MIGRATABLE"; +const char * const config_event_context_callstack_user= "CALLSTACK_USER"; +const char * const config_event_context_callstack_kernel = "CALLSTACK_KERNEL"; +const char * const config_event_context_cgroup_ns = "CGROUP_NS"; +const char * const config_event_context_ipc_ns = "IPC_NS"; +const char * const config_event_context_mnt_ns = "MNT_NS"; +const char * const config_event_context_net_ns = "NET_NS"; +const char * const config_event_context_pid_ns = "PID_NS"; +const char * const config_event_context_time_ns = "TIME_NS"; +const char * const config_event_context_user_ns = "USER_NS"; +const char * const config_event_context_uts_ns = "UTS_NS"; +const char * const config_event_context_uid = "UID"; +const char * const config_event_context_euid = "EUID"; +const char * const config_event_context_suid = "SUID"; +const char * const config_event_context_gid = "GID"; +const char * const config_event_context_egid = "EGID"; +const char * const config_event_context_sgid = "SGID"; +const char * const config_event_context_vuid = "VUID"; +const char * const config_event_context_veuid = "VEUID"; +const char * const config_event_context_vsuid = "VSUID"; +const char * const config_event_context_vgid = "VGID"; +const char * const config_event_context_vegid = "VEGID"; +const char * const config_event_context_vsgid = "VSGID"; /* Deprecated symbols */ const char * const config_element_perf; @@ -277,7 +277,6 @@ end: return ret; } -LTTNG_HIDDEN int config_get_section_entries(const char *override_path, const char *section, config_entry_handler_cb handler, void *user_data) { @@ -352,7 +351,6 @@ error: return ret; } -LTTNG_HIDDEN int config_parse_value(const char *value) { int i, ret = 0; @@ -441,7 +439,6 @@ end: return out_str; } -LTTNG_HIDDEN struct config_writer *config_writer_create(int fd_output, int indent) { int ret; @@ -484,7 +481,6 @@ error_destroy: return NULL; } -LTTNG_HIDDEN int config_writer_destroy(struct config_writer *writer) { int ret = 0; @@ -508,7 +504,6 @@ end: return ret; } -LTTNG_HIDDEN int config_writer_open_element(struct config_writer *writer, const char *element_name) { @@ -532,7 +527,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_write_attribute(struct config_writer *writer, const char *name, const char *value) { @@ -565,7 +559,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_close_element(struct config_writer *writer) { int ret; @@ -580,7 +573,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_write_element_unsigned_int(struct config_writer *writer, const char *element_name, uint64_t value) { @@ -605,7 +597,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_write_element_signed_int(struct config_writer *writer, const char *element_name, int64_t value) { @@ -630,7 +621,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_write_element_bool(struct config_writer *writer, const char *element_name, int value) { @@ -638,7 +628,6 @@ int config_writer_write_element_bool(struct config_writer *writer, value ? config_xml_true : config_xml_false); } -LTTNG_HIDDEN int config_writer_write_element_double(struct config_writer *writer, const char *element_name, double value) @@ -664,7 +653,6 @@ end: return ret >= 0 ? 0 : ret; } -LTTNG_HIDDEN int config_writer_write_element_string(struct config_writer *writer, const char *element_name, const char *value) { @@ -4022,7 +4010,6 @@ invalid: return 0; } -LTTNG_HIDDEN int config_load_session(const char *path, const char *session_name, int overwrite, unsigned int autoload, const struct config_load_session_override_attr *overrides) diff --git a/src/common/config/session-config.h b/src/common/config/session-config.h index 1a6019fb1..a6955b0b9 100644 --- a/src/common/config/session-config.h +++ b/src/common/config/session-config.h @@ -56,7 +56,6 @@ typedef int (*config_entry_handler_cb)(const struct config_entry *, void *); * Returns 0 on success. Negative values are error codes. If the return value * is positive, it represents the line number on which a parsing error occurred. */ -LTTNG_HIDDEN int config_get_section_entries(const char *path, const char *section, config_entry_handler_cb handler, void *user_data); @@ -69,7 +68,6 @@ int config_get_section_entries(const char *path, const char *section, * Returns either the value of the parsed integer, or 0/1 if a boolean text * string was recognized. Negative values indicate an error. */ -LTTNG_HIDDEN int config_parse_value(const char *value); /* @@ -84,7 +82,6 @@ int config_parse_value(const char *value); * Returns an instance of a configuration writer on success, NULL on * error. */ -LTTNG_HIDDEN struct config_writer *config_writer_create(int fd_output, int indent); /* @@ -95,7 +92,6 @@ struct config_writer *config_writer_create(int fd_output, int indent); * Returns zero if the XML document could be closed cleanly. Negative values * indicate an error. */ -LTTNG_HIDDEN int config_writer_destroy(struct config_writer *writer); /* @@ -108,7 +104,6 @@ int config_writer_destroy(struct config_writer *writer); * Returns zero if the XML element could be opened. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_open_element(struct config_writer *writer, const char *element_name); @@ -122,7 +117,6 @@ int config_writer_open_element(struct config_writer *writer, * Returns zero if the XML element's attribute could be written. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_write_attribute(struct config_writer *writer, const char *name, const char *value); @@ -134,7 +128,6 @@ int config_writer_write_attribute(struct config_writer *writer, * Returns zero if the XML document could be closed cleanly. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_close_element(struct config_writer *writer); /* @@ -149,7 +142,6 @@ int config_writer_close_element(struct config_writer *writer); * Returns zero if the element's value could be written. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_write_element_unsigned_int(struct config_writer *writer, const char *element_name, uint64_t value); @@ -164,7 +156,7 @@ int config_writer_write_element_unsigned_int(struct config_writer *writer, * * Returns zero if the element's value could be written. * Negative values indicate an error. - */LTTNG_HIDDEN + */ int config_writer_write_element_signed_int(struct config_writer *writer, const char *element_name, int64_t value); @@ -180,7 +172,6 @@ int config_writer_write_element_signed_int(struct config_writer *writer, * Returns zero if the element's value could be written. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_write_element_bool(struct config_writer *writer, const char *element_name, int value); @@ -196,7 +187,6 @@ int config_writer_write_element_bool(struct config_writer *writer, * Returns zero if the element's value could be written. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_write_element_string(struct config_writer *writer, const char *element_name, const char *value); @@ -212,7 +202,6 @@ int config_writer_write_element_string(struct config_writer *writer, * Returns zero if the element's value could be written. * Negative values indicate an error. */ -LTTNG_HIDDEN int config_writer_write_element_double(struct config_writer *writer, const char *element_name, double value); @@ -236,7 +225,6 @@ int config_writer_write_element_double(struct config_writer *writer, * Returns zero if the session could be loaded successfully. Returns * a negative LTTNG_ERR code on error. */ -LTTNG_HIDDEN int config_load_session(const char *path, const char *session_name, int overwrite, unsigned int autoload, const struct config_load_session_override_attr *overrides); diff --git a/src/common/context.c b/src/common/context.c index 75d492861..e2e2b60d6 100644 --- a/src/common/context.c +++ b/src/common/context.c @@ -11,7 +11,6 @@ #include #include -LTTNG_HIDDEN int parse_application_context(const char *str, char **out_provider_name, char **out_ctx_name) { diff --git a/src/common/context.h b/src/common/context.h index 036f2004d..f4abd8417 100644 --- a/src/common/context.h +++ b/src/common/context.h @@ -21,7 +21,6 @@ * Returns 0 if the string is a valid application context, else a negative * value on error. */ -LTTNG_HIDDEN int parse_application_context(const char *str, char **provider_name, char **ctx_name); diff --git a/src/common/credentials.c b/src/common/credentials.c index 8b4621c7c..fd8b4477b 100644 --- a/src/common/credentials.c +++ b/src/common/credentials.c @@ -8,19 +8,16 @@ #include #include "credentials.h" -LTTNG_HIDDEN uid_t lttng_credentials_get_uid(const struct lttng_credentials *creds) { return LTTNG_OPTIONAL_GET(creds->uid); } -LTTNG_HIDDEN gid_t lttng_credentials_get_gid(const struct lttng_credentials *creds) { return LTTNG_OPTIONAL_GET(creds->gid); } -LTTNG_HIDDEN bool lttng_credentials_is_equal_uid(const struct lttng_credentials *a, const struct lttng_credentials *b) { @@ -40,7 +37,6 @@ bool lttng_credentials_is_equal_uid(const struct lttng_credentials *a, return a->uid.value == b->uid.value; } -LTTNG_HIDDEN bool lttng_credentials_is_equal_gid(const struct lttng_credentials *a, const struct lttng_credentials *b) { @@ -60,7 +56,6 @@ bool lttng_credentials_is_equal_gid(const struct lttng_credentials *a, return a->gid.value == b->gid.value; } -LTTNG_HIDDEN bool lttng_credentials_is_equal(const struct lttng_credentials *a, const struct lttng_credentials *b) { diff --git a/src/common/credentials.h b/src/common/credentials.h index a13e8d654..b1576a757 100644 --- a/src/common/credentials.h +++ b/src/common/credentials.h @@ -19,21 +19,16 @@ struct lttng_credentials { LTTNG_OPTIONAL(gid_t) gid; }; -LTTNG_HIDDEN uid_t lttng_credentials_get_uid(const struct lttng_credentials *creds); -LTTNG_HIDDEN gid_t lttng_credentials_get_gid(const struct lttng_credentials *creds); -LTTNG_HIDDEN bool lttng_credentials_is_equal_uid(const struct lttng_credentials *a, const struct lttng_credentials *b); -LTTNG_HIDDEN bool lttng_credentials_is_equal_gid(const struct lttng_credentials *a, const struct lttng_credentials *b); -LTTNG_HIDDEN bool lttng_credentials_is_equal(const struct lttng_credentials *a, const struct lttng_credentials *b); diff --git a/src/common/daemonize.c b/src/common/daemonize.c index cb094b1ef..16af5a3f7 100644 --- a/src/common/daemonize.c +++ b/src/common/daemonize.c @@ -18,7 +18,6 @@ #include #include -LTTNG_HIDDEN int lttng_daemonize(pid_t *child_ppid, int *completion_flag, int close_fds) { diff --git a/src/common/daemonize.h b/src/common/daemonize.h index c3fb212c9..2c88f06b7 100644 --- a/src/common/daemonize.h +++ b/src/common/daemonize.h @@ -22,7 +22,6 @@ * * Return 0 on success else -1 on error. */ -LTTNG_HIDDEN int lttng_daemonize(pid_t *child_ppid, int *completion_flag, int close_fds); diff --git a/src/common/defaults.c b/src/common/defaults.c index ee48c4368..4a5fef868 100644 --- a/src/common/defaults.c +++ b/src/common/defaults.c @@ -20,37 +20,31 @@ static int pthread_attr_init_done; static pthread_attr_t tattr; -LTTNG_HIDDEN size_t default_get_channel_subbuf_size(void) { return max(_DEFAULT_CHANNEL_SUBBUF_SIZE, PAGE_SIZE); } -LTTNG_HIDDEN size_t default_get_metadata_subbuf_size(void) { return max(DEFAULT_METADATA_SUBBUF_SIZE, PAGE_SIZE); } -LTTNG_HIDDEN size_t default_get_kernel_channel_subbuf_size(void) { return max(DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE, PAGE_SIZE); } -LTTNG_HIDDEN size_t default_get_ust_pid_channel_subbuf_size(void) { return max(DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE, PAGE_SIZE); } -LTTNG_HIDDEN size_t default_get_ust_uid_channel_subbuf_size(void) { return max(DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE, PAGE_SIZE); } -LTTNG_HIDDEN pthread_attr_t *default_pthread_attr(void) { if (pthread_attr_init_done) { diff --git a/src/common/defaults.h b/src/common/defaults.h index faff595c6..39b77470d 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -379,7 +379,6 @@ * This function depends on a value that is set at constructor time, so it is * unsafe to call it from another constructor. */ -LTTNG_HIDDEN size_t default_get_channel_subbuf_size(void); /* @@ -388,7 +387,6 @@ size_t default_get_channel_subbuf_size(void); * This function depends on a value that is set at constructor time, so it is * unsafe to call it from another constructor. */ -LTTNG_HIDDEN size_t default_get_metadata_subbuf_size(void); /* @@ -397,7 +395,6 @@ size_t default_get_metadata_subbuf_size(void); * This function depends on a value that is set at constructor time, so it is * unsafe to call it from another constructor. */ -LTTNG_HIDDEN size_t default_get_kernel_channel_subbuf_size(void); /* @@ -406,7 +403,6 @@ size_t default_get_kernel_channel_subbuf_size(void); * This function depends on a value that is set at constructor time, so it is * unsafe to call it from another constructor. */ -LTTNG_HIDDEN size_t default_get_ust_pid_channel_subbuf_size(void); /* @@ -415,7 +411,6 @@ size_t default_get_ust_pid_channel_subbuf_size(void); * This function depends on a value that is set at constructor time, so it is * unsafe to call it from another constructor. */ -LTTNG_HIDDEN size_t default_get_ust_uid_channel_subbuf_size(void); /* @@ -427,7 +422,6 @@ size_t default_get_ust_uid_channel_subbuf_size(void); * pthread_attr_t pointer where the thread stack size is set to the soft stack * size limit. */ -LTTNG_HIDDEN pthread_attr_t *default_pthread_attr(void); #endif /* _DEFAULTS_H */ diff --git a/src/common/domain.c b/src/common/domain.c index 277fc802a..fb088faca 100644 --- a/src/common/domain.c +++ b/src/common/domain.c @@ -8,7 +8,6 @@ #include "lttng/domain-internal.h" #include "common/macros.h" -LTTNG_HIDDEN const char *lttng_domain_type_str(enum lttng_domain_type domain_type) { switch (domain_type) { diff --git a/src/common/dynamic-array.c b/src/common/dynamic-array.c index 81c2c3efa..d723ffacb 100644 --- a/src/common/dynamic-array.c +++ b/src/common/dynamic-array.c @@ -7,7 +7,6 @@ #include -LTTNG_HIDDEN void lttng_dynamic_array_init(struct lttng_dynamic_array *array, size_t element_size, lttng_dynamic_array_element_destructor destructor) @@ -18,7 +17,6 @@ void lttng_dynamic_array_init(struct lttng_dynamic_array *array, array->destructor = destructor; } -LTTNG_HIDDEN int lttng_dynamic_array_set_count(struct lttng_dynamic_array *array, size_t new_element_count) { @@ -47,7 +45,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_array_add_element(struct lttng_dynamic_array *array, const void *element) { @@ -68,7 +65,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_array_remove_element(struct lttng_dynamic_array *array, size_t element_index) { @@ -90,7 +86,6 @@ int lttng_dynamic_array_remove_element(struct lttng_dynamic_array *array, array->buffer.size - array->element_size); } -LTTNG_HIDDEN void lttng_dynamic_array_reset(struct lttng_dynamic_array *array) { if (array->destructor) { @@ -106,7 +101,6 @@ void lttng_dynamic_array_reset(struct lttng_dynamic_array *array) array->size = 0; } -LTTNG_HIDDEN void lttng_dynamic_array_clear(struct lttng_dynamic_array *array) { if (array->destructor) { @@ -122,7 +116,6 @@ void lttng_dynamic_array_clear(struct lttng_dynamic_array *array) array->size = 0; } -LTTNG_HIDDEN void lttng_dynamic_pointer_array_init( struct lttng_dynamic_pointer_array *array, lttng_dynamic_pointer_array_destructor destructor) @@ -130,7 +123,6 @@ void lttng_dynamic_pointer_array_init( lttng_dynamic_array_init(&array->array, sizeof(void *), destructor); } -LTTNG_HIDDEN int lttng_dynamic_pointer_array_remove_pointer( struct lttng_dynamic_pointer_array *array, size_t index) { @@ -153,7 +145,6 @@ int lttng_dynamic_pointer_array_remove_pointer( } /* Release any memory used by the dynamic array. */ -LTTNG_HIDDEN void lttng_dynamic_pointer_array_reset( struct lttng_dynamic_pointer_array *array) { @@ -174,7 +165,6 @@ void lttng_dynamic_pointer_array_reset( lttng_dynamic_array_reset(&array->array); } -LTTNG_HIDDEN void lttng_dynamic_pointer_array_clear( struct lttng_dynamic_pointer_array *array) { diff --git a/src/common/dynamic-array.h b/src/common/dynamic-array.h index be27cc495..4ce2316f1 100644 --- a/src/common/dynamic-array.h +++ b/src/common/dynamic-array.h @@ -28,7 +28,6 @@ struct lttng_dynamic_pointer_array { * Initialize a resizable array of fixed-size elements. This performs no * allocation and can't fail. */ -LTTNG_HIDDEN void lttng_dynamic_array_init(struct lttng_dynamic_array *array, size_t element_size, lttng_dynamic_array_element_destructor destructor); @@ -70,7 +69,6 @@ void *lttng_dynamic_array_get_element(const struct lttng_dynamic_array *array, * NOTE: It is striclty _invalid_ to access memory after _size_, regardless * of prior calls to set_capacity(). */ -LTTNG_HIDDEN int lttng_dynamic_array_set_count(struct lttng_dynamic_array *array, size_t new_element_count); @@ -80,7 +78,6 @@ int lttng_dynamic_array_set_count(struct lttng_dynamic_array *array, * * element is a pointer to the element to add (copy) to the array. */ -LTTNG_HIDDEN int lttng_dynamic_array_add_element(struct lttng_dynamic_array *array, const void *element); @@ -89,16 +86,13 @@ int lttng_dynamic_array_add_element(struct lttng_dynamic_array *array, * decreased by one and the following elements are shifted to take its place * (when applicable). */ -LTTNG_HIDDEN int lttng_dynamic_array_remove_element(struct lttng_dynamic_array *array, size_t element_index); /* Release any memory used by the dynamic array. */ -LTTNG_HIDDEN void lttng_dynamic_array_reset(struct lttng_dynamic_array *array); /* Remove all elements from the dynamic array. */ -LTTNG_HIDDEN void lttng_dynamic_array_clear(struct lttng_dynamic_array *array); /* @@ -112,7 +106,6 @@ void lttng_dynamic_array_clear(struct lttng_dynamic_array *array); * Initialize a resizable array of fixed-size elements. This performs no * allocation and can't fail. */ -LTTNG_HIDDEN void lttng_dynamic_pointer_array_init( struct lttng_dynamic_pointer_array *array, lttng_dynamic_pointer_array_destructor destructor); @@ -173,17 +166,14 @@ int lttng_dynamic_pointer_array_add_pointer( * count is decreased by one and the following pointers are shifted to * take the place of the removed pointer (if applicable). */ -LTTNG_HIDDEN int lttng_dynamic_pointer_array_remove_pointer( struct lttng_dynamic_pointer_array *array, size_t index); /* Release any memory used by the dynamic array. */ -LTTNG_HIDDEN void lttng_dynamic_pointer_array_reset( struct lttng_dynamic_pointer_array *array); /* Remove all elements from the dynamic pointer array. */ -LTTNG_HIDDEN void lttng_dynamic_pointer_array_clear( struct lttng_dynamic_pointer_array *array); diff --git a/src/common/dynamic-buffer.c b/src/common/dynamic-buffer.c index 4a08aa80e..d6ad6740f 100644 --- a/src/common/dynamic-buffer.c +++ b/src/common/dynamic-buffer.c @@ -26,14 +26,12 @@ size_t round_to_power_of_2(size_t val) return rounded; } -LTTNG_HIDDEN void lttng_dynamic_buffer_init(struct lttng_dynamic_buffer *buffer) { LTTNG_ASSERT(buffer); memset(buffer, 0, sizeof(*buffer)); } -LTTNG_HIDDEN int lttng_dynamic_buffer_append(struct lttng_dynamic_buffer *buffer, const void *buf, size_t len) { @@ -65,7 +63,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_buffer_append_buffer(struct lttng_dynamic_buffer *dst_buffer, const struct lttng_dynamic_buffer *src_buffer) { @@ -82,7 +79,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_buffer_append_view(struct lttng_dynamic_buffer *buffer, const struct lttng_buffer_view *src) { @@ -99,7 +95,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_buffer_set_size(struct lttng_dynamic_buffer *buffer, size_t new_size) { @@ -139,7 +134,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_dynamic_buffer_set_capacity(struct lttng_dynamic_buffer *buffer, size_t demanded_capacity) { @@ -175,7 +169,6 @@ end: } /* Release any memory used by the dynamic buffer. */ -LTTNG_HIDDEN void lttng_dynamic_buffer_reset(struct lttng_dynamic_buffer *buffer) { if (!buffer) { @@ -188,7 +181,6 @@ void lttng_dynamic_buffer_reset(struct lttng_dynamic_buffer *buffer) buffer->data = NULL; } -LTTNG_HIDDEN size_t lttng_dynamic_buffer_get_capacity_left( struct lttng_dynamic_buffer *buffer) { diff --git a/src/common/dynamic-buffer.h b/src/common/dynamic-buffer.h index 3435c846c..0e0dedc9b 100644 --- a/src/common/dynamic-buffer.h +++ b/src/common/dynamic-buffer.h @@ -29,7 +29,6 @@ struct lttng_dynamic_buffer { * Initialize a dynamic buffer. This performs no allocation and is meant * to be used instead of memset or explicit initialization of the buffer. */ -LTTNG_HIDDEN void lttng_dynamic_buffer_init(struct lttng_dynamic_buffer *buffer); /* @@ -37,7 +36,6 @@ void lttng_dynamic_buffer_init(struct lttng_dynamic_buffer *buffer); * (after its current "size"). The dynamic buffer's size is increased by * "len", and its capacity is adjusted automatically. */ -LTTNG_HIDDEN int lttng_dynamic_buffer_append(struct lttng_dynamic_buffer *buffer, const void *buf, size_t len); @@ -46,7 +44,6 @@ int lttng_dynamic_buffer_append(struct lttng_dynamic_buffer *buffer, * dynamic buffer as the source buffer. The source buffer's size is used in lieu * of "len". */ -LTTNG_HIDDEN int lttng_dynamic_buffer_append_buffer(struct lttng_dynamic_buffer *dst_buffer, const struct lttng_dynamic_buffer *src_buffer); @@ -55,7 +52,6 @@ int lttng_dynamic_buffer_append_buffer(struct lttng_dynamic_buffer *dst_buffer, * buffer view as the source buffer. The source buffer's size is used in lieu * of "len". */ -LTTNG_HIDDEN int lttng_dynamic_buffer_append_view(struct lttng_dynamic_buffer *buffer, const struct lttng_buffer_view *view); @@ -75,7 +71,6 @@ int lttng_dynamic_buffer_append_view(struct lttng_dynamic_buffer *buffer, * NOTE: It is striclty _invalid_ to access memory after _size_, regardless * of prior calls to set_capacity(). */ -LTTNG_HIDDEN int lttng_dynamic_buffer_set_size(struct lttng_dynamic_buffer *buffer, size_t new_size); @@ -87,16 +82,13 @@ int lttng_dynamic_buffer_set_size(struct lttng_dynamic_buffer *buffer, * * If the current size > new_capacity, the operation will fail. */ -LTTNG_HIDDEN int lttng_dynamic_buffer_set_capacity(struct lttng_dynamic_buffer *buffer, size_t new_capacity); /* Release any memory used by the dynamic buffer. */ -LTTNG_HIDDEN void lttng_dynamic_buffer_reset(struct lttng_dynamic_buffer *buffer); /* Get the space left in the buffer before a new resize is needed. */ -LTTNG_HIDDEN size_t lttng_dynamic_buffer_get_capacity_left( struct lttng_dynamic_buffer *buffer); diff --git a/src/common/error-query.c b/src/common/error-query.c index e86940461..d6bca73b7 100644 --- a/src/common/error-query.c +++ b/src/common/error-query.c @@ -274,7 +274,6 @@ int lttng_error_query_result_counter_serialize( sizeof(struct lttng_error_query_result_counter_comm)); } -LTTNG_HIDDEN int lttng_error_query_result_serialize( const struct lttng_error_query_result *result, struct lttng_payload *payload) @@ -361,7 +360,6 @@ end: return ret; } -LTTNG_HIDDEN void lttng_error_query_result_destroy(struct lttng_error_query_result *counter) { if (!counter) { @@ -381,7 +379,6 @@ void lttng_error_query_result_destroy(struct lttng_error_query_result *counter) free(counter); } -LTTNG_HIDDEN struct lttng_error_query_result * lttng_error_query_result_counter_create( const char *name, const char *description, uint64_t value) @@ -418,7 +415,6 @@ void destroy_result(void *ptr) lttng_error_query_result_destroy(result); } -LTTNG_HIDDEN struct lttng_error_query_results *lttng_error_query_results_create(void) { struct lttng_error_query_results *set = zmalloc(sizeof(*set)); @@ -433,7 +429,6 @@ end: return set; } -LTTNG_HIDDEN int lttng_error_query_results_add_result( struct lttng_error_query_results *results, struct lttng_error_query_result *result) @@ -442,7 +437,6 @@ int lttng_error_query_results_add_result( &results->results, result); } -LTTNG_HIDDEN ssize_t lttng_error_query_result_create_from_payload( struct lttng_payload_view *view, struct lttng_error_query_result **result) @@ -531,7 +525,6 @@ end: return used_size; } -LTTNG_HIDDEN int lttng_error_query_results_serialize( const struct lttng_error_query_results *results, struct lttng_payload *payload) @@ -568,7 +561,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_error_query_results_create_from_payload( struct lttng_payload_view *view, struct lttng_error_query_results **_results) @@ -701,14 +693,12 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_error_query_target_type lttng_error_query_get_target_type( const struct lttng_error_query *query) { return query->target_type; } -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_trigger_borrow_target( const struct lttng_error_query *query) { @@ -718,7 +708,6 @@ const struct lttng_trigger *lttng_error_query_trigger_borrow_target( return query_trigger->trigger; } -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_condition_borrow_target( const struct lttng_error_query *query) { @@ -728,7 +717,6 @@ const struct lttng_trigger *lttng_error_query_condition_borrow_target( return query_trigger->trigger; } -LTTNG_HIDDEN const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target( const struct lttng_error_query *query) { @@ -738,7 +726,6 @@ const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target( return query_action->trigger; } -LTTNG_HIDDEN struct lttng_action *lttng_error_query_action_borrow_action_target( const struct lttng_error_query *query, struct lttng_trigger *trigger) @@ -750,7 +737,6 @@ struct lttng_action *lttng_error_query_action_borrow_action_target( trigger, &query_action->action_path); } -LTTNG_HIDDEN int lttng_error_query_serialize(const struct lttng_error_query *query, struct lttng_payload *payload) { @@ -795,7 +781,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view, struct lttng_error_query **query) { @@ -1181,7 +1166,6 @@ end: return ret_code; } -LTTNG_HIDDEN enum lttng_error_code lttng_error_query_results_mi_serialize( const struct lttng_error_query_results *results, struct mi_writer *writer) diff --git a/src/common/error.c b/src/common/error.c index 1e3bd2d9b..b888c2643 100644 --- a/src/common/error.c +++ b/src/common/error.c @@ -31,7 +31,6 @@ static int lttng_opt_abort_on_error = -1; DEFINE_URCU_TLS(struct log_time, error_log_time); DEFINE_URCU_TLS(const char *, logger_thread_name); -LTTNG_HIDDEN const char *log_add_time(void) { int ret; @@ -68,7 +67,6 @@ error: return ""; } -LTTNG_HIDDEN void logger_set_thread_name(const char *name, bool set_pthread_name) { int ret; @@ -255,7 +253,6 @@ static const char *error_string_array[] = { * * These code MUST be negative in other to treat that as an error value. */ -LTTNG_HIDDEN const char *error_get_str(int32_t code) { code = -code; @@ -267,7 +264,6 @@ const char *error_get_str(int32_t code) return error_string_array[ERROR_INDEX(code)]; } -LTTNG_HIDDEN void lttng_abort_on_error(void) { if (lttng_opt_abort_on_error < 0) { diff --git a/src/common/error.h b/src/common/error.h index daef71fdb..f9b2ec2f9 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -44,7 +44,7 @@ struct log_time { char str[19]; }; extern DECLARE_URCU_TLS(struct log_time, error_log_time); -extern LTTNG_HIDDEN DECLARE_URCU_TLS(const char *, logger_thread_name); +extern DECLARE_URCU_TLS(const char *, logger_thread_name); extern int lttng_opt_quiet; extern int lttng_opt_verbose; @@ -262,7 +262,6 @@ const char *error_get_str(int32_t code); const char *log_add_time(void); /* Name must be a statically-allocated string. */ -LTTNG_HIDDEN void logger_set_thread_name(const char *name, bool set_pthread_name); #endif /* _ERROR_H */ diff --git a/src/common/evaluation.c b/src/common/evaluation.c index 6b59949e3..6b3e63494 100644 --- a/src/common/evaluation.c +++ b/src/common/evaluation.c @@ -15,14 +15,12 @@ #include #include -LTTNG_HIDDEN void lttng_evaluation_init(struct lttng_evaluation *evaluation, enum lttng_condition_type type) { evaluation->type = type; } -LTTNG_HIDDEN int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation, struct lttng_payload *payload) { @@ -47,7 +45,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_evaluation_create_from_payload( const struct lttng_condition *condition, struct lttng_payload_view *src_view, diff --git a/src/common/event-expr/event-expr.c b/src/common/event-expr/event-expr.c index 01895c300..7b07312f2 100644 --- a/src/common/event-expr/event-expr.c +++ b/src/common/event-expr/event-expr.c @@ -596,7 +596,6 @@ end: return status; } -LTTNG_HIDDEN int lttng_event_expr_to_bytecode(const struct lttng_event_expr *expr, struct lttng_bytecode **bytecode_out) { @@ -863,7 +862,6 @@ end: return ret_code; } -LTTNG_HIDDEN enum lttng_error_code lttng_event_expr_mi_serialize( const struct lttng_event_expr *expression, struct mi_writer *writer) diff --git a/src/common/event-field-value.c b/src/common/event-field-value.c index 2babd3de1..850f9eda1 100644 --- a/src/common/event-field-value.c +++ b/src/common/event-field-value.c @@ -34,7 +34,6 @@ end: return field_val; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_uint_create( uint64_t val) { @@ -58,7 +57,6 @@ end: return &field_val->parent; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_int_create( int64_t val) { @@ -104,7 +102,6 @@ end: return field_val; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_enum_uint_create( uint64_t val) { @@ -128,7 +125,6 @@ end: return &field_val->parent.parent; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_enum_int_create( int64_t val) { @@ -152,7 +148,6 @@ end: return &field_val->parent.parent; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_real_create(double val) { struct lttng_event_field_value_real *field_val = container_of( @@ -175,7 +170,6 @@ end: return &field_val->parent; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_string_create_with_size( const char *val, size_t size) { @@ -204,7 +198,6 @@ end: return &field_val->parent; } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_string_create( const char *val) { @@ -219,7 +212,6 @@ void destroy_field_val(void *field_val) lttng_event_field_value_destroy(field_val); } -LTTNG_HIDDEN struct lttng_event_field_value *lttng_event_field_value_array_create(void) { struct lttng_event_field_value_array *field_val = container_of( @@ -242,7 +234,6 @@ end: return &field_val->parent; } -LTTNG_HIDDEN void lttng_event_field_value_destroy(struct lttng_event_field_value *field_val) { if (!field_val) { @@ -289,7 +280,6 @@ end: return; } -LTTNG_HIDDEN int lttng_event_field_value_enum_append_label_with_size( struct lttng_event_field_value *field_val, const char *label, size_t size) @@ -318,7 +308,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_event_field_value_enum_append_label( struct lttng_event_field_value *field_val, const char *label) @@ -328,7 +317,6 @@ int lttng_event_field_value_enum_append_label( label, strlen(label)); } -LTTNG_HIDDEN int lttng_event_field_value_array_append( struct lttng_event_field_value *array_field_val, struct lttng_event_field_value *field_val) @@ -341,7 +329,6 @@ int lttng_event_field_value_array_append( field_val); } -LTTNG_HIDDEN int lttng_event_field_value_array_append_unavailable( struct lttng_event_field_value *array_field_val) { diff --git a/src/common/event-rule/event-rule.c b/src/common/event-rule/event-rule.c index 144000e0b..7e3f7248e 100644 --- a/src/common/event-rule/event-rule.c +++ b/src/common/event-rule/event-rule.c @@ -30,7 +30,6 @@ enum lttng_event_rule_type lttng_event_rule_get_type( return event_rule ? event_rule->type : LTTNG_EVENT_RULE_TYPE_UNKNOWN; } -LTTNG_HIDDEN enum lttng_domain_type lttng_event_rule_get_domain_type( const struct lttng_event_rule *event_rule) { @@ -77,7 +76,6 @@ void lttng_event_rule_destroy(struct lttng_event_rule *event_rule) lttng_event_rule_put(event_rule); } -LTTNG_HIDDEN bool lttng_event_rule_validate(const struct lttng_event_rule *event_rule) { bool valid; @@ -98,7 +96,6 @@ end: return valid; } -LTTNG_HIDDEN int lttng_event_rule_serialize(const struct lttng_event_rule *event_rule, struct lttng_payload *payload) { @@ -126,7 +123,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_event_rule_is_equal(const struct lttng_event_rule *a, const struct lttng_event_rule *b) { @@ -150,7 +146,6 @@ end: return is_equal; } -LTTNG_HIDDEN ssize_t lttng_event_rule_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **event_rule) @@ -239,7 +234,6 @@ end: return ret; } -LTTNG_HIDDEN void lttng_event_rule_init(struct lttng_event_rule *event_rule, enum lttng_event_rule_type type) { @@ -247,13 +241,11 @@ void lttng_event_rule_init(struct lttng_event_rule *event_rule, event_rule->type = type; } -LTTNG_HIDDEN bool lttng_event_rule_get(struct lttng_event_rule *event_rule) { return urcu_ref_get_unless_zero(&event_rule->ref); } -LTTNG_HIDDEN void lttng_event_rule_put(struct lttng_event_rule *event_rule) { if (!event_rule) { @@ -264,7 +256,6 @@ void lttng_event_rule_put(struct lttng_event_rule *event_rule) urcu_ref_put(&event_rule->ref, lttng_event_rule_release); } -LTTNG_HIDDEN enum lttng_error_code lttng_event_rule_generate_filter_bytecode( struct lttng_event_rule *rule, const struct lttng_credentials *creds) @@ -273,14 +264,12 @@ enum lttng_error_code lttng_event_rule_generate_filter_bytecode( return rule->generate_filter_bytecode(rule, creds); } -LTTNG_HIDDEN const char *lttng_event_rule_get_filter(const struct lttng_event_rule *rule) { LTTNG_ASSERT(rule->get_filter); return rule->get_filter(rule); } -LTTNG_HIDDEN const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode( const struct lttng_event_rule *rule) { @@ -288,7 +277,6 @@ const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode( return rule->get_filter_bytecode(rule); } -LTTNG_HIDDEN enum lttng_event_rule_generate_exclusions_status lttng_event_rule_generate_exclusions(const struct lttng_event_rule *rule, struct lttng_event_exclusion **exclusions) @@ -297,7 +285,6 @@ lttng_event_rule_generate_exclusions(const struct lttng_event_rule *rule, return rule->generate_exclusions(rule, exclusions); } -LTTNG_HIDDEN struct lttng_event *lttng_event_rule_generate_lttng_event( const struct lttng_event_rule *rule) { @@ -305,7 +292,6 @@ struct lttng_event *lttng_event_rule_generate_lttng_event( return rule->generate_lttng_event(rule); } -LTTNG_HIDDEN bool lttng_event_rule_targets_agent_domain(const struct lttng_event_rule *rule) { bool targets_agent_domain = false; @@ -355,14 +341,12 @@ const char *lttng_event_rule_type_str(enum lttng_event_rule_type type) } } -LTTNG_HIDDEN unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule) { LTTNG_ASSERT(rule->hash); return rule->hash(rule); } -LTTNG_HIDDEN enum lttng_error_code lttng_event_rule_mi_serialize( const struct lttng_event_rule *rule, struct mi_writer *writer) { diff --git a/src/common/event-rule/jul-logging.c b/src/common/event-rule/jul-logging.c index e8d33dbee..c6c05542d 100644 --- a/src/common/event-rule/jul-logging.c +++ b/src/common/event-rule/jul-logging.c @@ -598,7 +598,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_jul_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event-rule/kernel-kprobe.c b/src/common/event-rule/kernel-kprobe.c index 2819f2d2b..872d03a7e 100644 --- a/src/common/event-rule/kernel-kprobe.c +++ b/src/common/event-rule/kernel-kprobe.c @@ -317,7 +317,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_kprobe_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event-rule/kernel-syscall.c b/src/common/event-rule/kernel-syscall.c index f9e2792a6..21aa1e221 100644 --- a/src/common/event-rule/kernel-syscall.c +++ b/src/common/event-rule/kernel-syscall.c @@ -392,7 +392,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_syscall_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) @@ -626,7 +625,6 @@ end: return emission_site; } -LTTNG_HIDDEN const char *lttng_event_rule_kernel_syscall_emission_site_str( enum lttng_event_rule_kernel_syscall_emission_site emission_site) { diff --git a/src/common/event-rule/kernel-tracepoint.c b/src/common/event-rule/kernel-tracepoint.c index 98882bda4..a1f5f625a 100644 --- a/src/common/event-rule/kernel-tracepoint.c +++ b/src/common/event-rule/kernel-tracepoint.c @@ -369,7 +369,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_tracepoint_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event-rule/kernel-uprobe.c b/src/common/event-rule/kernel-uprobe.c index 99c596481..805f2bc79 100644 --- a/src/common/event-rule/kernel-uprobe.c +++ b/src/common/event-rule/kernel-uprobe.c @@ -307,7 +307,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_kernel_uprobe_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) @@ -430,7 +429,6 @@ end: return status; } -LTTNG_HIDDEN struct lttng_userspace_probe_location * lttng_event_rule_kernel_uprobe_get_location_mutable( const struct lttng_event_rule *rule) diff --git a/src/common/event-rule/log4j-logging.c b/src/common/event-rule/log4j-logging.c index 03c4df8a3..6fd05521b 100644 --- a/src/common/event-rule/log4j-logging.c +++ b/src/common/event-rule/log4j-logging.c @@ -597,7 +597,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_log4j_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event-rule/python-logging.c b/src/common/event-rule/python-logging.c index fc072b45f..4ec00c7ef 100644 --- a/src/common/event-rule/python-logging.c +++ b/src/common/event-rule/python-logging.c @@ -597,7 +597,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_python_logging_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event-rule/user-tracepoint.c b/src/common/event-rule/user-tracepoint.c index 8fa2eeb49..cb384f851 100644 --- a/src/common/event-rule/user-tracepoint.c +++ b/src/common/event-rule/user-tracepoint.c @@ -599,7 +599,6 @@ end: return rule; } -LTTNG_HIDDEN ssize_t lttng_event_rule_user_tracepoint_create_from_payload( struct lttng_payload_view *view, struct lttng_event_rule **_event_rule) diff --git a/src/common/event.c b/src/common/event.c index e4bda2505..f1792f931 100644 --- a/src/common/event.c +++ b/src/common/event.c @@ -8,7 +8,6 @@ #include #include -LTTNG_HIDDEN struct lttng_event *lttng_event_copy(const struct lttng_event *event) { struct lttng_event *new_event; diff --git a/src/common/fd-handle.c b/src/common/fd-handle.c index 510e1181b..b2b7efd23 100644 --- a/src/common/fd-handle.c +++ b/src/common/fd-handle.c @@ -31,7 +31,6 @@ static void fd_handle_release(struct urcu_ref *ref) free(handle); } -LTTNG_HIDDEN struct fd_handle *fd_handle_create(int fd) { struct fd_handle *handle = NULL; @@ -55,7 +54,6 @@ end: return handle; } -LTTNG_HIDDEN void fd_handle_get(struct fd_handle *handle) { if (!handle) { @@ -65,7 +63,6 @@ void fd_handle_get(struct fd_handle *handle) urcu_ref_get(&handle->ref); } -LTTNG_HIDDEN void fd_handle_put(struct fd_handle *handle) { if (!handle) { @@ -75,14 +72,12 @@ void fd_handle_put(struct fd_handle *handle) urcu_ref_put(&handle->ref, fd_handle_release); } -LTTNG_HIDDEN int fd_handle_get_fd(struct fd_handle *handle) { LTTNG_ASSERT(handle); return handle->fd; } -LTTNG_HIDDEN struct fd_handle *fd_handle_copy(const struct fd_handle *handle) { struct fd_handle *new_handle = NULL; diff --git a/src/common/fd-handle.h b/src/common/fd-handle.h index 4463f3005..dab9e2bfa 100644 --- a/src/common/fd-handle.h +++ b/src/common/fd-handle.h @@ -19,15 +19,12 @@ struct fd_handle; /* Create a file descriptor handle. */ -LTTNG_HIDDEN struct fd_handle *fd_handle_create(int fd); /* Acquire reference to a file descriptor handle. */ -LTTNG_HIDDEN void fd_handle_get(struct fd_handle *handle); /* Release reference to a file descriptor handle. */ -LTTNG_HIDDEN void fd_handle_put(struct fd_handle *handle); /* @@ -35,7 +32,6 @@ void fd_handle_put(struct fd_handle *handle); * * This function can't fail. */ -LTTNG_HIDDEN int fd_handle_get_fd(struct fd_handle *handle); /* @@ -46,7 +42,6 @@ int fd_handle_get_fd(struct fd_handle *handle); * the system documentation for the semantics of dup() for this particular file * descriptor type. */ -LTTNG_HIDDEN struct fd_handle *fd_handle_copy(const struct fd_handle *handle); #endif /* FS_HANDLE_H */ diff --git a/src/common/fd-tracker/fd-tracker.c b/src/common/fd-tracker/fd-tracker.c index 08ecb3cce..a9921fa84 100644 --- a/src/common/fd-tracker/fd-tracker.c +++ b/src/common/fd-tracker/fd-tracker.c @@ -360,7 +360,6 @@ end: return ret; } -LTTNG_HIDDEN struct fd_tracker *fd_tracker_create(const char *unlinked_file_path, unsigned int capacity) { @@ -406,7 +405,6 @@ error: return NULL; } -LTTNG_HIDDEN void fd_tracker_log(struct fd_tracker *tracker) { struct fs_handle_tracked *handle; @@ -455,7 +453,6 @@ void fd_tracker_log(struct fd_tracker *tracker) pthread_mutex_unlock(&tracker->lock); } -LTTNG_HIDDEN int fd_tracker_destroy(struct fd_tracker *tracker) { int ret = 0; @@ -491,7 +488,6 @@ end: return ret; } -LTTNG_HIDDEN struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker, struct lttng_directory_handle *directory, const char *path, @@ -609,7 +605,6 @@ static int fd_tracker_suspend_handles( return left_to_close ? -EMFILE : 0; } -LTTNG_HIDDEN int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker, int *out_fds, const char **names, @@ -707,7 +702,6 @@ end_free_entries: goto end_unlock; } -LTTNG_HIDDEN int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker, int *fds_in, unsigned int fd_count, diff --git a/src/common/fd-tracker/fd-tracker.h b/src/common/fd-tracker/fd-tracker.h index 348ac5963..ec859c085 100644 --- a/src/common/fd-tracker/fd-tracker.h +++ b/src/common/fd-tracker/fd-tracker.h @@ -49,12 +49,10 @@ typedef int (*fd_close_cb)(void *, int *in_fds); * under which unlinked files will be stored for as long as a reference to them * is held. */ -LTTNG_HIDDEN struct fd_tracker *fd_tracker_create(const char *unlinked_file_path, unsigned int capacity); /* Returns an error if file descriptors are leaked. */ -LTTNG_HIDDEN int fd_tracker_destroy(struct fd_tracker *tracker); /* @@ -79,7 +77,6 @@ int fd_tracker_destroy(struct fd_tracker *tracker); * (e.g. truncation) may react differently than if the file descriptor was kept * open. */ -LTTNG_HIDDEN struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker, struct lttng_directory_handle *directory, const char *path, @@ -108,7 +105,6 @@ struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker, * - EMFILE: too many unsuspendable fds are opened and the tracker can't * accommodates the request for a new unsuspendable entry. */ -LTTNG_HIDDEN int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker, int *out_fds, const char **names, @@ -131,7 +127,6 @@ int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker, * Closed fds are set to -1 in the fds array which, in the event of an error, * allows the user to know which file descriptors are no longer being tracked. */ -LTTNG_HIDDEN int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker, int *fds, unsigned int fd_count, @@ -141,7 +136,6 @@ int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker, /* * Log the contents of the fd_tracker. */ -LTTNG_HIDDEN void fd_tracker_log(struct fd_tracker *tracker); /* @@ -159,14 +153,12 @@ void fd_tracker_log(struct fd_tracker *tracker); * Returns the fd on success, otherwise a negative value may be returned * if the restoration of the fd failed. */ -LTTNG_HIDDEN int fs_handle_get_fd(struct fs_handle *handle); /* * Used by the application to signify that it is no longer using the * underlying fd and that it may be suspended. */ -LTTNG_HIDDEN void fs_handle_put_fd(struct fs_handle *handle); /* @@ -181,13 +173,11 @@ void fs_handle_put_fd(struct fs_handle *handle); * Returns 0 on success, otherwise a negative value will be returned * if the operation failed. */ -LTTNG_HIDDEN int fs_handle_unlink(struct fs_handle *handle); /* * Frees the handle and discards the underlying fd. */ -LTTNG_HIDDEN int fs_handle_close(struct fs_handle *handle); #endif /* FD_TRACKER_H */ diff --git a/src/common/fd-tracker/inode.c b/src/common/fd-tracker/inode.c index 182c84a6b..88e392bde 100644 --- a/src/common/fd-tracker/inode.c +++ b/src/common/fd-tracker/inode.c @@ -245,7 +245,7 @@ static void lttng_inode_get(struct lttng_inode *inode) urcu_ref_get(&inode->ref); } -LTTNG_HIDDEN struct lttng_unlinked_file_pool *lttng_unlinked_file_pool_create( +struct lttng_unlinked_file_pool *lttng_unlinked_file_pool_create( const char *path) { struct lttng_unlinked_file_pool *pool = zmalloc(sizeof(*pool)); @@ -272,7 +272,7 @@ error: return NULL; } -LTTNG_HIDDEN void lttng_unlinked_file_pool_destroy( +void lttng_unlinked_file_pool_destroy( struct lttng_unlinked_file_pool *pool) { if (!pool) { @@ -285,12 +285,12 @@ LTTNG_HIDDEN void lttng_unlinked_file_pool_destroy( free(pool); } -LTTNG_HIDDEN void lttng_inode_put(struct lttng_inode *inode) +void lttng_inode_put(struct lttng_inode *inode) { urcu_ref_put(&inode->ref, lttng_inode_release); } -LTTNG_HIDDEN struct lttng_directory_handle * +struct lttng_directory_handle * lttng_inode_get_location_directory_handle( struct lttng_inode *inode) { @@ -303,7 +303,7 @@ lttng_inode_get_location_directory_handle( return inode->location.directory_handle; } -LTTNG_HIDDEN void lttng_inode_borrow_location(struct lttng_inode *inode, +void lttng_inode_borrow_location(struct lttng_inode *inode, const struct lttng_directory_handle **out_directory_handle, const char **out_path) { @@ -315,7 +315,7 @@ LTTNG_HIDDEN void lttng_inode_borrow_location(struct lttng_inode *inode, } } -LTTNG_HIDDEN int lttng_inode_rename( +int lttng_inode_rename( struct lttng_inode *inode, struct lttng_directory_handle *old_directory_handle, const char *old_path, @@ -385,7 +385,7 @@ end: return ret; } -LTTNG_HIDDEN int lttng_inode_unlink(struct lttng_inode *inode) +int lttng_inode_unlink(struct lttng_inode *inode) { int ret = 0; @@ -451,7 +451,7 @@ end: return inode; } -LTTNG_HIDDEN struct lttng_inode_registry *lttng_inode_registry_create(void) +struct lttng_inode_registry *lttng_inode_registry_create(void) { struct lttng_inode_registry *registry = zmalloc(sizeof(*registry)); @@ -478,7 +478,7 @@ error: return NULL; } -LTTNG_HIDDEN void lttng_inode_registry_destroy( +void lttng_inode_registry_destroy( struct lttng_inode_registry *registry) { if (!registry) { @@ -492,7 +492,7 @@ LTTNG_HIDDEN void lttng_inode_registry_destroy( free(registry); } -LTTNG_HIDDEN struct lttng_inode *lttng_inode_registry_get_inode( +struct lttng_inode *lttng_inode_registry_get_inode( struct lttng_inode_registry *registry, struct lttng_directory_handle *handle, const char *path, diff --git a/src/common/fd-tracker/inode.h b/src/common/fd-tracker/inode.h index 67e63eca4..7e95c0726 100644 --- a/src/common/fd-tracker/inode.h +++ b/src/common/fd-tracker/inode.h @@ -24,19 +24,15 @@ struct lttng_directory_handle; * by the fd-tracker. Users of the fd-tracker should account for this extra * file descriptor. */ -LTTNG_HIDDEN struct lttng_unlinked_file_pool *lttng_unlinked_file_pool_create( const char *path); -LTTNG_HIDDEN void lttng_unlinked_file_pool_destroy( struct lttng_unlinked_file_pool *pool); /* The inode registry is protected by the fd-tracker's lock. */ -LTTNG_HIDDEN struct lttng_inode_registry *lttng_inode_registry_create(void); -LTTNG_HIDDEN struct lttng_inode *lttng_inode_registry_get_inode( struct lttng_inode_registry *registry, struct lttng_directory_handle *handle, @@ -44,20 +40,16 @@ struct lttng_inode *lttng_inode_registry_get_inode( int fd, struct lttng_unlinked_file_pool *pool); -LTTNG_HIDDEN void lttng_inode_registry_destroy(struct lttng_inode_registry *registry); -LTTNG_HIDDEN void lttng_inode_borrow_location(struct lttng_inode *inode, const struct lttng_directory_handle **out_directory_handle, const char **out_path); /* Returns a new reference to the inode's location directory handle. */ -LTTNG_HIDDEN struct lttng_directory_handle *lttng_inode_get_location_directory_handle( struct lttng_inode *inode); -LTTNG_HIDDEN int lttng_inode_rename(struct lttng_inode *inode, struct lttng_directory_handle *old_directory_handle, const char *old_path, @@ -65,10 +57,8 @@ int lttng_inode_rename(struct lttng_inode *inode, const char *new_path, bool overwrite); -LTTNG_HIDDEN int lttng_inode_unlink(struct lttng_inode *inode); -LTTNG_HIDDEN void lttng_inode_put(struct lttng_inode *inode); #endif /* FD_TRACKER_INODE_H */ diff --git a/src/common/fd-tracker/utils.c b/src/common/fd-tracker/utils.c index 85d28b294..fc307fea9 100644 --- a/src/common/fd-tracker/utils.c +++ b/src/common/fd-tracker/utils.c @@ -27,13 +27,11 @@ int close_pipe(void *data, int *pipe) return 0; } -LTTNG_HIDDEN int fd_tracker_util_close_fd(void *unused, int *fd) { return close(*fd); } -LTTNG_HIDDEN int fd_tracker_util_pipe_open_cloexec( struct fd_tracker *tracker, const char *name, int *pipe) { @@ -59,7 +57,6 @@ end: return ret; } -LTTNG_HIDDEN int fd_tracker_util_pipe_close(struct fd_tracker *tracker, int *pipe) { return fd_tracker_close_unsuspendable_fd( @@ -136,7 +133,6 @@ void directory_handle_destroy( } #endif -LTTNG_HIDDEN struct lttng_directory_handle *fd_tracker_create_directory_handle( struct fd_tracker *tracker, const char *path) { @@ -144,7 +140,6 @@ struct lttng_directory_handle *fd_tracker_create_directory_handle( tracker, NULL, path); } -LTTNG_HIDDEN struct lttng_directory_handle *fd_tracker_create_directory_handle_from_handle( struct fd_tracker *tracker, struct lttng_directory_handle *in_handle, diff --git a/src/common/fd-tracker/utils.h b/src/common/fd-tracker/utils.h index 202c4a1b8..829b56b6d 100644 --- a/src/common/fd-tracker/utils.h +++ b/src/common/fd-tracker/utils.h @@ -18,36 +18,29 @@ struct lttng_poll_event; * Utility implementing a close_fd callback which receives one file descriptor * and closes it, returning close()'s return value. */ -LTTNG_HIDDEN int fd_tracker_util_close_fd(void *, int *fd); /* * Create a pipe and track its underlying fds. */ -LTTNG_HIDDEN int fd_tracker_util_pipe_open_cloexec( struct fd_tracker *tracker, const char *name, int *pipe); -LTTNG_HIDDEN int fd_tracker_util_pipe_close(struct fd_tracker *tracker, int *pipe); /* * Create a poll event and track its underlying fd, if applicable. */ -LTTNG_HIDDEN int fd_tracker_util_poll_create(struct fd_tracker *tracker, const char *name, struct lttng_poll_event *events, int size, int flags); -LTTNG_HIDDEN int fd_tracker_util_poll_clean( struct fd_tracker *tracker, struct lttng_poll_event *events); -LTTNG_HIDDEN struct lttng_directory_handle *fd_tracker_create_directory_handle( struct fd_tracker *tracker, const char *path); -LTTNG_HIDDEN struct lttng_directory_handle *fd_tracker_create_directory_handle_from_handle( struct fd_tracker *tracker, struct lttng_directory_handle *handle, diff --git a/src/common/filter.c b/src/common/filter.c index 5d333375d..9195808ee 100644 --- a/src/common/filter.c +++ b/src/common/filter.c @@ -14,7 +14,6 @@ struct bytecode_symbol_iterator { size_t offset, len; }; -LTTNG_HIDDEN struct bytecode_symbol_iterator *bytecode_symbol_iterator_create( struct lttng_bytecode *bytecode) { @@ -36,7 +35,6 @@ end: return it; } -LTTNG_HIDDEN int bytecode_symbol_iterator_next(struct bytecode_symbol_iterator *it) { int ret; @@ -54,7 +52,6 @@ end: return ret; } -LTTNG_HIDDEN int bytecode_symbol_iterator_get_type(struct bytecode_symbol_iterator *it) { int ret; @@ -69,7 +66,6 @@ end: return ret; } -LTTNG_HIDDEN const char *bytecode_symbol_iterator_get_name( struct bytecode_symbol_iterator *it) { @@ -84,7 +80,6 @@ end: return ret; } -LTTNG_HIDDEN void bytecode_symbol_iterator_destroy(struct bytecode_symbol_iterator *it) { free(it); diff --git a/src/common/filter.h b/src/common/filter.h index a03b1d9fe..305434bf6 100644 --- a/src/common/filter.h +++ b/src/common/filter.h @@ -16,7 +16,6 @@ struct bytecode_symbol_iterator; * Create an iterator on a bytecode's symbols. The iterator points to the * first element after creation. */ -LTTNG_HIDDEN struct bytecode_symbol_iterator *bytecode_symbol_iterator_create( struct lttng_bytecode *bytecode); @@ -25,17 +24,13 @@ struct bytecode_symbol_iterator *bytecode_symbol_iterator_create( * * Returns 0 if a next element exists or a negative value at the end. */ -LTTNG_HIDDEN int bytecode_symbol_iterator_next(struct bytecode_symbol_iterator *it); -LTTNG_HIDDEN int bytecode_symbol_iterator_get_type(struct bytecode_symbol_iterator *it); -LTTNG_HIDDEN const char *bytecode_symbol_iterator_get_name( struct bytecode_symbol_iterator *it); -LTTNG_HIDDEN void bytecode_symbol_iterator_destroy(struct bytecode_symbol_iterator *it); #endif /* LTTNG_COMMON_FILTER_H */ diff --git a/src/common/filter/filter-parser.y b/src/common/filter/filter-parser.y index d2c726007..b43561fb3 100644 --- a/src/common/filter/filter-parser.y +++ b/src/common/filter/filter-parser.y @@ -43,20 +43,13 @@ do { \ } while (0) #endif -LTTNG_HIDDEN int yydebug; -LTTNG_HIDDEN int filter_parser_debug = 0; -LTTNG_HIDDEN int yyparse(struct filter_parser_ctx *parser_ctx, yyscan_t scanner); -LTTNG_HIDDEN int yylex(union YYSTYPE *yyval, yyscan_t scanner); -LTTNG_HIDDEN int yylex_init_extra(struct filter_parser_ctx *parser_ctx, yyscan_t * ptr_yy_globals); -LTTNG_HIDDEN int yylex_destroy(yyscan_t yyparser_ctx); -LTTNG_HIDDEN void yyrestart(FILE * in_str, yyscan_t parser_ctx); struct gc_string { @@ -73,7 +66,6 @@ static const char *node_type_to_str[] = { [ NODE_UNARY_OP ] = "NODE_UNARY_OP", }; -LTTNG_HIDDEN const char *node_type(struct filter_node *node) { if (node->type < NR_NODE_TYPES) @@ -138,7 +130,6 @@ struct gc_string *gc_string_append(struct filter_parser_ctx *parser_ctx, return gstr; } -LTTNG_HIDDEN void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src) { lvalp->gs = gc_string_alloc(parser_ctx, strlen(src) + 1); @@ -242,13 +233,11 @@ static void filter_ast_free(struct filter_ast *ast) free(ast); } -LTTNG_HIDDEN int filter_parser_ctx_append_ast(struct filter_parser_ctx *parser_ctx) { return yyparse(parser_ctx, parser_ctx->scanner); } -LTTNG_HIDDEN struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input) { struct filter_parser_ctx *parser_ctx; @@ -290,7 +279,6 @@ cleanup_parser_ctx: return NULL; } -LTTNG_HIDDEN void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx) { int ret; @@ -308,7 +296,6 @@ void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx) free(parser_ctx); } -LTTNG_HIDDEN int filter_parser_ctx_create_from_filter_expression( const char *filter_expression, struct filter_parser_ctx **ctxp) { @@ -431,7 +418,6 @@ error: { #include "common/macros.h" -LTTNG_HIDDEN void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src); } diff --git a/src/common/filter/filter-visitor-generate-bytecode.c b/src/common/filter/filter-visitor-generate-bytecode.c index 8bf87d7c6..fe1220305 100644 --- a/src/common/filter/filter-visitor-generate-bytecode.c +++ b/src/common/filter/filter-visitor-generate-bytecode.c @@ -628,7 +628,6 @@ int recursive_visit_gen_bytecode(struct filter_parser_ctx *ctx, } } -LTTNG_HIDDEN void filter_bytecode_free(struct filter_parser_ctx *ctx) { if (!ctx) { @@ -646,7 +645,6 @@ void filter_bytecode_free(struct filter_parser_ctx *ctx) } } -LTTNG_HIDDEN int filter_visitor_bytecode_generate(struct filter_parser_ctx *ctx) { int ret; diff --git a/src/common/filter/filter-visitor-generate-ir.c b/src/common/filter/filter-visitor-generate-ir.c index 56aa26d27..64e41ec93 100644 --- a/src/common/filter/filter-visitor-generate-ir.c +++ b/src/common/filter/filter-visitor-generate-ir.c @@ -892,14 +892,12 @@ struct ir_op *generate_ir_recursive(struct filter_parser_ctx *ctx, return 0; } -LTTNG_HIDDEN void filter_ir_free(struct filter_parser_ctx *ctx) { filter_free_ir_recursive(ctx->ir_root); ctx->ir_root = NULL; } -LTTNG_HIDDEN int filter_visitor_ir_generate(struct filter_parser_ctx *ctx) { struct ir_op *op; diff --git a/src/common/filter/filter-visitor-ir-check-binary-op-nesting.c b/src/common/filter/filter-visitor-ir-check-binary-op-nesting.c index 35a55edae..fed236322 100644 --- a/src/common/filter/filter-visitor-ir-check-binary-op-nesting.c +++ b/src/common/filter/filter-visitor-ir-check-binary-op-nesting.c @@ -63,7 +63,6 @@ int check_bin_op_nesting_recursive(struct ir_op *node, int nesting) } } -LTTNG_HIDDEN int filter_visitor_ir_check_binary_op_nesting(struct filter_parser_ctx *ctx) { return check_bin_op_nesting_recursive(ctx->ir_root, 0); diff --git a/src/common/filter/filter-visitor-ir-normalize-glob-patterns.c b/src/common/filter/filter-visitor-ir-normalize-glob-patterns.c index 679561632..999fc2ea1 100644 --- a/src/common/filter/filter-visitor-ir-normalize-glob-patterns.c +++ b/src/common/filter/filter-visitor-ir-normalize-glob-patterns.c @@ -76,7 +76,6 @@ int normalize_glob_patterns(struct ir_op *node) * utils_normalize_glob_pattern(). See the documentation of * utils_normalize_glob_pattern() for more details. */ -LTTNG_HIDDEN int filter_visitor_ir_normalize_glob_patterns(struct filter_parser_ctx *ctx) { return normalize_glob_patterns(ctx->ir_root); diff --git a/src/common/filter/filter-visitor-ir-validate-globbing.c b/src/common/filter/filter-visitor-ir-validate-globbing.c index df8e9af39..74bb72db4 100644 --- a/src/common/filter/filter-visitor-ir-validate-globbing.c +++ b/src/common/filter/filter-visitor-ir-validate-globbing.c @@ -104,7 +104,6 @@ int validate_globbing(struct ir_op *node) * one of them is a (full) star globbing pattern, the binary * operation is either == or !=. */ -LTTNG_HIDDEN int filter_visitor_ir_validate_globbing(struct filter_parser_ctx *ctx) { return validate_globbing(ctx->ir_root); diff --git a/src/common/filter/filter-visitor-ir-validate-string.c b/src/common/filter/filter-visitor-ir-validate-string.c index 5b0613b19..19018456c 100644 --- a/src/common/filter/filter-visitor-ir-validate-string.c +++ b/src/common/filter/filter-visitor-ir-validate-string.c @@ -116,7 +116,6 @@ end_load: } } -LTTNG_HIDDEN int filter_visitor_ir_validate_string(struct filter_parser_ctx *ctx) { return validate_string(ctx->ir_root); diff --git a/src/common/filter/filter-visitor-xml.c b/src/common/filter/filter-visitor-xml.c index 14d699d69..7d6094e4c 100644 --- a/src/common/filter/filter-visitor-xml.c +++ b/src/common/filter/filter-visitor-xml.c @@ -230,7 +230,6 @@ int recursive_visit_print(struct filter_node *node, FILE *stream, int indent) return 0; } -LTTNG_HIDDEN int filter_visitor_print_xml(struct filter_parser_ctx *ctx, FILE *stream, int indent) { diff --git a/src/common/fs-handle.c b/src/common/fs-handle.c index 46d9d7de5..bed0010e7 100644 --- a/src/common/fs-handle.c +++ b/src/common/fs-handle.c @@ -9,31 +9,26 @@ #include #include -LTTNG_HIDDEN int fs_handle_get_fd(struct fs_handle *handle) { return handle->get_fd(handle); } -LTTNG_HIDDEN void fs_handle_put_fd(struct fs_handle *handle) { return handle->put_fd(handle); } -LTTNG_HIDDEN int fs_handle_unlink(struct fs_handle *handle) { return handle->unlink(handle); } -LTTNG_HIDDEN int fs_handle_close(struct fs_handle *handle) { return handle->close(handle); } -LTTNG_HIDDEN ssize_t fs_handle_read(struct fs_handle *handle, void *buf, size_t count) { ssize_t ret; @@ -50,7 +45,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t fs_handle_write(struct fs_handle *handle, const void *buf, size_t count) { ssize_t ret; @@ -67,7 +61,6 @@ end: return ret; } -LTTNG_HIDDEN int fs_handle_truncate(struct fs_handle *handle, off_t offset) { int ret; @@ -84,7 +77,6 @@ end: return ret; } -LTTNG_HIDDEN off_t fs_handle_seek(struct fs_handle *handle, off_t offset, int whence) { off_t ret; diff --git a/src/common/fs-handle.h b/src/common/fs-handle.h index 1627f7cfe..be6419c88 100644 --- a/src/common/fs-handle.h +++ b/src/common/fs-handle.h @@ -28,14 +28,12 @@ struct fs_handle; * Returns the fd on success, otherwise a negative value may be returned * if the restoration of the fd failed. */ -LTTNG_HIDDEN int fs_handle_get_fd(struct fs_handle *handle); /* * Used by the caller to signal that it is no longer using the underlying fd and * that it may be safely suspended. */ -LTTNG_HIDDEN void fs_handle_put_fd(struct fs_handle *handle); /* @@ -50,25 +48,19 @@ void fs_handle_put_fd(struct fs_handle *handle); * Returns 0 on success, otherwise a negative value will be returned * if the operation failed. */ -LTTNG_HIDDEN int fs_handle_unlink(struct fs_handle *handle); /* * Frees the handle and discards the underlying fd. */ -LTTNG_HIDDEN int fs_handle_close(struct fs_handle *handle); -LTTNG_HIDDEN ssize_t fs_handle_read(struct fs_handle *handle, void *buf, size_t count); -LTTNG_HIDDEN ssize_t fs_handle_write(struct fs_handle *handle, const void *buf, size_t count); -LTTNG_HIDDEN int fs_handle_truncate(struct fs_handle *handle, off_t offset); -LTTNG_HIDDEN off_t fs_handle_seek(struct fs_handle *handle, off_t offset, int whence); #endif /* FS_HANDLE_H */ diff --git a/src/common/futex.c b/src/common/futex.c index 332289924..d0f95abc8 100644 --- a/src/common/futex.c +++ b/src/common/futex.c @@ -38,7 +38,6 @@ * futex() call. If active, we set the value and wake everyone else we indicate * that we are gone (cleanup() case). */ -LTTNG_HIDDEN void futex_wait_update(int32_t *futex, int active) { if (active) { @@ -58,7 +57,6 @@ void futex_wait_update(int32_t *futex, int active) /* * Prepare futex. */ -LTTNG_HIDDEN void futex_nto1_prepare(int32_t *futex) { uatomic_set(futex, -1); @@ -70,7 +68,6 @@ void futex_nto1_prepare(int32_t *futex) /* * Wait futex. */ -LTTNG_HIDDEN void futex_nto1_wait(int32_t *futex) { cmm_smp_mb(); @@ -98,7 +95,6 @@ end: /* * Wake 1 futex. */ -LTTNG_HIDDEN void futex_nto1_wake(int32_t *futex) { if (caa_unlikely(uatomic_read(futex) != -1)) diff --git a/src/common/hashtable/hashtable.c b/src/common/hashtable/hashtable.c index 404734f54..ac765808f 100644 --- a/src/common/hashtable/hashtable.c +++ b/src/common/hashtable/hashtable.c @@ -96,7 +96,6 @@ const char *lttng_ht_type_str(enum lttng_ht_type type) /* * Return an allocated lttng hashtable. */ -LTTNG_HIDDEN struct lttng_ht *lttng_ht_new(unsigned long size, int type) { struct lttng_ht *ht; @@ -161,7 +160,6 @@ error: /* * Free a lttng hashtable. */ -LTTNG_HIDDEN void lttng_ht_destroy(struct lttng_ht *ht) { int ret; @@ -174,7 +172,6 @@ void lttng_ht_destroy(struct lttng_ht *ht) /* * Init lttng ht node string. */ -LTTNG_HIDDEN void lttng_ht_node_init_str(struct lttng_ht_node_str *node, char *key) { LTTNG_ASSERT(node); @@ -186,7 +183,6 @@ void lttng_ht_node_init_str(struct lttng_ht_node_str *node, char *key) /* * Init lttng ht node unsigned long. */ -LTTNG_HIDDEN void lttng_ht_node_init_ulong(struct lttng_ht_node_ulong *node, unsigned long key) { @@ -199,7 +195,6 @@ void lttng_ht_node_init_ulong(struct lttng_ht_node_ulong *node, /* * Init lttng ht node uint64_t. */ -LTTNG_HIDDEN void lttng_ht_node_init_u64(struct lttng_ht_node_u64 *node, uint64_t key) { @@ -212,7 +207,6 @@ void lttng_ht_node_init_u64(struct lttng_ht_node_u64 *node, /* * Init lttng ht node with two uint64_t. */ -LTTNG_HIDDEN void lttng_ht_node_init_two_u64(struct lttng_ht_node_two_u64 *node, uint64_t key1, uint64_t key2) { @@ -226,7 +220,6 @@ void lttng_ht_node_init_two_u64(struct lttng_ht_node_two_u64 *node, /* * Free lttng ht node string. */ -LTTNG_HIDDEN void lttng_ht_node_free_str(struct lttng_ht_node_str *node) { LTTNG_ASSERT(node); @@ -236,7 +229,6 @@ void lttng_ht_node_free_str(struct lttng_ht_node_str *node) /* * Free lttng ht node unsigned long. */ -LTTNG_HIDDEN void lttng_ht_node_free_ulong(struct lttng_ht_node_ulong *node) { LTTNG_ASSERT(node); @@ -246,7 +238,6 @@ void lttng_ht_node_free_ulong(struct lttng_ht_node_ulong *node) /* * Free lttng ht node uint64_t. */ -LTTNG_HIDDEN void lttng_ht_node_free_u64(struct lttng_ht_node_u64 *node) { LTTNG_ASSERT(node); @@ -256,7 +247,6 @@ void lttng_ht_node_free_u64(struct lttng_ht_node_u64 *node) /* * Free lttng ht node two uint64_t. */ -LTTNG_HIDDEN void lttng_ht_node_free_two_u64(struct lttng_ht_node_two_u64 *node) { LTTNG_ASSERT(node); @@ -266,7 +256,6 @@ void lttng_ht_node_free_two_u64(struct lttng_ht_node_two_u64 *node) /* * Lookup function in hashtable. */ -LTTNG_HIDDEN void lttng_ht_lookup(struct lttng_ht *ht, const void *key, struct lttng_ht_iter *iter) { @@ -280,7 +269,6 @@ void lttng_ht_lookup(struct lttng_ht *ht, const void *key, /* * Add unique string node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_unique_str(struct lttng_ht *ht, struct lttng_ht_node_str *node) { @@ -300,7 +288,6 @@ void lttng_ht_add_unique_str(struct lttng_ht *ht, /* * Add string node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_str(struct lttng_ht *ht, struct lttng_ht_node_str *node) { @@ -318,7 +305,6 @@ void lttng_ht_add_str(struct lttng_ht *ht, /* * Add unsigned long node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node) { LTTNG_ASSERT(ht); @@ -335,7 +321,6 @@ void lttng_ht_add_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node) /* * Add uint64_t node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node) { LTTNG_ASSERT(ht); @@ -352,7 +337,6 @@ void lttng_ht_add_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node) /* * Add unique unsigned long node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_unique_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node) { @@ -373,7 +357,6 @@ void lttng_ht_add_unique_ulong(struct lttng_ht *ht, /* * Add unique uint64_t node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_unique_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node) { @@ -394,7 +377,6 @@ void lttng_ht_add_unique_u64(struct lttng_ht *ht, /* * Add unique two uint64_t node to hashtable. */ -LTTNG_HIDDEN void lttng_ht_add_unique_two_u64(struct lttng_ht *ht, struct lttng_ht_node_two_u64 *node) { @@ -415,7 +397,6 @@ void lttng_ht_add_unique_two_u64(struct lttng_ht *ht, /* * Add replace unsigned long node to hashtable. */ -LTTNG_HIDDEN struct lttng_ht_node_ulong *lttng_ht_add_replace_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node) { @@ -441,7 +422,6 @@ struct lttng_ht_node_ulong *lttng_ht_add_replace_ulong(struct lttng_ht *ht, /* * Add replace unsigned long node to hashtable. */ -LTTNG_HIDDEN struct lttng_ht_node_u64 *lttng_ht_add_replace_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node) { @@ -467,7 +447,6 @@ struct lttng_ht_node_u64 *lttng_ht_add_replace_u64(struct lttng_ht *ht, /* * Delete node from hashtable. */ -LTTNG_HIDDEN int lttng_ht_del(struct lttng_ht *ht, struct lttng_ht_iter *iter) { int ret; @@ -486,7 +465,6 @@ int lttng_ht_del(struct lttng_ht *ht, struct lttng_ht_iter *iter) /* * Get first node in the hashtable. */ -LTTNG_HIDDEN void lttng_ht_get_first(struct lttng_ht *ht, struct lttng_ht_iter *iter) { LTTNG_ASSERT(ht); @@ -499,7 +477,6 @@ void lttng_ht_get_first(struct lttng_ht *ht, struct lttng_ht_iter *iter) /* * Get next node in the hashtable. */ -LTTNG_HIDDEN void lttng_ht_get_next(struct lttng_ht *ht, struct lttng_ht_iter *iter) { LTTNG_ASSERT(ht); @@ -512,7 +489,6 @@ void lttng_ht_get_next(struct lttng_ht *ht, struct lttng_ht_iter *iter) /* * Return the number of nodes in the hashtable. */ -LTTNG_HIDDEN unsigned long lttng_ht_get_count(struct lttng_ht *ht) { long scb, sca; @@ -532,7 +508,6 @@ unsigned long lttng_ht_get_count(struct lttng_ht *ht) /* * Return lttng ht string node from iterator. */ -LTTNG_HIDDEN struct lttng_ht_node_str *lttng_ht_iter_get_node_str( struct lttng_ht_iter *iter) { @@ -549,7 +524,6 @@ struct lttng_ht_node_str *lttng_ht_iter_get_node_str( /* * Return lttng ht unsigned long node from iterator. */ -LTTNG_HIDDEN struct lttng_ht_node_ulong *lttng_ht_iter_get_node_ulong( struct lttng_ht_iter *iter) { @@ -566,7 +540,6 @@ struct lttng_ht_node_ulong *lttng_ht_iter_get_node_ulong( /* * Return lttng ht unsigned long node from iterator. */ -LTTNG_HIDDEN struct lttng_ht_node_u64 *lttng_ht_iter_get_node_u64( struct lttng_ht_iter *iter) { @@ -583,7 +556,6 @@ struct lttng_ht_node_u64 *lttng_ht_iter_get_node_u64( /* * Return lttng ht stream and index id node from iterator. */ -LTTNG_HIDDEN struct lttng_ht_node_two_u64 *lttng_ht_iter_get_node_two_u64( struct lttng_ht_iter *iter) { diff --git a/src/common/hashtable/hashtable.h b/src/common/hashtable/hashtable.h index 217f05d47..2c77f0afc 100644 --- a/src/common/hashtable/hashtable.h +++ b/src/common/hashtable/hashtable.h @@ -66,87 +66,59 @@ struct lttng_ht_node_two_u64 { }; /* Hashtable new and destroy */ -LTTNG_HIDDEN struct lttng_ht *lttng_ht_new(unsigned long size, int type); -LTTNG_HIDDEN void lttng_ht_destroy(struct lttng_ht *ht); /* Specialized node init and free functions */ -LTTNG_HIDDEN void lttng_ht_node_init_str(struct lttng_ht_node_str *node, char *key); -LTTNG_HIDDEN void lttng_ht_node_init_ulong(struct lttng_ht_node_ulong *node, unsigned long key); -LTTNG_HIDDEN void lttng_ht_node_init_u64(struct lttng_ht_node_u64 *node, uint64_t key); -LTTNG_HIDDEN void lttng_ht_node_init_two_u64(struct lttng_ht_node_two_u64 *node, uint64_t key1, uint64_t key2); -LTTNG_HIDDEN void lttng_ht_node_free_str(struct lttng_ht_node_str *node); -LTTNG_HIDDEN void lttng_ht_node_free_ulong(struct lttng_ht_node_ulong *node); -LTTNG_HIDDEN void lttng_ht_node_free_u64(struct lttng_ht_node_u64 *node); -LTTNG_HIDDEN void lttng_ht_node_free_two_u64(struct lttng_ht_node_two_u64 *node); -LTTNG_HIDDEN void lttng_ht_lookup(struct lttng_ht *ht, const void *key, struct lttng_ht_iter *iter); /* Specialized add unique functions */ -LTTNG_HIDDEN void lttng_ht_add_unique_str(struct lttng_ht *ht, struct lttng_ht_node_str *node); -LTTNG_HIDDEN void lttng_ht_add_unique_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node); -LTTNG_HIDDEN void lttng_ht_add_unique_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node); -LTTNG_HIDDEN void lttng_ht_add_unique_two_u64(struct lttng_ht *ht, struct lttng_ht_node_two_u64 *node); -LTTNG_HIDDEN struct lttng_ht_node_ulong *lttng_ht_add_replace_ulong( struct lttng_ht *ht, struct lttng_ht_node_ulong *node); -LTTNG_HIDDEN struct lttng_ht_node_u64 *lttng_ht_add_replace_u64( struct lttng_ht *ht, struct lttng_ht_node_u64 *node); -LTTNG_HIDDEN void lttng_ht_add_str(struct lttng_ht *ht, struct lttng_ht_node_str *node); -LTTNG_HIDDEN void lttng_ht_add_ulong(struct lttng_ht *ht, struct lttng_ht_node_ulong *node); -LTTNG_HIDDEN void lttng_ht_add_u64(struct lttng_ht *ht, struct lttng_ht_node_u64 *node); -LTTNG_HIDDEN int lttng_ht_del(struct lttng_ht *ht, struct lttng_ht_iter *iter); -LTTNG_HIDDEN void lttng_ht_get_first(struct lttng_ht *ht, struct lttng_ht_iter *iter); -LTTNG_HIDDEN void lttng_ht_get_next(struct lttng_ht *ht, struct lttng_ht_iter *iter); -LTTNG_HIDDEN unsigned long lttng_ht_get_count(struct lttng_ht *ht); -LTTNG_HIDDEN struct lttng_ht_node_str *lttng_ht_iter_get_node_str( struct lttng_ht_iter *iter); -LTTNG_HIDDEN struct lttng_ht_node_ulong *lttng_ht_iter_get_node_ulong( struct lttng_ht_iter *iter); -LTTNG_HIDDEN struct lttng_ht_node_u64 *lttng_ht_iter_get_node_u64( struct lttng_ht_iter *iter); -LTTNG_HIDDEN struct lttng_ht_node_two_u64 *lttng_ht_iter_get_node_two_u64( struct lttng_ht_iter *iter); diff --git a/src/common/hashtable/utils.c b/src/common/hashtable/utils.c index fced4570b..eb51554b2 100644 --- a/src/common/hashtable/utils.c +++ b/src/common/hashtable/utils.c @@ -439,7 +439,6 @@ static uint32_t hashlittle(const void *key, return c; } -LTTNG_HIDDEN unsigned long hash_key_u64(const void *_key, unsigned long seed) { union { @@ -462,7 +461,6 @@ unsigned long hash_key_u64(const void *_key, unsigned long seed) * Hash function for number value. * Pass the value itself as the key, not its address. */ -LTTNG_HIDDEN unsigned long hash_key_ulong(const void *_key, unsigned long seed) { uint64_t __key = (uint64_t) _key; @@ -473,7 +471,6 @@ unsigned long hash_key_ulong(const void *_key, unsigned long seed) * Hash function for number value. * Pass the value itself as the key, not its address. */ -LTTNG_HIDDEN unsigned long hash_key_ulong(const void *_key, unsigned long seed) { uint32_t key = (uint32_t) _key; @@ -485,7 +482,6 @@ unsigned long hash_key_ulong(const void *_key, unsigned long seed) /* * Hash function for string. */ -LTTNG_HIDDEN unsigned long hash_key_str(const void *key, unsigned long seed) { return hashlittle(key, strlen((const char *) key), seed); @@ -494,7 +490,6 @@ unsigned long hash_key_str(const void *key, unsigned long seed) /* * Hash function for two uint64_t. */ -LTTNG_HIDDEN unsigned long hash_key_two_u64(const void *key, unsigned long seed) { const struct lttng_ht_two_u64 *k = @@ -506,7 +501,6 @@ unsigned long hash_key_two_u64(const void *key, unsigned long seed) /* * Hash function compare for number value. */ -LTTNG_HIDDEN int hash_match_key_ulong(const void *key1, const void *key2) { if (key1 == key2) { @@ -519,7 +513,6 @@ int hash_match_key_ulong(const void *key1, const void *key2) /* * Hash function compare for number value. */ -LTTNG_HIDDEN int hash_match_key_u64(const void *key1, const void *key2) { if (*(const uint64_t *) key1 == *(const uint64_t *) key2) { @@ -532,7 +525,6 @@ int hash_match_key_u64(const void *key1, const void *key2) /* * Hash compare function for string. */ -LTTNG_HIDDEN int hash_match_key_str(const void *key1, const void *key2) { if (strcmp(key1, key2) == 0) { @@ -545,7 +537,6 @@ int hash_match_key_str(const void *key1, const void *key2) /* * Hash function compare two uint64_t. */ -LTTNG_HIDDEN int hash_match_key_two_u64(const void *key1, const void *key2) { const struct lttng_ht_two_u64 *k1 = diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c index 7d5006af4..42f42f641 100644 --- a/src/common/kernel-probe.c +++ b/src/common/kernel-probe.c @@ -338,7 +338,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_kernel_probe_location_serialize( const struct lttng_kernel_probe_location *location, struct lttng_payload *payload) @@ -452,7 +451,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_kernel_probe_location_create_from_payload( struct lttng_payload_view *view, struct lttng_kernel_probe_location **location) @@ -598,7 +596,6 @@ end: return is_equal; } -LTTNG_HIDDEN bool lttng_kernel_probe_location_is_equal( const struct lttng_kernel_probe_location *a, const struct lttng_kernel_probe_location *b) @@ -695,7 +692,6 @@ end: return new_location; } -LTTNG_HIDDEN struct lttng_kernel_probe_location *lttng_kernel_probe_location_copy( const struct lttng_kernel_probe_location *location) { @@ -730,7 +726,6 @@ err: return new_location; } -LTTNG_HIDDEN unsigned long lttng_kernel_probe_location_hash( const struct lttng_kernel_probe_location *location) { @@ -845,7 +840,6 @@ end: return ret_code; } -LTTNG_HIDDEN enum lttng_error_code lttng_kernel_probe_location_mi_serialize( const struct lttng_kernel_probe_location *location, struct mi_writer *writer) diff --git a/src/common/location.c b/src/common/location.c index 97fed09b1..e68051ee5 100644 --- a/src/common/location.c +++ b/src/common/location.c @@ -48,13 +48,11 @@ void trace_archive_location_destroy_ref(struct urcu_ref *ref) free(location); } -LTTNG_HIDDEN void lttng_trace_archive_location_get(struct lttng_trace_archive_location *location) { urcu_ref_get(&location->ref); } -LTTNG_HIDDEN void lttng_trace_archive_location_put(struct lttng_trace_archive_location *location) { if (!location) { @@ -64,7 +62,6 @@ void lttng_trace_archive_location_put(struct lttng_trace_archive_location *locat urcu_ref_put(&location->ref, trace_archive_location_destroy_ref); } -LTTNG_HIDDEN struct lttng_trace_archive_location *lttng_trace_archive_location_local_create( const char *absolute_path) { @@ -92,7 +89,6 @@ error: return NULL; } -LTTNG_HIDDEN struct lttng_trace_archive_location *lttng_trace_archive_location_relay_create( const char *host, enum lttng_trace_archive_location_relay_protocol_type protocol, @@ -130,7 +126,6 @@ error: return NULL; } -LTTNG_HIDDEN ssize_t lttng_trace_archive_location_create_from_buffer( const struct lttng_buffer_view *view, struct lttng_trace_archive_location **location) @@ -215,7 +210,6 @@ error: return -1; } -LTTNG_HIDDEN ssize_t lttng_trace_archive_location_serialize( const struct lttng_trace_archive_location *location, struct lttng_dynamic_buffer *buffer) diff --git a/src/common/log-level-rule.c b/src/common/log-level-rule.c index a88a31687..d2bbd4176 100644 --- a/src/common/log-level-rule.c +++ b/src/common/log-level-rule.c @@ -111,7 +111,6 @@ void lttng_log_level_rule_destroy(struct lttng_log_level_rule *log_level_rule) free(log_level_rule); } -LTTNG_HIDDEN ssize_t lttng_log_level_rule_create_from_payload( struct lttng_payload_view *view, struct lttng_log_level_rule **_rule) @@ -159,7 +158,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_log_level_rule_serialize(const struct lttng_log_level_rule *rule, struct lttng_payload *payload) { @@ -186,7 +184,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_log_level_rule_is_equal(const struct lttng_log_level_rule *a, const struct lttng_log_level_rule *b) { @@ -223,7 +220,6 @@ end: return is_equal; } -LTTNG_HIDDEN struct lttng_log_level_rule *lttng_log_level_rule_copy( const struct lttng_log_level_rule *source) { @@ -242,7 +238,6 @@ end: return copy; } -LTTNG_HIDDEN void lttng_log_level_rule_to_loglevel( const struct lttng_log_level_rule *log_level_rule, enum lttng_loglevel_type *loglevel_type, @@ -264,7 +259,6 @@ void lttng_log_level_rule_to_loglevel( *loglevel_value = log_level_rule->level; } -LTTNG_HIDDEN unsigned long lttng_log_level_rule_hash( const struct lttng_log_level_rule *log_level_rule) { @@ -301,7 +295,6 @@ unsigned long lttng_log_level_rule_hash( return hash; } -LTTNG_HIDDEN enum lttng_error_code lttng_log_level_rule_mi_serialize( const struct lttng_log_level_rule *rule, struct mi_writer *writer) diff --git a/src/common/macros.h b/src/common/macros.h index 2b16e5b68..97faf0328 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -93,17 +93,6 @@ void *zmalloc(size_t len) */ #define ALIGN_TO(value, align) ((value + (align - 1)) & ~(align - 1)) -/* - * LTTNG_HIDDEN: set the hidden attribute for internal functions - * On Windows, symbols are local unless explicitly exported, - * see https://gcc.gnu.org/wiki/Visibility - */ -#if defined(_WIN32) || defined(__CYGWIN__) -#define LTTNG_HIDDEN -#else -#define LTTNG_HIDDEN __attribute__((visibility("hidden"))) -#endif - #define member_sizeof(type, field) sizeof(((type *) 0)->field) #define ASSERT_LOCKED(lock) LTTNG_ASSERT(pthread_mutex_trylock(&lock)) diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index e47994ca2..fc3706616 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -21,17 +21,17 @@ #define MI_SCHEMA_MINOR_VERSION 1 /* Machine interface namespace URI */ -LTTNG_HIDDEN const char * const mi_lttng_xmlns = "xmlns"; -LTTNG_HIDDEN const char * const mi_lttng_xmlns_xsi = "xmlns:xsi"; -LTTNG_HIDDEN const char * const mi_lttng_w3_schema_uri = "http://www.w3.org/2001/XMLSchema-instance"; -LTTNG_HIDDEN const char * const mi_lttng_schema_location = "xsi:schemaLocation"; -LTTNG_HIDDEN const char * const mi_lttng_schema_location_uri = +const char * const mi_lttng_xmlns = "xmlns"; +const char * const mi_lttng_xmlns_xsi = "xmlns:xsi"; +const char * const mi_lttng_w3_schema_uri = "http://www.w3.org/2001/XMLSchema-instance"; +const char * const mi_lttng_schema_location = "xsi:schemaLocation"; +const char * const mi_lttng_schema_location_uri = DEFAULT_LTTNG_MI_NAMESPACE " " "https://lttng.org/xml/schemas/lttng-mi/" XSTR(MI_SCHEMA_MAJOR_VERSION) "/lttng-mi-" XSTR(MI_SCHEMA_MAJOR_VERSION) "." XSTR(MI_SCHEMA_MINOR_VERSION) ".xsd"; -LTTNG_HIDDEN const char * const mi_lttng_schema_version = "schemaVersion"; -LTTNG_HIDDEN const char * const mi_lttng_schema_version_value = XSTR(MI_SCHEMA_MAJOR_VERSION) +const char * const mi_lttng_schema_version = "schemaVersion"; +const char * const mi_lttng_schema_version_value = XSTR(MI_SCHEMA_MAJOR_VERSION) "." XSTR(MI_SCHEMA_MINOR_VERSION); /* Strings related to command */ @@ -48,10 +48,10 @@ const char * const mi_lttng_element_command_enable_event = "enable-event"; const char * const mi_lttng_element_command_list = "list"; const char *const mi_lttng_element_command_list_trigger = "list-trigger"; const char * const mi_lttng_element_command_load = "load"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_metadata = "metadata"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_metadata_action = "metadata_action"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_regenerate = "regenerate"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_regenerate_action = "regenerate_action"; +const char * const mi_lttng_element_command_metadata = "metadata"; +const char * const mi_lttng_element_command_metadata_action = "metadata_action"; +const char * const mi_lttng_element_command_regenerate = "regenerate"; +const char * const mi_lttng_element_command_regenerate_action = "regenerate_action"; const char * const mi_lttng_element_command_name = "name"; const char * const mi_lttng_element_command_output = "output"; const char *const mi_lttng_element_command_remove_trigger = "remove-trigger"; @@ -68,10 +68,10 @@ const char * const mi_lttng_element_command_success = "success"; const char * const mi_lttng_element_command_track = "track"; const char * const mi_lttng_element_command_untrack = "untrack"; const char * const mi_lttng_element_command_version = "version"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_rotate = "rotate"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_enable_rotation = "enable-rotation"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_disable_rotation = "disable-rotation"; -LTTNG_HIDDEN const char * const mi_lttng_element_command_clear = "clear"; +const char * const mi_lttng_element_command_rotate = "rotate"; +const char * const mi_lttng_element_command_enable_rotation = "enable-rotation"; +const char * const mi_lttng_element_command_disable_rotation = "disable-rotation"; +const char * const mi_lttng_element_command_clear = "clear"; /* Strings related to version command */ const char * const mi_lttng_element_version = "version"; @@ -99,8 +99,8 @@ const char * const mi_lttng_element_save = "save"; /* Strings related to load command */ const char * const mi_lttng_element_load = "load"; -LTTNG_HIDDEN const char * const mi_lttng_element_load_overrides = "overrides"; -LTTNG_HIDDEN const char * const mi_lttng_element_load_override_url = "url"; +const char * const mi_lttng_element_load_overrides = "overrides"; +const char * const mi_lttng_element_load_override_url = "url"; /* General elements of mi_lttng */ const char * const mi_lttng_element_empty = ""; @@ -177,262 +177,262 @@ const char * const mi_lttng_element_snapshots = "snapshots"; /* String related to track/untrack command */ const char * const mi_lttng_element_track_untrack_all_wildcard = "*"; -LTTNG_HIDDEN const char * const mi_lttng_element_session_name = "session_name"; +const char * const mi_lttng_element_session_name = "session_name"; /* String related to rotate command */ -LTTNG_HIDDEN const char * const mi_lttng_element_rotation = "rotation"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotate_status = "status"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule = "rotation_schedule"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedules = "rotation_schedules"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_result = "rotation_schedule_result"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_results = "rotation_schedule_results"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_periodic = "periodic"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_periodic_time_us = "time_us"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_size_threshold = "size_threshold"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_schedule_size_threshold_bytes = "bytes"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_state = "state"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location = "location"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_local = "local"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_local_absolute_path = "absolute_path"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay = "relay"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay_host = "host"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay_control_port = "control_port"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay_data_port = "data_port"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay_protocol = "protocol"; -LTTNG_HIDDEN const char * const mi_lttng_element_rotation_location_relay_relative_path = "relative_path"; +const char * const mi_lttng_element_rotation = "rotation"; +const char * const mi_lttng_element_rotate_status = "status"; +const char * const mi_lttng_element_rotation_schedule = "rotation_schedule"; +const char * const mi_lttng_element_rotation_schedules = "rotation_schedules"; +const char * const mi_lttng_element_rotation_schedule_result = "rotation_schedule_result"; +const char * const mi_lttng_element_rotation_schedule_results = "rotation_schedule_results"; +const char * const mi_lttng_element_rotation_schedule_periodic = "periodic"; +const char * const mi_lttng_element_rotation_schedule_periodic_time_us = "time_us"; +const char * const mi_lttng_element_rotation_schedule_size_threshold = "size_threshold"; +const char * const mi_lttng_element_rotation_schedule_size_threshold_bytes = "bytes"; +const char * const mi_lttng_element_rotation_state = "state"; +const char * const mi_lttng_element_rotation_location = "location"; +const char * const mi_lttng_element_rotation_location_local = "local"; +const char * const mi_lttng_element_rotation_location_local_absolute_path = "absolute_path"; +const char * const mi_lttng_element_rotation_location_relay = "relay"; +const char * const mi_lttng_element_rotation_location_relay_host = "host"; +const char * const mi_lttng_element_rotation_location_relay_control_port = "control_port"; +const char * const mi_lttng_element_rotation_location_relay_data_port = "data_port"; +const char * const mi_lttng_element_rotation_location_relay_protocol = "protocol"; +const char * const mi_lttng_element_rotation_location_relay_relative_path = "relative_path"; /* String related to enum lttng_rotation_state */ -LTTNG_HIDDEN const char * const mi_lttng_rotation_state_str_ongoing = "ONGOING"; -LTTNG_HIDDEN const char * const mi_lttng_rotation_state_str_completed = "COMPLETED"; -LTTNG_HIDDEN const char * const mi_lttng_rotation_state_str_expired = "EXPIRED"; -LTTNG_HIDDEN const char * const mi_lttng_rotation_state_str_error = "ERROR"; +const char * const mi_lttng_rotation_state_str_ongoing = "ONGOING"; +const char * const mi_lttng_rotation_state_str_completed = "COMPLETED"; +const char * const mi_lttng_rotation_state_str_expired = "EXPIRED"; +const char * const mi_lttng_rotation_state_str_error = "ERROR"; /* String related to enum lttng_trace_archive_location_relay_protocol_type */ -LTTNG_HIDDEN const char * const mi_lttng_rotation_location_relay_protocol_str_tcp = "TCP"; +const char * const mi_lttng_rotation_location_relay_protocol_str_tcp = "TCP"; /* String related to rate_policy elements */ -LTTNG_HIDDEN const char *const mi_lttng_element_rate_policy = "rate_policy"; -LTTNG_HIDDEN const char *const mi_lttng_element_rate_policy_every_n = +const char *const mi_lttng_element_rate_policy = "rate_policy"; +const char *const mi_lttng_element_rate_policy_every_n = "rate_policy_every_n"; -LTTNG_HIDDEN const char *const mi_lttng_element_rate_policy_once_after_n = +const char *const mi_lttng_element_rate_policy_once_after_n = "rate_policy_once_after_n"; -LTTNG_HIDDEN const char *const mi_lttng_element_rate_policy_every_n_interval = +const char *const mi_lttng_element_rate_policy_every_n_interval = "interval"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_rate_policy_once_after_n_threshold = "threshold"; /* String related to action elements */ -LTTNG_HIDDEN const char *const mi_lttng_element_action = "action"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_list = "action_list"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_notify = "action_notify"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_start_session = +const char *const mi_lttng_element_action = "action"; +const char *const mi_lttng_element_action_list = "action_list"; +const char *const mi_lttng_element_action_notify = "action_notify"; +const char *const mi_lttng_element_action_start_session = "action_start_session"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_stop_session = +const char *const mi_lttng_element_action_stop_session = "action_stop_session"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_rotate_session = +const char *const mi_lttng_element_action_rotate_session = "action_rotate_session"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_snapshot_session = +const char *const mi_lttng_element_action_snapshot_session = "action_snapshot_session"; -LTTNG_HIDDEN const char *const mi_lttng_element_action_snapshot_session_output = +const char *const mi_lttng_element_action_snapshot_session_output = "output"; /* String related to condition */ -LTTNG_HIDDEN const char *const mi_lttng_element_condition = "condition"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_buffer_usage_high = +const char *const mi_lttng_element_condition = "condition"; +const char *const mi_lttng_element_condition_buffer_usage_high = "condition_buffer_usage_high"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_buffer_usage_low = +const char *const mi_lttng_element_condition_buffer_usage_low = "condition_buffer_usage_low"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_event_rule_matches = +const char *const mi_lttng_element_condition_event_rule_matches = "condition_event_rule_matches"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_session_consumed_size = +const char *const mi_lttng_element_condition_session_consumed_size = "condition_session_consumed_size"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_session_rotation = +const char *const mi_lttng_element_condition_session_rotation = "condition_session_rotation"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_condition_session_rotation_completed = "condition_session_rotation_completed"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_condition_session_rotation_ongoing = "condition_session_rotation_ongoing"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_channel_name = +const char *const mi_lttng_element_condition_channel_name = "channel_name"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_threshold_bytes = +const char *const mi_lttng_element_condition_threshold_bytes = "threshold_bytes"; -LTTNG_HIDDEN const char *const mi_lttng_element_condition_threshold_ratio = +const char *const mi_lttng_element_condition_threshold_ratio = "threshold_ratio"; /* String related to capture descriptor */ -LTTNG_HIDDEN const char *const mi_lttng_element_capture_descriptor = +const char *const mi_lttng_element_capture_descriptor = "capture_descriptor"; -LTTNG_HIDDEN const char *const mi_lttng_element_capture_descriptors = +const char *const mi_lttng_element_capture_descriptors = "capture_descriptors"; /* String related to event expression */ -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr = "event_expr"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_payload_field = +const char *const mi_lttng_element_event_expr = "event_expr"; +const char *const mi_lttng_element_event_expr_payload_field = "event_expr_payload_field"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_channel_context_field = +const char *const mi_lttng_element_event_expr_channel_context_field = "event_expr_channel_context_field"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_event_expr_app_specific_context_field = "event_expr_app_specific_context_field"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_array_field_element = +const char *const mi_lttng_element_event_expr_array_field_element = "event_expr_array_field_element"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_provider_name = +const char *const mi_lttng_element_event_expr_provider_name = "provider_name"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_type_name = +const char *const mi_lttng_element_event_expr_type_name = "type_name"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_expr_index = "index"; +const char *const mi_lttng_element_event_expr_index = "index"; /* String related to event rule */ -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule = "event_rule"; +const char *const mi_lttng_element_event_rule = "event_rule"; /* String related to lttng_event_rule_type */ -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_event_name = +const char *const mi_lttng_element_event_rule_event_name = "event_name"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_name_pattern = +const char *const mi_lttng_element_event_rule_name_pattern = "name_pattern"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_filter_expression = +const char *const mi_lttng_element_event_rule_filter_expression = "filter_expression"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_jul_logging = +const char *const mi_lttng_element_event_rule_jul_logging = "event_rule_jul_logging"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_kernel_kprobe = +const char *const mi_lttng_element_event_rule_kernel_kprobe = "event_rule_kernel_kprobe"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_kernel_syscall = +const char *const mi_lttng_element_event_rule_kernel_syscall = "event_rule_kernel_syscall"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_kernel_tracepoint = +const char *const mi_lttng_element_event_rule_kernel_tracepoint = "event_rule_kernel_tracepoint"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_kernel_uprobe = +const char *const mi_lttng_element_event_rule_kernel_uprobe = "event_rule_kernel_uprobe"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_log4j_logging = +const char *const mi_lttng_element_event_rule_log4j_logging = "event_rule_log4j_logging"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_python_logging = +const char *const mi_lttng_element_event_rule_python_logging = "event_rule_python_logging"; -LTTNG_HIDDEN const char *const mi_lttng_element_event_rule_user_tracepoint = +const char *const mi_lttng_element_event_rule_user_tracepoint = "event_rule_user_tracepoint"; /* String related to lttng_event_rule_kernel_syscall. */ -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_event_rule_kernel_syscall_emission_site = "emission_site"; /* String related to enum lttng_event_rule_kernel_syscall_emission_site. */ -LTTNG_HIDDEN const char *const +const char *const mi_lttng_event_rule_kernel_syscall_emission_site_entry_exit = "entry+exit"; -LTTNG_HIDDEN const char +const char *const mi_lttng_event_rule_kernel_syscall_emission_site_entry = "entry"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_event_rule_kernel_syscall_emission_site_exit = "exit"; /* String related to lttng_event_rule_user_tracepoint */ -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_event_rule_user_tracepoint_name_pattern_exclusions = "name_pattern_exclusions"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_event_rule_user_tracepoint_name_pattern_exclusion = "name_pattern_exclusion"; /* String related to log level rule. */ -LTTNG_HIDDEN const char *const mi_lttng_element_log_level_rule = +const char *const mi_lttng_element_log_level_rule = "log_level_rule"; -LTTNG_HIDDEN const char *const mi_lttng_element_log_level_rule_exactly = +const char *const mi_lttng_element_log_level_rule_exactly = "log_level_rule_exactly"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_log_level_rule_at_least_as_severe_as = "log_level_rule_at_least_as_severe_as"; -LTTNG_HIDDEN const char *const mi_lttng_element_log_level_rule_level = "level"; +const char *const mi_lttng_element_log_level_rule_level = "level"; /* String related to kernel probe location. */ -LTTNG_HIDDEN const char *const mi_lttng_element_kernel_probe_location = +const char *const mi_lttng_element_kernel_probe_location = "kernel_probe_location"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_kernel_probe_location_symbol_offset = "kernel_probe_location_symbol_offset"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_kernel_probe_location_symbol_offset_name = "name"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_kernel_probe_location_symbol_offset_offset = "offset"; -LTTNG_HIDDEN const char *const mi_lttng_element_kernel_probe_location_address = +const char *const mi_lttng_element_kernel_probe_location_address = "kernel_probe_location_address"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_kernel_probe_location_address_address = "address"; /* String related to userspace probe location. */ -LTTNG_HIDDEN const char *const mi_lttng_element_userspace_probe_location = +const char *const mi_lttng_element_userspace_probe_location = "userspace_probe_location"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_userspace_probe_location_binary_path = "binary_path"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_userspace_probe_location_function = "userspace_probe_location_function"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_userspace_probe_location_function_name = "name"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_userspace_probe_location_lookup_method = "userspace_probe_location_lookup_method"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_lookup_method_function_default = "userspace_probe_location_lookup_method_function_default"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_lookup_method_function_elf = "userspace_probe_location_lookup_method_function_elf"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_lookup_method_tracepoint_sdt = "userspace_probe_location_lookup_method_tracepoint_sdt"; -LTTNG_HIDDEN const char +const char *const mi_lttng_element_userspace_probe_location_tracepoint = "userspace_probe_location_tracepoint"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_tracepoint_probe_name = "probe_name"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_tracepoint_provider_name = "provider_name"; /* String related to enum * lttng_userspace_probe_location_function_instrumentation_type */ -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_userspace_probe_location_function_instrumentation_type = "instrumentation_type"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_userspace_probe_location_function_instrumentation_type_entry = "ENTRY"; /* String related to trigger */ -LTTNG_HIDDEN const char *const mi_lttng_element_triggers = "triggers"; -LTTNG_HIDDEN const char *const mi_lttng_element_trigger = "trigger"; -LTTNG_HIDDEN const char *const mi_lttng_element_trigger_owner_uid = "owner_uid"; +const char *const mi_lttng_element_triggers = "triggers"; +const char *const mi_lttng_element_trigger = "trigger"; +const char *const mi_lttng_element_trigger_owner_uid = "owner_uid"; /* String related to error_query. */ -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_result = +const char *const mi_lttng_element_error_query_result = "error_query_result"; -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_result_counter = +const char *const mi_lttng_element_error_query_result_counter = "error_query_result_counter"; -LTTNG_HIDDEN const char *const +const char *const mi_lttng_element_error_query_result_counter_value = "value"; -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_result_description = +const char *const mi_lttng_element_error_query_result_description = "description"; -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_result_name = +const char *const mi_lttng_element_error_query_result_name = "name"; -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_result_type = +const char *const mi_lttng_element_error_query_result_type = "type"; -LTTNG_HIDDEN const char *const mi_lttng_element_error_query_results = +const char *const mi_lttng_element_error_query_results = "error_query_results"; /* String related to add-context command */ -LTTNG_HIDDEN const char * const mi_lttng_element_context_symbol = "symbol"; +const char * const mi_lttng_element_context_symbol = "symbol"; /* Deprecated symbols preserved for ABI compatibility. */ const char * const mi_lttng_context_type_perf_counter; @@ -448,7 +448,6 @@ const char * const mi_lttng_element_command_calibrate; * Those should never overlap by definition * (see struct lttng_event loglevel) */ -LTTNG_HIDDEN const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain) { switch (domain) { @@ -564,7 +563,6 @@ const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain) } } -LTTNG_HIDDEN const char *mi_lttng_logleveltype_string(enum lttng_loglevel_type value) { switch (value) { @@ -689,7 +687,6 @@ const char *mi_lttng_event_contexttype_string(enum lttng_event_context_type val) } } -LTTNG_HIDDEN const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type val) { switch (val) { @@ -706,7 +703,6 @@ const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type val) } } -LTTNG_HIDDEN const char *mi_lttng_domaintype_string(enum lttng_domain_type value) { switch (value) { @@ -727,7 +723,6 @@ const char *mi_lttng_domaintype_string(enum lttng_domain_type value) } } -LTTNG_HIDDEN const char *mi_lttng_buffertype_string(enum lttng_buffer_type value) { switch (value) { @@ -744,7 +739,6 @@ const char *mi_lttng_buffertype_string(enum lttng_buffer_type value) } } -LTTNG_HIDDEN const char *mi_lttng_rotation_state_string(enum lttng_rotation_state value) { switch (value) { @@ -763,7 +757,6 @@ const char *mi_lttng_rotation_state_string(enum lttng_rotation_state value) } } -LTTNG_HIDDEN const char *mi_lttng_trace_archive_location_relay_protocol_type_string( enum lttng_trace_archive_location_relay_protocol_type value) { @@ -777,7 +770,6 @@ const char *mi_lttng_trace_archive_location_relay_protocol_type_string( } } -LTTNG_HIDDEN struct mi_writer *mi_lttng_writer_create(int fd_output, int mi_output_type) { struct mi_writer *mi_writer; @@ -805,7 +797,6 @@ err_destroy: return NULL; } -LTTNG_HIDDEN int mi_lttng_writer_destroy(struct mi_writer *writer) { int ret; @@ -825,7 +816,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_writer_command_open(struct mi_writer *writer, const char *command) { int ret; @@ -872,26 +862,22 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_writer_command_close(struct mi_writer *writer) { return mi_lttng_writer_close_element(writer); } -LTTNG_HIDDEN int mi_lttng_writer_open_element(struct mi_writer *writer, const char *element_name) { return config_writer_open_element(writer->writer, element_name); } -LTTNG_HIDDEN int mi_lttng_writer_close_element(struct mi_writer *writer) { return config_writer_close_element(writer->writer); } -LTTNG_HIDDEN int mi_lttng_close_multi_element(struct mi_writer *writer, unsigned int nb_element) { @@ -911,7 +897,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_writer_write_element_unsigned_int(struct mi_writer *writer, const char *element_name, uint64_t value) { @@ -919,7 +904,6 @@ int mi_lttng_writer_write_element_unsigned_int(struct mi_writer *writer, element_name, value); } -LTTNG_HIDDEN int mi_lttng_writer_write_element_signed_int(struct mi_writer *writer, const char *element_name, int64_t value) { @@ -927,7 +911,6 @@ int mi_lttng_writer_write_element_signed_int(struct mi_writer *writer, element_name, value); } -LTTNG_HIDDEN int mi_lttng_writer_write_element_bool(struct mi_writer *writer, const char *element_name, int value) { @@ -935,7 +918,6 @@ int mi_lttng_writer_write_element_bool(struct mi_writer *writer, element_name, value); } -LTTNG_HIDDEN int mi_lttng_writer_write_element_string(struct mi_writer *writer, const char *element_name, const char *value) { @@ -943,7 +925,6 @@ int mi_lttng_writer_write_element_string(struct mi_writer *writer, element_name, value); } -LTTNG_HIDDEN int mi_lttng_writer_write_element_double(struct mi_writer *writer, const char *element_name, double value) @@ -952,7 +933,6 @@ int mi_lttng_writer_write_element_double(struct mi_writer *writer, writer->writer, element_name, value); } -LTTNG_HIDDEN int mi_lttng_version(struct mi_writer *writer, struct mi_lttng_version *version, const char *lttng_description, const char *lttng_license) { @@ -1034,13 +1014,11 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_sessions_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, config_element_sessions); } -LTTNG_HIDDEN int mi_lttng_session(struct mi_writer *writer, struct lttng_session *session, int is_open) { @@ -1100,13 +1078,11 @@ end: } -LTTNG_HIDDEN int mi_lttng_domains_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, config_element_domains); } -LTTNG_HIDDEN int mi_lttng_domain(struct mi_writer *writer, struct lttng_domain *domain, int is_open) { @@ -1154,13 +1130,11 @@ end: } -LTTNG_HIDDEN int mi_lttng_channels_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, config_element_channels); } -LTTNG_HIDDEN int mi_lttng_channel(struct mi_writer *writer, struct lttng_channel *channel, int is_open) { @@ -1205,7 +1179,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_channel_attr(struct mi_writer *writer, struct lttng_channel_attr *attr) { @@ -1359,7 +1332,6 @@ end: } -LTTNG_HIDDEN int mi_lttng_event_common_attributes(struct mi_writer *writer, struct lttng_event *event) { @@ -1457,7 +1429,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_event_tracepoint_loglevel(struct mi_writer *writer, struct lttng_event *event, enum lttng_domain_type domain) { @@ -1486,7 +1457,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_event_tracepoint_no_loglevel(struct mi_writer *writer, struct lttng_event *event) { @@ -1494,7 +1464,6 @@ int mi_lttng_event_tracepoint_no_loglevel(struct mi_writer *writer, return write_event_exclusions(writer, event); } -LTTNG_HIDDEN int mi_lttng_event_function_probe(struct mi_writer *writer, struct lttng_event *event) { @@ -1674,7 +1643,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_event_function_entry(struct mi_writer *writer, struct lttng_event *event) { @@ -1703,13 +1671,11 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_events_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, config_element_events); } -LTTNG_HIDDEN int mi_lttng_event(struct mi_writer *writer, struct lttng_event *event, int is_open, enum lttng_domain_type domain) { @@ -1759,7 +1725,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_trackers_open(struct mi_writer *writer) { return mi_lttng_writer_open_element( @@ -1815,7 +1780,6 @@ static int get_tracker_elements(enum lttng_process_attr process_attr, return ret; } -LTTNG_HIDDEN int mi_lttng_process_attribute_tracker_open( struct mi_writer *writer, enum lttng_process_attr process_attr) { @@ -1840,7 +1804,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_pids_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, config_element_pids); @@ -1850,7 +1813,6 @@ int mi_lttng_pids_open(struct mi_writer *writer) * TODO: move the listing of pid for user agent to process semantic on * mi api bump. The use of process element break the mi api. */ -LTTNG_HIDDEN int mi_lttng_pid(struct mi_writer *writer, pid_t pid, const char *name, @@ -1889,14 +1851,12 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_process_attr_values_open(struct mi_writer *writer) { return mi_lttng_writer_open_element( writer, config_element_process_attr_values); } -LTTNG_HIDDEN int mi_lttng_all_process_attribute_value(struct mi_writer *writer, enum lttng_process_attr process_attr, bool is_open) @@ -1940,7 +1900,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_integral_process_attribute_value(struct mi_writer *writer, enum lttng_process_attr process_attr, int64_t value, @@ -1987,7 +1946,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_string_process_attribute_value(struct mi_writer *writer, enum lttng_process_attr process_attr, const char *value, @@ -2035,13 +1993,11 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_event_fields_open(struct mi_writer *writer) { return mi_lttng_writer_open_element(writer, mi_lttng_element_event_fields); } -LTTNG_HIDDEN int mi_lttng_event_field(struct mi_writer *writer, struct lttng_event_field *field) { @@ -2091,7 +2047,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_perf_counter_context(struct mi_writer *writer, struct lttng_event_perf_counter_ctx *perf_context) { @@ -2165,7 +2120,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_context(struct mi_writer *writer, struct lttng_event_context *context, int is_open) { @@ -2227,7 +2181,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_snapshot_output_session_name(struct mi_writer *writer, const char *session_name) { @@ -2256,7 +2209,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_snapshot_list_output(struct mi_writer *writer, const struct lttng_snapshot_output *output) { @@ -2311,7 +2263,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_snapshot_del_output(struct mi_writer *writer, int id, const char *name, const char *current_session_name) { @@ -2362,7 +2313,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_snapshot_add_output(struct mi_writer *writer, const char *current_session_name, const char *n_ptr, struct lttng_snapshot_output *output) @@ -2418,7 +2368,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_snapshot_record(struct mi_writer *writer, const char *current_session_name, const char *url, const char *cmdline_ctrl_url, const char *cmdline_data_url) @@ -2465,7 +2414,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_rotation_schedule(struct mi_writer *writer, const struct lttng_rotation_schedule *schedule) { @@ -2525,7 +2473,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_rotation_schedule_result(struct mi_writer *writer, const struct lttng_rotation_schedule *schedule, bool success) @@ -2710,7 +2657,6 @@ end: return ret; } -LTTNG_HIDDEN int mi_lttng_rotate(struct mi_writer *writer, const char *session_name, enum lttng_rotation_state rotation_state, diff --git a/src/common/mi-lttng.h b/src/common/mi-lttng.h index 38a7d0d91..414c731d2 100644 --- a/src/common/mi-lttng.h +++ b/src/common/mi-lttng.h @@ -61,7 +61,7 @@ struct mi_lttng_error_query_callbacks { extern const char * const mi_lttng_element_command; extern const char * const mi_lttng_element_command_action; extern const char * const mi_lttng_element_command_add_context; -LTTNG_HIDDEN extern const char * const mi_lttng_element_command_add_trigger; +extern const char * const mi_lttng_element_command_add_trigger; extern const char * const mi_lttng_element_command_create; extern const char * const mi_lttng_element_command_destroy; extern const char * const mi_lttng_element_command_disable_channel; @@ -69,7 +69,7 @@ extern const char * const mi_lttng_element_command_disable_event; extern const char * const mi_lttng_element_command_enable_channels; extern const char * const mi_lttng_element_command_enable_event; extern const char * const mi_lttng_element_command_list; -LTTNG_HIDDEN extern const char * const mi_lttng_element_command_list_trigger; +extern const char * const mi_lttng_element_command_list_trigger; extern const char * const mi_lttng_element_command_load; extern const char * const mi_lttng_element_command_metadata; extern const char * const mi_lttng_element_command_metadata_action; @@ -77,7 +77,7 @@ extern const char * const mi_lttng_element_command_regenerate; extern const char * const mi_lttng_element_command_regenerate_action; extern const char * const mi_lttng_element_command_name; extern const char * const mi_lttng_element_command_output; -LTTNG_HIDDEN extern const char * const mi_lttng_element_command_remove_trigger; +extern const char * const mi_lttng_element_command_remove_trigger; extern const char * const mi_lttng_element_command_save; extern const char * const mi_lttng_element_command_set_session; extern const char * const mi_lttng_element_command_snapshot; @@ -122,8 +122,8 @@ extern const char * const mi_lttng_element_save; /* Strings related to load command */ extern const char * const mi_lttng_element_load; -LTTNG_HIDDEN extern const char * const mi_lttng_element_load_overrides; -LTTNG_HIDDEN extern const char * const mi_lttng_element_load_override_url; +extern const char * const mi_lttng_element_load_overrides; +extern const char * const mi_lttng_element_load_override_url; /* General element of mi_lttng */ extern const char * const mi_lttng_element_empty; @@ -200,205 +200,205 @@ extern const char * const mi_lttng_element_snapshots; /* String related to track/untrack command */ extern const char * const mi_lttng_element_track_untrack_all_wildcard; -LTTNG_HIDDEN extern const char * const mi_lttng_element_session_name; +extern const char * const mi_lttng_element_session_name; /* String related to rotate command */ -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotate_status; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedules; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_periodic; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_periodic_time_us; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_size_threshold; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_size_threshold_bytes; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_result; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_schedule_results; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_state; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_local; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_local_absolute_path; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay_host; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay_control_port; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay_data_port; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay_protocol; -LTTNG_HIDDEN extern const char * const mi_lttng_element_rotation_location_relay_relative_path; +extern const char * const mi_lttng_element_rotation; +extern const char * const mi_lttng_element_rotate_status; +extern const char * const mi_lttng_element_rotation_schedule; +extern const char * const mi_lttng_element_rotation_schedules; +extern const char * const mi_lttng_element_rotation_schedule_periodic; +extern const char * const mi_lttng_element_rotation_schedule_periodic_time_us; +extern const char * const mi_lttng_element_rotation_schedule_size_threshold; +extern const char * const mi_lttng_element_rotation_schedule_size_threshold_bytes; +extern const char * const mi_lttng_element_rotation_schedule_result; +extern const char * const mi_lttng_element_rotation_schedule_results; +extern const char * const mi_lttng_element_rotation_state; +extern const char * const mi_lttng_element_rotation_location; +extern const char * const mi_lttng_element_rotation_location_local; +extern const char * const mi_lttng_element_rotation_location_local_absolute_path; +extern const char * const mi_lttng_element_rotation_location_relay; +extern const char * const mi_lttng_element_rotation_location_relay_host; +extern const char * const mi_lttng_element_rotation_location_relay_control_port; +extern const char * const mi_lttng_element_rotation_location_relay_data_port; +extern const char * const mi_lttng_element_rotation_location_relay_protocol; +extern const char * const mi_lttng_element_rotation_location_relay_relative_path; /* String related to enum lttng_rotation_state */ -LTTNG_HIDDEN extern const char * const mi_lttng_rotation_state_str_ongoing; -LTTNG_HIDDEN extern const char * const mi_lttng_rotation_state_str_completed; -LTTNG_HIDDEN extern const char * const mi_lttng_rotation_state_str_expired; -LTTNG_HIDDEN extern const char * const mi_lttng_rotation_state_str_error; +extern const char * const mi_lttng_rotation_state_str_ongoing; +extern const char * const mi_lttng_rotation_state_str_completed; +extern const char * const mi_lttng_rotation_state_str_expired; +extern const char * const mi_lttng_rotation_state_str_error; /* String related to enum lttng_trace_archive_location_relay_protocol_type */ -LTTNG_HIDDEN extern const char * const mi_lttng_rotation_location_relay_protocol_str_tcp; +extern const char * const mi_lttng_rotation_location_relay_protocol_str_tcp; /* String related to rate_policy elements */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_rate_policy; -LTTNG_HIDDEN extern const char *const mi_lttng_element_rate_policy_every_n; -LTTNG_HIDDEN extern const char *const mi_lttng_element_rate_policy_once_after_n; +extern const char *const mi_lttng_element_rate_policy; +extern const char *const mi_lttng_element_rate_policy_every_n; +extern const char *const mi_lttng_element_rate_policy_once_after_n; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_rate_policy_every_n_interval; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_rate_policy_once_after_n_threshold; /* String related to action elements */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_action; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_list; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_notify; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_start_session; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_stop_session; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_rotate_session; -LTTNG_HIDDEN extern const char *const mi_lttng_element_action_snapshot_session; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_action; +extern const char *const mi_lttng_element_action_list; +extern const char *const mi_lttng_element_action_notify; +extern const char *const mi_lttng_element_action_start_session; +extern const char *const mi_lttng_element_action_stop_session; +extern const char *const mi_lttng_element_action_rotate_session; +extern const char *const mi_lttng_element_action_snapshot_session; +extern const char *const mi_lttng_element_action_snapshot_session_output; /* String related to condition */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_condition; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition; +extern const char *const mi_lttng_element_condition_buffer_usage_high; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_buffer_usage_low; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_event_rule_matches; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_session_consumed_size; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_session_rotation; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_session_rotation_completed; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_condition_session_rotation_ongoing; -LTTNG_HIDDEN extern const char *const mi_lttng_element_condition_channel_name; -LTTNG_HIDDEN extern const char *const mi_lttng_element_condition_threshold_ratio; -LTTNG_HIDDEN extern const char *const mi_lttng_element_condition_threshold_bytes; +extern const char *const mi_lttng_element_condition_channel_name; +extern const char *const mi_lttng_element_condition_threshold_ratio; +extern const char *const mi_lttng_element_condition_threshold_bytes; /* String related to capture descriptor */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_capture_descriptor; -LTTNG_HIDDEN extern const char *const mi_lttng_element_capture_descriptors; +extern const char *const mi_lttng_element_capture_descriptor; +extern const char *const mi_lttng_element_capture_descriptors; /* String related to event expression */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_expr; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_expr_payload_field; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_expr; +extern const char *const mi_lttng_element_event_expr_payload_field; +extern const char *const mi_lttng_element_event_expr_channel_context_field; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_expr_app_specific_context_field; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_expr_array_field_element; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_expr_provider_name; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_expr_type_name; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_expr_index; +extern const char *const mi_lttng_element_event_expr_provider_name; +extern const char *const mi_lttng_element_event_expr_type_name; +extern const char *const mi_lttng_element_event_expr_index; /* String related to event rule */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule; +extern const char *const mi_lttng_element_event_rule; /* String related to lttng_event_rule */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_event_name; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_name_pattern; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_rule_event_name; +extern const char *const mi_lttng_element_event_rule_name_pattern; +extern const char *const mi_lttng_element_event_rule_filter_expression; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_jul_logging; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_kernel_kprobe; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_kernel_syscall; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_rule_jul_logging; +extern const char *const mi_lttng_element_event_rule_kernel_kprobe; +extern const char *const mi_lttng_element_event_rule_kernel_syscall; +extern const char *const mi_lttng_element_event_rule_kernel_tracepoint; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_kernel_uprobe; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_log4j_logging; -LTTNG_HIDDEN extern const char *const mi_lttng_element_event_rule_python_logging; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_rule_kernel_uprobe; +extern const char *const mi_lttng_element_event_rule_log4j_logging; +extern const char *const mi_lttng_element_event_rule_python_logging; +extern const char *const mi_lttng_element_event_rule_user_tracepoint; /* String related to lttng_event_rule_kernel_syscall. */ -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_event_rule_kernel_syscall_emission_site; /* String related to enum lttng_event_rule_kernel_syscall_emission_site. */ -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_event_rule_kernel_syscall_emission_site_entry_exit; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_event_rule_kernel_syscall_emission_site_entry; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_event_rule_kernel_syscall_emission_site_exit; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_event_rule_user_tracepoint_name_pattern_exclusions; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_event_rule_user_tracepoint_name_pattern_exclusion; /* String related to log level rule. */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_log_level_rule; -LTTNG_HIDDEN extern const char *const mi_lttng_element_log_level_rule_exactly; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_log_level_rule; +extern const char *const mi_lttng_element_log_level_rule_exactly; +extern const char *const mi_lttng_element_log_level_rule_at_least_as_severe_as; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_log_level_rule_at_least_as_severe_as_thre; -LTTNG_HIDDEN extern const char *const mi_lttng_element_log_level_rule_level; +extern const char *const mi_lttng_element_log_level_rule_level; /* String related to kernel probe location. */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_kernel_probe_location; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_kernel_probe_location; +extern const char *const mi_lttng_element_kernel_probe_location_symbol_offset; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_kernel_probe_location_symbol_offset_name; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_kernel_probe_location_symbol_offset_offset; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_kernel_probe_location_address; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_kernel_probe_location_address_address; /* String related to userspace probe location. */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_userspace_probe_location; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_userspace_probe_location; +extern const char *const mi_lttng_element_userspace_probe_location_binary_path; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_userspace_probe_location_function; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_userspace_probe_location_function_name; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_userspace_probe_location_lookup_method; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_lookup_method_function_default; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_lookup_method_function_elf; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_lookup_method_tracepoint_sdt; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_userspace_probe_location_tracepoint; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_tracepoint_probe_name; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_tracepoint_provider_name; /* String related to enum * lttng_userspace_probe_location_function_instrumentation_type */ -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_element_userspace_probe_location_function_instrumentation_type; -LTTNG_HIDDEN extern const char *const +extern const char *const mi_lttng_userspace_probe_location_function_instrumentation_type_entry; /* String related to trigger */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_triggers; -LTTNG_HIDDEN extern const char *const mi_lttng_element_trigger; -LTTNG_HIDDEN extern const char *const mi_lttng_element_trigger_owner_uid; +extern const char *const mi_lttng_element_triggers; +extern const char *const mi_lttng_element_trigger; +extern const char *const mi_lttng_element_trigger_owner_uid; /* String related to error_query. */ -LTTNG_HIDDEN extern const char *const mi_lttng_element_error_query_result; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_error_query_result; +extern const char *const mi_lttng_element_error_query_result_counter; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_error_query_result_counter_value; -LTTNG_HIDDEN extern const char +extern const char *const mi_lttng_element_error_query_result_description; -LTTNG_HIDDEN extern const char *const mi_lttng_element_error_query_result_name; -LTTNG_HIDDEN extern const char *const mi_lttng_element_error_query_result_type; -LTTNG_HIDDEN extern const char *const mi_lttng_element_error_query_results; +extern const char *const mi_lttng_element_error_query_result_name; +extern const char *const mi_lttng_element_error_query_result_type; +extern const char *const mi_lttng_element_error_query_results; /* String related to add-context command */ -LTTNG_HIDDEN extern const char * const mi_lttng_element_context_symbol; +extern const char * const mi_lttng_element_context_symbol; /* Utility string function */ const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain); diff --git a/src/common/notification.c b/src/common/notification.c index 9c5bd6d18..d1403574b 100644 --- a/src/common/notification.c +++ b/src/common/notification.c @@ -14,7 +14,6 @@ #include #include -LTTNG_HIDDEN struct lttng_notification *lttng_notification_create( struct lttng_trigger *trigger, struct lttng_evaluation *evaluation) @@ -36,7 +35,6 @@ end: return notification; } -LTTNG_HIDDEN int lttng_notification_serialize(const struct lttng_notification *notification, struct lttng_payload *payload) { @@ -72,7 +70,6 @@ end: } -LTTNG_HIDDEN ssize_t lttng_notification_create_from_payload( struct lttng_payload_view *src_view, struct lttng_notification **notification) diff --git a/src/common/payload-view.c b/src/common/payload-view.c index 247ecec0a..2e6581bb4 100644 --- a/src/common/payload-view.c +++ b/src/common/payload-view.c @@ -11,13 +11,11 @@ #include "payload.h" #include -LTTNG_HIDDEN bool lttng_payload_view_is_valid(const struct lttng_payload_view *view) { return view && lttng_buffer_view_is_valid(&view->buffer); } -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_payload( const struct lttng_payload *payload, size_t offset, ptrdiff_t len) @@ -29,7 +27,6 @@ struct lttng_payload_view lttng_payload_view_from_payload( } : (struct lttng_payload_view) {}; } -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_view( struct lttng_payload_view *view, size_t offset, ptrdiff_t len) @@ -43,7 +40,6 @@ struct lttng_payload_view lttng_payload_view_from_view( } : (struct lttng_payload_view) {}; } -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *buffer, size_t offset, ptrdiff_t len) @@ -54,7 +50,6 @@ struct lttng_payload_view lttng_payload_view_from_dynamic_buffer( } : (struct lttng_payload_view) {}; } -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_buffer_view( const struct lttng_buffer_view *view, size_t offset, ptrdiff_t len) @@ -65,7 +60,6 @@ struct lttng_payload_view lttng_payload_view_from_buffer_view( } : (struct lttng_payload_view) {}; } -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_init_from_buffer( const char *src, size_t offset, ptrdiff_t len) { @@ -75,7 +69,6 @@ struct lttng_payload_view lttng_payload_view_init_from_buffer( }; } -LTTNG_HIDDEN int lttng_payload_view_get_fd_handle_count( const struct lttng_payload_view *payload_view) { @@ -100,7 +93,6 @@ end: return ret; } -LTTNG_HIDDEN struct fd_handle *lttng_payload_view_pop_fd_handle( struct lttng_payload_view *view) { diff --git a/src/common/payload-view.h b/src/common/payload-view.h index 7fe5e7d29..57a8342d7 100644 --- a/src/common/payload-view.h +++ b/src/common/payload-view.h @@ -62,7 +62,6 @@ struct lttng_payload_view { * * @view Payload to validate */ -LTTNG_HIDDEN bool lttng_payload_view_is_valid(const struct lttng_payload_view *view); /** @@ -74,7 +73,6 @@ bool lttng_payload_view_is_valid(const struct lttng_payload_view *view); * cause the view to reference the whole payload from the * offset provided. */ -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_payload( const struct lttng_payload *payload, size_t offset, ptrdiff_t len); @@ -89,7 +87,6 @@ struct lttng_payload_view lttng_payload_view_from_payload( * cause the payload view to reference the whole payload view's * buffer view from the offset provided. */ -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_view( struct lttng_payload_view *view, size_t offset, ptrdiff_t len); @@ -106,7 +103,6 @@ struct lttng_payload_view lttng_payload_view_from_view( * cause the payload view to reference the whole payload from the * offset provided. */ -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_dynamic_buffer( const struct lttng_dynamic_buffer *buffer, size_t offset, ptrdiff_t len); @@ -123,7 +119,6 @@ struct lttng_payload_view lttng_payload_view_from_dynamic_buffer( * cause the payload view to reference the whole payload from the * offset provided. */ -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_from_buffer_view( const struct lttng_buffer_view *view, size_t offset, ptrdiff_t len); @@ -139,7 +134,6 @@ struct lttng_payload_view lttng_payload_view_from_buffer_view( * Note that a payload view never assumes the ownership of the memory it * references. */ -LTTNG_HIDDEN struct lttng_payload_view lttng_payload_view_init_from_buffer( const char *src, size_t offset, ptrdiff_t len); @@ -150,7 +144,6 @@ struct lttng_payload_view lttng_payload_view_init_from_buffer( * * Returns the number of file descriptor handles left on success, -1 on error. */ -LTTNG_HIDDEN int lttng_payload_view_get_fd_handle_count( const struct lttng_payload_view *payload_view); @@ -163,7 +156,6 @@ int lttng_payload_view_get_fd_handle_count( * * Returns an fd_handle on success, -1 on error. */ -LTTNG_HIDDEN struct fd_handle *lttng_payload_view_pop_fd_handle( struct lttng_payload_view *payload_view); diff --git a/src/common/payload.c b/src/common/payload.c index 1a02754bb..f26585bb9 100644 --- a/src/common/payload.c +++ b/src/common/payload.c @@ -18,7 +18,6 @@ void release_fd_handle_ref(void *ptr) fd_handle_put(fd_handle); } -LTTNG_HIDDEN void lttng_payload_init(struct lttng_payload *payload) { LTTNG_ASSERT(payload); @@ -27,7 +26,6 @@ void lttng_payload_init(struct lttng_payload *payload) release_fd_handle_ref); } -LTTNG_HIDDEN int lttng_payload_copy(const struct lttng_payload *src_payload, struct lttng_payload *dst_payload) { @@ -66,7 +64,6 @@ end: return ret; } -LTTNG_HIDDEN void lttng_payload_reset(struct lttng_payload *payload) { if (!payload) { @@ -77,14 +74,12 @@ void lttng_payload_reset(struct lttng_payload *payload) lttng_dynamic_pointer_array_reset(&payload->_fd_handles); } -LTTNG_HIDDEN void lttng_payload_clear(struct lttng_payload *payload) { (void) lttng_dynamic_buffer_set_size(&payload->buffer, 0); lttng_dynamic_pointer_array_clear(&payload->_fd_handles); } -LTTNG_HIDDEN int lttng_payload_push_fd_handle(struct lttng_payload *payload, struct fd_handle *fd_handle) { diff --git a/src/common/payload.h b/src/common/payload.h index a8f66f36b..d6c0cc19e 100644 --- a/src/common/payload.h +++ b/src/common/payload.h @@ -27,16 +27,13 @@ struct lttng_payload { * Initialize a payload. This performs no allocation and is meant * to be used instead of zero-ing the payload structure. */ -LTTNG_HIDDEN void lttng_payload_init(struct lttng_payload *payload); /* Copy a payload. */ -LTTNG_HIDDEN int lttng_payload_copy(const struct lttng_payload *src_payload, struct lttng_payload *dst_payload); /* Release any memory and references held by the payload. */ -LTTNG_HIDDEN void lttng_payload_reset(struct lttng_payload *payload); /* @@ -46,7 +43,6 @@ void lttng_payload_reset(struct lttng_payload *payload); * lttng_payload_reset must still be called on an lttng_payload to * free all allocated memory. */ -LTTNG_HIDDEN void lttng_payload_clear(struct lttng_payload *payload); /** @@ -58,7 +54,6 @@ void lttng_payload_clear(struct lttng_payload *payload); * * Returns 0 on success, -1 on allocation error. */ -LTTNG_HIDDEN int lttng_payload_push_fd_handle(struct lttng_payload *payload, struct fd_handle *fd_handle); diff --git a/src/common/pipe.c b/src/common/pipe.c index e052e6fe0..45be43fa3 100644 --- a/src/common/pipe.c +++ b/src/common/pipe.c @@ -177,7 +177,6 @@ end: * * Return a newly allocated lttng pipe on success or else NULL. */ -LTTNG_HIDDEN struct lttng_pipe *lttng_pipe_open(int flags) { int ret; @@ -214,7 +213,6 @@ error: * * Return a newly allocated lttng pipe on success or else NULL. */ -LTTNG_HIDDEN struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode, int flags) { @@ -265,7 +263,6 @@ error: * * Return 0 on success else a negative value. */ -LTTNG_HIDDEN int lttng_pipe_read_close(struct lttng_pipe *pipe) { int ret; @@ -285,7 +282,6 @@ int lttng_pipe_read_close(struct lttng_pipe *pipe) * * Return 0 on success else a negative value. */ -LTTNG_HIDDEN int lttng_pipe_write_close(struct lttng_pipe *pipe) { int ret; @@ -304,7 +300,6 @@ int lttng_pipe_write_close(struct lttng_pipe *pipe) * * Return 0 on success else a negative value. */ -LTTNG_HIDDEN int lttng_pipe_close(struct lttng_pipe *pipe) { int ret, ret_val = 0; @@ -327,7 +322,6 @@ int lttng_pipe_close(struct lttng_pipe *pipe) /* * Close and destroy a lttng pipe object. Finally, pipe is freed. */ -LTTNG_HIDDEN void lttng_pipe_destroy(struct lttng_pipe *pipe) { int ret; @@ -364,7 +358,6 @@ void lttng_pipe_destroy(struct lttng_pipe *pipe) * Return "count" on success. Return < count on error. errno can be used * to check the actual error. */ -LTTNG_HIDDEN ssize_t lttng_pipe_read(struct lttng_pipe *pipe, void *buf, size_t count) { ssize_t ret; @@ -390,7 +383,6 @@ error: * Return "count" on success. Return < count on error. errno can be used * to check the actual error. */ -LTTNG_HIDDEN ssize_t lttng_pipe_write(struct lttng_pipe *pipe, const void *buf, size_t count) { @@ -420,7 +412,6 @@ error: * Returns the fd of the read end of the pipe, or -1 if it was already closed or * released. */ -LTTNG_HIDDEN int lttng_pipe_release_readfd(struct lttng_pipe *pipe) { int ret; @@ -453,7 +444,6 @@ end: * Returns the fd of the write end of the pipe, or -1 if it was alwritey closed * or released. */ -LTTNG_HIDDEN int lttng_pipe_release_writefd(struct lttng_pipe *pipe) { int ret; diff --git a/src/common/pipe.h b/src/common/pipe.h index d5f1d396f..d9f43d66e 100644 --- a/src/common/pipe.h +++ b/src/common/pipe.h @@ -64,31 +64,21 @@ static inline int lttng_pipe_get_writefd(const struct lttng_pipe *pipe) return pipe->fd[1]; } -LTTNG_HIDDEN struct lttng_pipe *lttng_pipe_open(int flags); -LTTNG_HIDDEN struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode, int flags); -LTTNG_HIDDEN int lttng_pipe_write_close(struct lttng_pipe *pipe); -LTTNG_HIDDEN int lttng_pipe_read_close(struct lttng_pipe *pipe); /* Close both side of pipe. */ -LTTNG_HIDDEN int lttng_pipe_close(struct lttng_pipe *pipe); -LTTNG_HIDDEN void lttng_pipe_destroy(struct lttng_pipe *pipe); -LTTNG_HIDDEN ssize_t lttng_pipe_read(struct lttng_pipe *pipe, void *buf, size_t count); -LTTNG_HIDDEN ssize_t lttng_pipe_write(struct lttng_pipe *pipe, const void *buf, size_t count); /* Returns and releases the read end of the pipe. */ -LTTNG_HIDDEN int lttng_pipe_release_readfd(struct lttng_pipe *pipe); /* Returns and releases the write end of the pipe. */ -LTTNG_HIDDEN int lttng_pipe_release_writefd(struct lttng_pipe *pipe); #endif /* LTTNG_PIPE_H */ diff --git a/src/common/readwrite.c b/src/common/readwrite.c index be42b5326..14ec171f9 100644 --- a/src/common/readwrite.c +++ b/src/common/readwrite.c @@ -21,7 +21,6 @@ * error occurred. * The error can be checked by querying errno. */ -LTTNG_HIDDEN ssize_t lttng_read(int fd, void *buf, size_t count) { size_t i = 0; @@ -59,7 +58,6 @@ error: } } -LTTNG_HIDDEN ssize_t lttng_write(int fd, const void *buf, size_t count) { size_t i = 0; diff --git a/src/common/readwrite.h b/src/common/readwrite.h index b27d03eb0..ac3668a5a 100644 --- a/src/common/readwrite.h +++ b/src/common/readwrite.h @@ -19,9 +19,7 @@ * error occurred. * The error can be checked by querying errno. */ -LTTNG_HIDDEN ssize_t lttng_read(int fd, void *buf, size_t count); -LTTNG_HIDDEN ssize_t lttng_write(int fd, const void *buf, size_t count); #endif /* LTTNG_COMMON_READWRITE_H */ diff --git a/src/common/runas.c b/src/common/runas.c index 4bb45b045..930c973ff 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -1668,13 +1668,11 @@ err: return ret; } -LTTNG_HIDDEN int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid) { return run_as_mkdirat_recursive(AT_FDCWD, path, mode, uid, gid); } -LTTNG_HIDDEN int run_as_mkdirat_recursive(int dirfd, const char *path, mode_t mode, uid_t uid, gid_t gid) { @@ -1702,13 +1700,11 @@ error: return ret; } -LTTNG_HIDDEN int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid) { return run_as_mkdirat(AT_FDCWD, path, mode, uid, gid); } -LTTNG_HIDDEN int run_as_mkdirat(int dirfd, const char *path, mode_t mode, uid_t uid, gid_t gid) { @@ -1736,14 +1732,12 @@ error: return ret; } -LTTNG_HIDDEN int run_as_open(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid) { return run_as_openat(AT_FDCWD, path, flags, mode, uid, gid); } -LTTNG_HIDDEN int run_as_openat(int dirfd, const char *path, int flags, mode_t mode, uid_t uid, gid_t gid) { @@ -1771,13 +1765,11 @@ error: return ret; } -LTTNG_HIDDEN int run_as_unlink(const char *path, uid_t uid, gid_t gid) { return run_as_unlinkat(AT_FDCWD, path, uid, gid); } -LTTNG_HIDDEN int run_as_unlinkat(int dirfd, const char *path, uid_t uid, gid_t gid) { int ret; @@ -1801,13 +1793,11 @@ error: return ret; } -LTTNG_HIDDEN int run_as_rmdir(const char *path, uid_t uid, gid_t gid) { return run_as_rmdirat(AT_FDCWD, path, uid, gid); } -LTTNG_HIDDEN int run_as_rmdirat(int dirfd, const char *path, uid_t uid, gid_t gid) { int ret; @@ -1831,13 +1821,11 @@ error: return ret; } -LTTNG_HIDDEN int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid, int flags) { return run_as_rmdirat_recursive(AT_FDCWD, path, uid, gid, flags); } -LTTNG_HIDDEN int run_as_rmdirat_recursive(int dirfd, const char *path, uid_t uid, gid_t gid, int flags) { int ret; @@ -1862,13 +1850,11 @@ error: return ret; } -LTTNG_HIDDEN int run_as_rename(const char *old, const char *new, uid_t uid, gid_t gid) { return run_as_renameat(AT_FDCWD, old, AT_FDCWD, new, uid, gid); } -LTTNG_HIDDEN int run_as_renameat(int old_dirfd, const char *old_name, int new_dirfd, const char *new_name, uid_t uid, gid_t gid) { @@ -1903,7 +1889,6 @@ error: return ret; } -LTTNG_HIDDEN int run_as_extract_elf_symbol_offset(int fd, const char* function, uid_t uid, gid_t gid, uint64_t *offset) { @@ -1938,7 +1923,6 @@ error: return ret; } -LTTNG_HIDDEN int run_as_extract_sdt_probe_offsets(int fd, const char* provider_name, const char* probe_name, uid_t uid, gid_t gid, uint64_t **offsets, uint32_t *num_offset) @@ -1985,7 +1969,6 @@ error: return ret; } -LTTNG_HIDDEN int run_as_generate_filter_bytecode(const char *filter_expression, const struct lttng_credentials *creds, struct lttng_bytecode **bytecode) @@ -2029,7 +2012,6 @@ error: return ret; } -LTTNG_HIDDEN int run_as_create_worker(const char *procname, post_fork_cleanup_cb clean_up_func, void *clean_up_user_data) @@ -2043,7 +2025,6 @@ int run_as_create_worker(const char *procname, return ret; } -LTTNG_HIDDEN void run_as_destroy_worker(void) { pthread_mutex_lock(&worker_lock); diff --git a/src/common/runas.h b/src/common/runas.h index 18a053a05..58c376fe1 100644 --- a/src/common/runas.h +++ b/src/common/runas.h @@ -31,53 +31,34 @@ */ typedef int (*post_fork_cleanup_cb)(void *user_data); -LTTNG_HIDDEN int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_mkdirat_recursive(int dirfd, const char *path, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_mkdirat(int dirfd, const char *path, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_open(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_openat(int dirfd, const char *filename, int flags, mode_t mode, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_unlink(const char *path, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_unlinkat(int dirfd, const char *filename, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_rmdir(const char *path, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid, int flags); -LTTNG_HIDDEN int run_as_rmdirat(int dirfd, const char *path, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_rmdirat_recursive(int dirfd, const char *path, uid_t uid, gid_t gid, int flags); -LTTNG_HIDDEN int run_as_rename(const char *old, const char *new, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_renameat(int old_dirfd, const char *old, int new_dirfd, const char *new, uid_t uid, gid_t gid); -LTTNG_HIDDEN int run_as_extract_elf_symbol_offset(int fd, const char* function, uid_t uid, gid_t gid, uint64_t *offset); -LTTNG_HIDDEN int run_as_extract_sdt_probe_offsets(int fd, const char *provider_name, const char* probe_name, uid_t uid, gid_t gid, uint64_t **offsets, uint32_t *num_offset); -LTTNG_HIDDEN int run_as_generate_filter_bytecode(const char *filter_expression, const struct lttng_credentials *creds, struct lttng_bytecode **bytecode); -LTTNG_HIDDEN int run_as_create_worker(const char *procname, post_fork_cleanup_cb clean_up_func, void *clean_up_user_data); -LTTNG_HIDDEN void run_as_destroy_worker(void); #endif /* _RUNAS_H */ diff --git a/src/common/session-descriptor.c b/src/common/session-descriptor.c index 757a82a5d..93c7dfa47 100644 --- a/src/common/session-descriptor.c +++ b/src/common/session-descriptor.c @@ -597,7 +597,6 @@ void lttng_session_descriptor_destroy( free(descriptor); } -LTTNG_HIDDEN ssize_t lttng_session_descriptor_create_from_buffer( const struct lttng_buffer_view *payload, struct lttng_session_descriptor **descriptor) @@ -802,7 +801,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_session_descriptor_serialize( const struct lttng_session_descriptor *descriptor, struct lttng_dynamic_buffer *buffer) @@ -875,7 +873,6 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_session_descriptor_type lttng_session_descriptor_get_type( const struct lttng_session_descriptor *descriptor) @@ -883,7 +880,6 @@ lttng_session_descriptor_get_type( return descriptor->type; } -LTTNG_HIDDEN enum lttng_session_descriptor_output_type lttng_session_descriptor_get_output_type( const struct lttng_session_descriptor *descriptor) @@ -891,7 +887,6 @@ lttng_session_descriptor_get_output_type( return descriptor->output_type; } -LTTNG_HIDDEN void lttng_session_descriptor_get_local_output_uri( const struct lttng_session_descriptor *descriptor, struct lttng_uri *local_uri) @@ -899,7 +894,6 @@ void lttng_session_descriptor_get_local_output_uri( memcpy(local_uri, descriptor->output.local, sizeof(*local_uri)); } -LTTNG_HIDDEN void lttng_session_descriptor_get_network_output_uris( const struct lttng_session_descriptor *descriptor, struct lttng_uri *control, @@ -909,7 +903,6 @@ void lttng_session_descriptor_get_network_output_uris( memcpy(data, descriptor->output.network.data, sizeof(*data)); } -LTTNG_HIDDEN unsigned long long lttng_session_descriptor_live_get_timer_interval( const struct lttng_session_descriptor *descriptor) @@ -940,7 +933,6 @@ end: return status; } -LTTNG_HIDDEN int lttng_session_descriptor_set_session_name( struct lttng_session_descriptor *descriptor, const char *name) @@ -966,7 +958,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_session_descriptor_is_output_destination_initialized( const struct lttng_session_descriptor *descriptor) { @@ -982,7 +973,6 @@ bool lttng_session_descriptor_is_output_destination_initialized( } } -LTTNG_HIDDEN bool lttng_session_descriptor_has_output_directory( const struct lttng_session_descriptor *descriptor) { @@ -1005,7 +995,6 @@ bool lttng_session_descriptor_has_output_directory( return false; } -LTTNG_HIDDEN enum lttng_error_code lttng_session_descriptor_set_default_output( struct lttng_session_descriptor *descriptor, time_t *session_creation_time, @@ -1112,7 +1101,6 @@ end: * Note that only properties that can be populated by the session daemon * (output destination and name) are assigned. */ -LTTNG_HIDDEN int lttng_session_descriptor_assign( struct lttng_session_descriptor *dst, const struct lttng_session_descriptor *src) diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c index 15608fd94..357e10b08 100644 --- a/src/common/sessiond-comm/inet.c +++ b/src/common/sessiond-comm/inet.c @@ -43,7 +43,6 @@ unsigned long lttcomm_inet_tcp_timeout; /* * Creates an PF_INET socket. */ -LTTNG_HIDDEN int lttcomm_create_inet_sock(struct lttcomm_sock *sock, int type, int proto) { int val = 1, ret; @@ -86,7 +85,6 @@ error: /* * Bind socket and return. */ -LTTNG_HIDDEN int lttcomm_bind_inet_sock(struct lttcomm_sock *sock) { return bind(sock->fd, @@ -216,7 +214,6 @@ error: /* * Connect PF_INET socket. */ -LTTNG_HIDDEN int lttcomm_connect_inet_sock(struct lttcomm_sock *sock) { int ret, closeret; @@ -246,7 +243,6 @@ error_connect: * Do an accept(2) on the sock and return the new lttcomm socket. The socket * MUST be bind(2) before. */ -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_accept_inet_sock(struct lttcomm_sock *sock) { int new_fd; @@ -310,7 +306,6 @@ error: /* * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN. */ -LTTNG_HIDDEN int lttcomm_listen_inet_sock(struct lttcomm_sock *sock, int backlog) { int ret; @@ -341,7 +336,6 @@ end: * * Return the size of received data. */ -LTTNG_HIDDEN ssize_t lttcomm_recvmsg_inet_sock(struct lttcomm_sock *sock, void *buf, size_t len, int flags) { @@ -398,7 +392,6 @@ end: * * Return the size of sent data. */ -LTTNG_HIDDEN ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, const void *buf, size_t len, int flags) { @@ -445,7 +438,6 @@ ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, const void *buf, /* * Shutdown cleanly and close. */ -LTTNG_HIDDEN int lttcomm_close_inet_sock(struct lttcomm_sock *sock) { int ret; @@ -513,7 +505,6 @@ error: return val; } -LTTNG_HIDDEN void lttcomm_inet_init(void) { unsigned long syn_retries, fin_timeout, syn_timeout, env; diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index c9c9a5ae4..f705bc0c0 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -41,7 +41,6 @@ static const struct lttcomm_proto_ops inet6_ops = { /* * Creates an PF_INET socket. */ -LTTNG_HIDDEN int lttcomm_create_inet6_sock(struct lttcomm_sock *sock, int type, int proto) { int val = 1, ret; @@ -84,7 +83,6 @@ error: /* * Bind socket and return. */ -LTTNG_HIDDEN int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock) { return bind(sock->fd, @@ -215,7 +213,6 @@ error: /* * Connect PF_INET socket. */ -LTTNG_HIDDEN int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock) { int ret, closeret; @@ -245,7 +242,6 @@ error_connect: * Do an accept(2) on the sock and return the new lttcomm socket. The socket * MUST be bind(2) before. */ -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_accept_inet6_sock(struct lttcomm_sock *sock) { int new_fd; @@ -289,7 +285,6 @@ error: /* * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN. */ -LTTNG_HIDDEN int lttcomm_listen_inet6_sock(struct lttcomm_sock *sock, int backlog) { int ret; @@ -320,7 +315,6 @@ end: * * Return the size of received data. */ -LTTNG_HIDDEN ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, size_t len, int flags) { @@ -367,7 +361,6 @@ end: * * Return the size of sent data. */ -LTTNG_HIDDEN ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, const void *buf, size_t len, int flags) { @@ -414,7 +407,6 @@ ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, const void *buf, /* * Shutdown cleanly and close. */ -LTTNG_HIDDEN int lttcomm_close_inet6_sock(struct lttcomm_sock *sock) { int ret; diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index ed185b1ea..f3680c139 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -70,7 +70,6 @@ static unsigned long network_timeout; * * These code MUST be negative in other to treat that as an error value. */ -LTTNG_HIDDEN const char *lttcomm_get_readable_code(enum lttcomm_return_code code) { code = -code; @@ -86,7 +85,6 @@ const char *lttcomm_get_readable_code(enum lttcomm_return_code code) * Create socket from an already allocated lttcomm socket structure and init * sockaddr in the lttcomm sock. */ -LTTNG_HIDDEN int lttcomm_create_sock(struct lttcomm_sock *sock) { int ret, _sock_type, _sock_proto, domain; @@ -126,7 +124,6 @@ error: /* * Return allocated lttcomm socket structure. */ -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto) { struct lttcomm_sock *sock; @@ -151,7 +148,6 @@ end: * This is mostly useful when lttcomm_sock are passed between process where the * fd and ops have to be changed within the correct address space. */ -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src) { struct lttcomm_sock *sock; @@ -176,7 +172,6 @@ alloc_error: * This is mostly useful when lttcomm_sock are passed between process where the * fd and ops have to be changed within the correct address space. */ -LTTNG_HIDDEN void lttcomm_copy_sock(struct lttcomm_sock *dst, struct lttcomm_sock *src) { /* Safety net */ @@ -193,7 +188,6 @@ void lttcomm_copy_sock(struct lttcomm_sock *dst, struct lttcomm_sock *src) /* * Init IPv4 sockaddr structure. */ -LTTNG_HIDDEN int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port) { @@ -224,7 +218,6 @@ error: /* * Init IPv6 sockaddr structure. */ -LTTNG_HIDDEN int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port) { @@ -253,7 +246,6 @@ error: /* * Return allocated lttcomm socket structure from lttng URI. */ -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri) { int ret; @@ -306,7 +298,6 @@ alloc_error: /* * Destroy and free lttcomm socket. */ -LTTNG_HIDDEN void lttcomm_destroy_sock(struct lttcomm_sock *sock) { free(sock); @@ -318,7 +309,6 @@ void lttcomm_destroy_sock(struct lttcomm_sock *sock) * * On error, NULL is returned. */ -LTTNG_HIDDEN struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock(struct lttng_uri *uri, uint32_t major, uint32_t minor) { @@ -366,7 +356,6 @@ error: /* * Set socket receiving timeout. */ -LTTNG_HIDDEN int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec) { int ret; @@ -386,7 +375,6 @@ int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec) /* * Set socket sending timeout. */ -LTTNG_HIDDEN int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec) { int ret; @@ -403,7 +391,6 @@ int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec) return ret; } -LTTNG_HIDDEN int lttcomm_sock_get_port(const struct lttcomm_sock *sock, uint16_t *port) { LTTNG_ASSERT(sock); @@ -427,7 +414,6 @@ int lttcomm_sock_get_port(const struct lttcomm_sock *sock, uint16_t *port) return 0; } -LTTNG_HIDDEN int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port) { LTTNG_ASSERT(sock); @@ -450,7 +436,6 @@ int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port) return 0; } -LTTNG_HIDDEN void lttcomm_init(void) { const char *env; @@ -471,7 +456,6 @@ void lttcomm_init(void) } } -LTTNG_HIDDEN unsigned long lttcomm_get_network_timeout(void) { return network_timeout; diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 7b3e0f509..c8e1e1ae1 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -897,38 +897,38 @@ struct lttcomm_ust_reply { #endif /* HAVE_LIBLTTNG_UST_CTL */ -LTTNG_HIDDEN const char *lttcomm_get_readable_code(enum lttcomm_return_code code); +const char *lttcomm_get_readable_code(enum lttcomm_return_code code); -LTTNG_HIDDEN int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr, +int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port); -LTTNG_HIDDEN int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr, +int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port); -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto); -LTTNG_HIDDEN int lttcomm_create_sock(struct lttcomm_sock *sock); -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri); -LTTNG_HIDDEN void lttcomm_destroy_sock(struct lttcomm_sock *sock); -LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src); -LTTNG_HIDDEN void lttcomm_copy_sock(struct lttcomm_sock *dst, +struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto); +int lttcomm_create_sock(struct lttcomm_sock *sock); +struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri); +void lttcomm_destroy_sock(struct lttcomm_sock *sock); +struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src); +void lttcomm_copy_sock(struct lttcomm_sock *dst, struct lttcomm_sock *src); /* Relayd socket object. */ -LTTNG_HIDDEN struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock( +struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock( struct lttng_uri *uri, uint32_t major, uint32_t minor); -LTTNG_HIDDEN int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec); -LTTNG_HIDDEN int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec); +int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec); +int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec); -LTTNG_HIDDEN int lttcomm_sock_get_port(const struct lttcomm_sock *sock, +int lttcomm_sock_get_port(const struct lttcomm_sock *sock, uint16_t *port); /* * Set a port to an lttcomm_sock. This will have no effect is the socket is * already bound. */ -LTTNG_HIDDEN int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port); +int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port); -LTTNG_HIDDEN void lttcomm_init(void); +void lttcomm_init(void); /* Get network timeout, in milliseconds */ -LTTNG_HIDDEN unsigned long lttcomm_get_network_timeout(void); +unsigned long lttcomm_get_network_timeout(void); #endif /* _LTTNG_SESSIOND_COMM_H */ diff --git a/src/common/shm.c b/src/common/shm.c index 24a183db3..c006258c7 100644 --- a/src/common/shm.c +++ b/src/common/shm.c @@ -156,7 +156,6 @@ error: * This returned value is used by futex_wait_update() in futex.c to WAKE all * waiters which are UST application waiting for a session daemon. */ -LTTNG_HIDDEN char *shm_ust_get_mmap(char *shm_path, int global) { size_t mmap_size; @@ -203,7 +202,6 @@ error: /* * shm_create_anonymous is never called concurrently within a process. */ -LTTNG_HIDDEN int shm_create_anonymous(const char *owner_name) { char tmp_name[NAME_MAX]; diff --git a/src/common/shm.h b/src/common/shm.h index 0798fabce..d714506b8 100644 --- a/src/common/shm.h +++ b/src/common/shm.h @@ -9,10 +9,8 @@ #ifndef _LTT_SHM_H #define _LTT_SHM_H -LTTNG_HIDDEN char *shm_ust_get_mmap(char *shm_path, int global); -LTTNG_HIDDEN int shm_create_anonymous(const char *owner_name); #endif /* _LTT_SHM_H */ diff --git a/src/common/snapshot.c b/src/common/snapshot.c index 51871f785..960240b2c 100644 --- a/src/common/snapshot.c +++ b/src/common/snapshot.c @@ -15,7 +15,6 @@ #include -LTTNG_HIDDEN bool lttng_snapshot_output_validate(const struct lttng_snapshot_output *output) { bool valid = false; @@ -47,7 +46,6 @@ end: return valid; } -LTTNG_HIDDEN bool lttng_snapshot_output_is_equal( const struct lttng_snapshot_output *a, const struct lttng_snapshot_output *b) @@ -90,7 +88,6 @@ struct lttng_snapshot_output_comm { char data_url[PATH_MAX]; } LTTNG_PACKED; -LTTNG_HIDDEN int lttng_snapshot_output_serialize( const struct lttng_snapshot_output *output, struct lttng_payload *payload) @@ -128,7 +125,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_snapshot_output_create_from_payload( struct lttng_payload_view *view, struct lttng_snapshot_output **output_p) @@ -179,7 +175,6 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_error_code lttng_snapshot_output_mi_serialize( const struct lttng_snapshot_output *output, struct mi_writer *writer) diff --git a/src/common/snapshot.h b/src/common/snapshot.h index 3edcf16ae..7395c04d1 100644 --- a/src/common/snapshot.h +++ b/src/common/snapshot.h @@ -18,25 +18,20 @@ struct lttng_payload; struct lttng_snapshot_output; struct mi_writer; -LTTNG_HIDDEN bool lttng_snapshot_output_validate(const struct lttng_snapshot_output *output); -LTTNG_HIDDEN bool lttng_snapshot_output_is_equal( const struct lttng_snapshot_output *a, const struct lttng_snapshot_output *b); -LTTNG_HIDDEN int lttng_snapshot_output_serialize( const struct lttng_snapshot_output *output, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttng_snapshot_output_create_from_payload( struct lttng_payload_view *view, struct lttng_snapshot_output **output_p); -LTTNG_HIDDEN enum lttng_error_code lttng_snapshot_output_mi_serialize( const struct lttng_snapshot_output *output, struct mi_writer *writer); diff --git a/src/common/string-utils/string-utils.c b/src/common/string-utils/string-utils.c index 55399a115..1bf0cc060 100644 --- a/src/common/string-utils/string-utils.c +++ b/src/common/string-utils/string-utils.c @@ -23,7 +23,6 @@ enum star_glob_pattern_type_flags { * Normalizes the star-only globbing pattern `pattern`, that is, crushes * consecutive `*` characters into a single `*`, avoiding `\*`. */ -LTTNG_HIDDEN void strutils_normalize_star_glob_pattern(char *pattern) { const char *p; @@ -106,7 +105,6 @@ end: * Returns true if `pattern` is a star-only globbing pattern, that is, * it contains at least one non-escaped `*`. */ -LTTNG_HIDDEN bool strutils_is_star_glob_pattern(const char *pattern) { return strutils_test_glob_pattern(pattern) & @@ -117,7 +115,6 @@ bool strutils_is_star_glob_pattern(const char *pattern) * Returns true if `pattern` is a globbing pattern with a globbing, * non-escaped star only at its very end. */ -LTTNG_HIDDEN bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern) { return strutils_test_glob_pattern(pattern) & @@ -129,7 +126,6 @@ bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern) * removes `\`. If `only_char` is not 0, only this character is * escaped. */ -LTTNG_HIDDEN char *strutils_unescape_string(const char *input, char only_char) { char *output; @@ -174,7 +170,6 @@ end: * Frees a null-terminated array of strings, including each contained * string. */ -LTTNG_HIDDEN void strutils_free_null_terminated_array_of_strings(char **array) { char **item; @@ -240,7 +235,6 @@ void strutils_free_null_terminated_array_of_strings(char **array) * * Returns -1 if there's an error. */ -LTTNG_HIDDEN int strutils_split(const char *input, char delim, bool escape_delim, @@ -355,7 +349,6 @@ end: return ret; } -LTTNG_HIDDEN size_t strutils_array_of_strings_len(char * const *array) { char * const *item; diff --git a/src/common/string-utils/string-utils.h b/src/common/string-utils/string-utils.h index 9d287f3d9..1cf31e9d4 100644 --- a/src/common/string-utils/string-utils.h +++ b/src/common/string-utils/string-utils.h @@ -12,26 +12,19 @@ #include #include -LTTNG_HIDDEN void strutils_normalize_star_glob_pattern(char *pattern); -LTTNG_HIDDEN bool strutils_is_star_glob_pattern(const char *pattern); -LTTNG_HIDDEN bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); -LTTNG_HIDDEN char *strutils_unescape_string(const char *input, char only_char); -LTTNG_HIDDEN int strutils_split(const char *input, char delim, bool escape_delim, struct lttng_dynamic_pointer_array *out_strings); -LTTNG_HIDDEN void strutils_free_null_terminated_array_of_strings(char **array); -LTTNG_HIDDEN size_t strutils_array_of_strings_len(char * const *array); #endif /* _STRING_UTILS_H */ diff --git a/src/common/thread.h b/src/common/thread.h index b73172269..3caa9dd99 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -15,7 +15,6 @@ * be of arbitrary length and will be truncated to the platform limit, * usually 16. */ -LTTNG_HIDDEN int lttng_thread_setname(const char *name); #endif /* LTTNG_THREAD_H */ diff --git a/src/common/time.c b/src/common/time.c index 90ce4d4b6..ccb587474 100644 --- a/src/common/time.c +++ b/src/common/time.c @@ -19,13 +19,11 @@ static bool utf8_output_supported; -LTTNG_HIDDEN bool locale_supports_utf8(void) { return utf8_output_supported; } -LTTNG_HIDDEN int timespec_to_ms(struct timespec ts, unsigned long *ms) { unsigned long res, remain_ms; @@ -45,7 +43,6 @@ int timespec_to_ms(struct timespec ts, unsigned long *ms) return 0; } -LTTNG_HIDDEN struct timespec timespec_abs_diff(struct timespec t1, struct timespec t2) { uint64_t ts1 = (uint64_t) t1.tv_sec * (uint64_t) NSEC_PER_SEC + @@ -73,7 +70,6 @@ void __attribute__((constructor)) init_locale_utf8_support(void) } } -LTTNG_HIDDEN int time_to_iso8601_str(time_t time, char *str, size_t len) { int ret = 0; @@ -105,7 +101,6 @@ end: return ret; } -LTTNG_HIDDEN int time_to_datetime_str(time_t time, char *str, size_t len) { int ret = 0; diff --git a/src/common/time.h b/src/common/time.h index b07adc85b..87adf17d7 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -29,7 +29,6 @@ #define ISO8601_STR_LEN sizeof("YYYYmmddTHHMMSS+HHMM") #define DATETIME_STR_LEN sizeof("YYYYmmdd-HHMMSS") -LTTNG_HIDDEN bool locale_supports_utf8(void); #define NSEC_UNIT "ns" @@ -45,13 +44,11 @@ bool locale_supports_utf8(void); * Returns 0 on success, else -1 on error. errno is set to EOVERFLOW if * input would overflow the output in milliseconds. */ -LTTNG_HIDDEN int timespec_to_ms(struct timespec ts, unsigned long *ms); /* * timespec_abs_diff: Absolute difference between timespec. */ -LTTNG_HIDDEN struct timespec timespec_abs_diff(struct timespec ts_a, struct timespec ts_b); /* @@ -61,10 +58,8 @@ struct timespec timespec_abs_diff(struct timespec ts_a, struct timespec ts_b); * * Returns 0 on success, else -1 on error. */ -LTTNG_HIDDEN int time_to_iso8601_str(time_t time, char *str, size_t len); -LTTNG_HIDDEN int time_to_datetime_str(time_t time, char *str, size_t len); #endif /* LTTNG_TIME_H */ diff --git a/src/common/trace-chunk-registry.h b/src/common/trace-chunk-registry.h index 00dd7fcf0..0eee0c21c 100644 --- a/src/common/trace-chunk-registry.h +++ b/src/common/trace-chunk-registry.h @@ -31,7 +31,6 @@ struct lttng_trace_chunk_registry; * * Note that a trace chunk registry may only be accessed by an RCU thread. */ -LTTNG_HIDDEN struct lttng_trace_chunk_registry *lttng_trace_chunk_registry_create(void); /* @@ -39,7 +38,6 @@ struct lttng_trace_chunk_registry *lttng_trace_chunk_registry_create(void); * (i.e. all references to the trace chunks it contains must be released) before * it is destroyed. */ -LTTNG_HIDDEN void lttng_trace_chunk_registry_destroy( struct lttng_trace_chunk_registry *registry); @@ -56,7 +54,6 @@ void lttng_trace_chunk_registry_destroy( * * Returns an lttng_trace_chunk on success, NULL on error. */ -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_registry_publish_chunk( struct lttng_trace_chunk_registry *registry, uint64_t session_id, struct lttng_trace_chunk *chunk); @@ -67,7 +64,6 @@ struct lttng_trace_chunk *lttng_trace_chunk_registry_publish_chunk( * * Returns an lttng_trace_chunk on success, NULL if the chunk does not exist. */ -LTTNG_HIDDEN struct lttng_trace_chunk * lttng_trace_chunk_registry_find_chunk( const struct lttng_trace_chunk_registry *registry, @@ -78,7 +74,6 @@ lttng_trace_chunk_registry_find_chunk( * * Returns 0 on success, a negative value on error. */ -LTTNG_HIDDEN int lttng_trace_chunk_registry_chunk_exists( const struct lttng_trace_chunk_registry *registry, uint64_t session_id, uint64_t chunk_id, bool *chunk_exists); @@ -89,13 +84,11 @@ int lttng_trace_chunk_registry_chunk_exists( * * Returns an lttng_trace_chunk on success, NULL if the chunk does not exist. */ -LTTNG_HIDDEN struct lttng_trace_chunk * lttng_trace_chunk_registry_find_anonymous_chunk( const struct lttng_trace_chunk_registry *registry, uint64_t session_id); -LTTNG_HIDDEN unsigned int lttng_trace_chunk_registry_put_each_chunk( const struct lttng_trace_chunk_registry *registry); diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 672ebded2..4bc3dbae0 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -394,14 +394,12 @@ end: return chunk; } -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_create_anonymous(void) { DBG("Creating anonymous trace chunk"); return lttng_trace_chunk_allocate(); } -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_create( uint64_t chunk_id, time_t chunk_creation_time, const char *path) { @@ -463,7 +461,6 @@ error: return NULL; } -LTTNG_HIDDEN void lttng_trace_chunk_set_fd_tracker(struct lttng_trace_chunk *chunk, struct fd_tracker *fd_tracker) { @@ -473,7 +470,6 @@ void lttng_trace_chunk_set_fd_tracker(struct lttng_trace_chunk *chunk, chunk->fd_tracker = fd_tracker; } -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_copy( struct lttng_trace_chunk *source_chunk) { @@ -544,7 +540,6 @@ error_unlock: return NULL; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_id( struct lttng_trace_chunk *chunk, uint64_t *id) { @@ -560,7 +555,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_get_id( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_creation_timestamp( struct lttng_trace_chunk *chunk, time_t *creation_ts) @@ -577,7 +571,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_get_creation_timestamp( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_close_timestamp( struct lttng_trace_chunk *chunk, time_t *close_ts) { @@ -593,7 +586,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_get_close_timestamp( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_close_timestamp( struct lttng_trace_chunk *chunk, time_t close_ts) { @@ -634,7 +626,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_name( struct lttng_trace_chunk *chunk, const char **name, bool *name_overridden) @@ -655,7 +646,6 @@ end: return status; } -LTTNG_HIDDEN bool lttng_trace_chunk_get_name_overridden(struct lttng_trace_chunk *chunk) { bool name_overridden; @@ -687,7 +677,6 @@ bool is_valid_chunk_name(const char *name) return true; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_override_name( struct lttng_trace_chunk *chunk, const char *name) @@ -942,7 +931,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_rename_path( struct lttng_trace_chunk *chunk, const char *path) @@ -956,7 +944,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_rename_path( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_credentials( struct lttng_trace_chunk *chunk, struct lttng_credentials *credentials) @@ -978,7 +965,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_get_credentials( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_credentials( struct lttng_trace_chunk *chunk, const struct lttng_credentials *user_credentials) @@ -1000,7 +986,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_credentials_current_user( struct lttng_trace_chunk *chunk) { @@ -1021,7 +1006,6 @@ end: } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_as_owner( struct lttng_trace_chunk *chunk, struct lttng_directory_handle *session_output_directory) @@ -1095,7 +1079,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_as_user( struct lttng_trace_chunk *chunk, struct lttng_directory_handle *chunk_directory) @@ -1122,7 +1105,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_session_output_directory_handle( struct lttng_trace_chunk *chunk, @@ -1147,7 +1129,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_borrow_chunk_directory_handle( struct lttng_trace_chunk *chunk, const struct lttng_directory_handle **handle) @@ -1215,7 +1196,6 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_create_subdirectory( struct lttng_trace_chunk *chunk, const char *path) @@ -1417,7 +1397,6 @@ end: return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle( struct lttng_trace_chunk *chunk, const char *file_path, @@ -1435,7 +1414,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_open_file( struct lttng_trace_chunk *chunk, const char *file_path, @@ -1469,7 +1447,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_file( return status; } -LTTNG_HIDDEN int lttng_trace_chunk_unlink_file(struct lttng_trace_chunk *chunk, const char *file_path) { @@ -1757,7 +1734,6 @@ int lttng_trace_chunk_delete_post_release( } } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_close_command( struct lttng_trace_chunk *chunk, enum lttng_trace_chunk_command_type *command_type) @@ -1775,7 +1751,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_get_close_command( return status; } -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_close_command( struct lttng_trace_chunk *chunk, enum lttng_trace_chunk_command_type close_command) @@ -1811,7 +1786,6 @@ end: return status; } -LTTNG_HIDDEN const char *lttng_trace_chunk_command_type_get_name( enum lttng_trace_chunk_command_type command) { @@ -1827,7 +1801,6 @@ const char *lttng_trace_chunk_command_type_get_name( } } -LTTNG_HIDDEN bool lttng_trace_chunk_ids_equal(const struct lttng_trace_chunk *chunk_a, const struct lttng_trace_chunk *chunk_b) { @@ -1858,7 +1831,6 @@ end: return equal; } -LTTNG_HIDDEN bool lttng_trace_chunk_get(struct lttng_trace_chunk *chunk) { return urcu_ref_get_unless_zero(&chunk->ref); @@ -1911,7 +1883,6 @@ void lttng_trace_chunk_release(struct urcu_ref *ref) } } -LTTNG_HIDDEN void lttng_trace_chunk_put(struct lttng_trace_chunk *chunk) { if (!chunk) { @@ -1921,7 +1892,6 @@ void lttng_trace_chunk_put(struct lttng_trace_chunk *chunk) urcu_ref_put(&chunk->ref, lttng_trace_chunk_release); } -LTTNG_HIDDEN struct lttng_trace_chunk_registry *lttng_trace_chunk_registry_create(void) { struct lttng_trace_chunk_registry *registry; @@ -1943,7 +1913,6 @@ error: return NULL; } -LTTNG_HIDDEN void lttng_trace_chunk_registry_destroy( struct lttng_trace_chunk_registry *registry) { @@ -1996,7 +1965,6 @@ end: return element; } -LTTNG_HIDDEN struct lttng_trace_chunk * lttng_trace_chunk_registry_publish_chunk( struct lttng_trace_chunk_registry *registry, @@ -2123,7 +2091,6 @@ end: return published_chunk; } -LTTNG_HIDDEN struct lttng_trace_chunk * lttng_trace_chunk_registry_find_chunk( const struct lttng_trace_chunk_registry *registry, @@ -2133,7 +2100,6 @@ lttng_trace_chunk_registry_find_chunk( session_id, &chunk_id); } -LTTNG_HIDDEN int lttng_trace_chunk_registry_chunk_exists( const struct lttng_trace_chunk_registry *registry, uint64_t session_id, uint64_t chunk_id, bool *chunk_exists) @@ -2168,7 +2134,6 @@ end: return ret; } -LTTNG_HIDDEN struct lttng_trace_chunk * lttng_trace_chunk_registry_find_anonymous_chunk( const struct lttng_trace_chunk_registry *registry, @@ -2178,7 +2143,6 @@ lttng_trace_chunk_registry_find_anonymous_chunk( session_id, NULL); } -LTTNG_HIDDEN unsigned int lttng_trace_chunk_registry_put_each_chunk( const struct lttng_trace_chunk_registry *registry) { diff --git a/src/common/trace-chunk.h b/src/common/trace-chunk.h index 4ab0b11c5..4e4440b6a 100644 --- a/src/common/trace-chunk.h +++ b/src/common/trace-chunk.h @@ -70,16 +70,13 @@ enum lttng_trace_chunk_command_type { LTTNG_TRACE_CHUNK_COMMAND_TYPE_MAX, }; -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_create_anonymous(void); -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_create( uint64_t chunk_id, time_t chunk_creation_time, const char *path); -LTTNG_HIDDEN void lttng_trace_chunk_set_fd_tracker(struct lttng_trace_chunk *chunk, struct fd_tracker *fd_tracker); @@ -88,83 +85,65 @@ void lttng_trace_chunk_set_fd_tracker(struct lttng_trace_chunk *chunk, * mode chunk even if the source chunk was an _owner_ as there can never be * two _owners_ of the same trace output. */ -LTTNG_HIDDEN struct lttng_trace_chunk *lttng_trace_chunk_copy( struct lttng_trace_chunk *source_chunk); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_id( struct lttng_trace_chunk *chunk, uint64_t *id); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_creation_timestamp( struct lttng_trace_chunk *chunk, time_t *creation_ts); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_close_timestamp( struct lttng_trace_chunk *chunk, time_t *close_ts); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_close_timestamp( struct lttng_trace_chunk *chunk, time_t close_ts); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_name( struct lttng_trace_chunk *chunk, const char **name, bool *name_overridden); -LTTNG_HIDDEN bool lttng_trace_chunk_get_name_overridden(struct lttng_trace_chunk *chunk); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_override_name( struct lttng_trace_chunk *chunk, const char *name); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_rename_path( struct lttng_trace_chunk *chunk, const char *path); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_credentials( struct lttng_trace_chunk *chunk, struct lttng_credentials *credentials); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_credentials( struct lttng_trace_chunk *chunk, const struct lttng_credentials *credentials); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_credentials_current_user( struct lttng_trace_chunk *chunk); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_as_owner( struct lttng_trace_chunk *chunk, struct lttng_directory_handle *session_output_directory); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_as_user( struct lttng_trace_chunk *chunk, struct lttng_directory_handle *chunk_directory); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_session_output_directory_handle( struct lttng_trace_chunk *chunk, struct lttng_directory_handle **handle); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_borrow_chunk_directory_handle( struct lttng_trace_chunk *chunk, const struct lttng_directory_handle **handle); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_create_subdirectory( struct lttng_trace_chunk *chunk, const char *subdirectory_path); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_open_file( struct lttng_trace_chunk *chunk, const char *filename, @@ -173,7 +152,6 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_file( int *out_fd, bool expect_no_file); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle( struct lttng_trace_chunk *chunk, const char *filename, @@ -182,33 +160,26 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle( struct fs_handle **out_handle, bool expect_no_file); -LTTNG_HIDDEN int lttng_trace_chunk_unlink_file(struct lttng_trace_chunk *chunk, const char *filename); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_get_close_command( struct lttng_trace_chunk *chunk, enum lttng_trace_chunk_command_type *command_type); -LTTNG_HIDDEN enum lttng_trace_chunk_status lttng_trace_chunk_set_close_command( struct lttng_trace_chunk *chunk, enum lttng_trace_chunk_command_type command_type); -LTTNG_HIDDEN const char *lttng_trace_chunk_command_type_get_name( enum lttng_trace_chunk_command_type command); -LTTNG_HIDDEN bool lttng_trace_chunk_ids_equal(const struct lttng_trace_chunk *chunk_a, const struct lttng_trace_chunk *chunk_b); /* Returns true on success. */ -LTTNG_HIDDEN bool lttng_trace_chunk_get(struct lttng_trace_chunk *chunk); -LTTNG_HIDDEN void lttng_trace_chunk_put(struct lttng_trace_chunk *chunk); #endif /* LTTNG_TRACE_CHUNK_H */ diff --git a/src/common/tracker.c b/src/common/tracker.c index 1c50d9d79..f3a9f258b 100644 --- a/src/common/tracker.c +++ b/src/common/tracker.c @@ -59,7 +59,6 @@ static inline bool is_value_type_name( value_type == LTTNG_PROCESS_ATTR_VALUE_TYPE_GROUP_NAME; } -LTTNG_HIDDEN enum lttng_error_code process_attr_value_from_comm( enum lttng_domain_type domain, enum lttng_process_attr process_attr, @@ -184,7 +183,6 @@ error: return ret; } -LTTNG_HIDDEN const char *lttng_process_attr_to_string(enum lttng_process_attr process_attr) { switch (process_attr) { @@ -212,7 +210,6 @@ static void process_attr_tracker_value_destructor(void *ptr) process_attr_value_destroy(value); } -LTTNG_HIDDEN struct lttng_process_attr_values *lttng_process_attr_values_create(void) { struct lttng_process_attr_values *values = zmalloc(sizeof(*values)); @@ -227,7 +224,6 @@ end: return values; } -LTTNG_HIDDEN unsigned int _lttng_process_attr_values_get_count( const struct lttng_process_attr_values *values) { @@ -235,7 +231,6 @@ unsigned int _lttng_process_attr_values_get_count( &values->array); } -LTTNG_HIDDEN const struct process_attr_value *lttng_process_attr_tracker_values_get_at_index( const struct lttng_process_attr_values *values, unsigned int index) @@ -294,7 +289,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_process_attr_values_serialize( const struct lttng_process_attr_values *values, struct lttng_dynamic_buffer *buffer) @@ -325,7 +319,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_process_attr_values_create_from_buffer( enum lttng_domain_type domain, enum lttng_process_attr process_attr, @@ -412,7 +405,6 @@ error: return -1; } -LTTNG_HIDDEN void lttng_process_attr_values_destroy(struct lttng_process_attr_values *values) { if (!values) { @@ -422,7 +414,6 @@ void lttng_process_attr_values_destroy(struct lttng_process_attr_values *values) free(values); } -LTTNG_HIDDEN struct process_attr_value *process_attr_value_copy( const struct process_attr_value *value) { @@ -460,7 +451,6 @@ error: return NULL; } -LTTNG_HIDDEN unsigned long process_attr_value_hash(const struct process_attr_value *a) { unsigned long hash = hash_key_ulong((void *) a->type, lttng_ht_seed); @@ -491,7 +481,6 @@ unsigned long process_attr_value_hash(const struct process_attr_value *a) return hash; } -LTTNG_HIDDEN bool process_attr_tracker_value_equal(const struct process_attr_value *a, const struct process_attr_value *b) { @@ -514,7 +503,6 @@ bool process_attr_tracker_value_equal(const struct process_attr_value *a, } } -LTTNG_HIDDEN void process_attr_value_destroy(struct process_attr_value *value) { if (!value) { diff --git a/src/common/tracker.h b/src/common/tracker.h index 933c5beeb..8b3794049 100644 --- a/src/common/tracker.h +++ b/src/common/tracker.h @@ -33,53 +33,41 @@ struct lttng_process_attr_values { struct lttng_dynamic_pointer_array array; }; -LTTNG_HIDDEN const char *lttng_process_attr_to_string(enum lttng_process_attr process_attr); -LTTNG_HIDDEN struct lttng_process_attr_values *lttng_process_attr_values_create(void); /* Prefixed with '_' since the name conflicts with a public API. */ -LTTNG_HIDDEN unsigned int _lttng_process_attr_values_get_count( const struct lttng_process_attr_values *values); -LTTNG_HIDDEN const struct process_attr_value *lttng_process_attr_tracker_values_get_at_index( const struct lttng_process_attr_values *values, unsigned int index); -LTTNG_HIDDEN int lttng_process_attr_values_serialize( const struct lttng_process_attr_values *values, struct lttng_dynamic_buffer *buffer); -LTTNG_HIDDEN ssize_t lttng_process_attr_values_create_from_buffer( enum lttng_domain_type domain, enum lttng_process_attr process_attr, const struct lttng_buffer_view *buffer_view, struct lttng_process_attr_values **_values); -LTTNG_HIDDEN void lttng_process_attr_values_destroy( struct lttng_process_attr_values *values); -LTTNG_HIDDEN struct process_attr_value *process_attr_value_copy( const struct process_attr_value *value); -LTTNG_HIDDEN unsigned long process_attr_value_hash(const struct process_attr_value *a); -LTTNG_HIDDEN bool process_attr_tracker_value_equal(const struct process_attr_value *a, const struct process_attr_value *b); -LTTNG_HIDDEN void process_attr_value_destroy(struct process_attr_value *value); -LTTNG_HIDDEN enum lttng_error_code process_attr_value_from_comm( enum lttng_domain_type domain, enum lttng_process_attr process_attr, diff --git a/src/common/trigger.c b/src/common/trigger.c index 0afea92fc..76082a085 100644 --- a/src/common/trigger.c +++ b/src/common/trigger.c @@ -25,7 +25,6 @@ #include #include -LTTNG_HIDDEN bool lttng_trigger_validate(const struct lttng_trigger *trigger) { bool valid; @@ -136,7 +135,6 @@ void lttng_trigger_destroy(struct lttng_trigger *trigger) lttng_trigger_put(trigger); } -LTTNG_HIDDEN ssize_t lttng_trigger_create_from_payload( struct lttng_payload_view *src_view, struct lttng_trigger **_trigger) @@ -287,7 +285,6 @@ end: * Both elements are stored contiguously, see their "*_comm" structure * for the detailed format. */ -LTTNG_HIDDEN int lttng_trigger_serialize(const struct lttng_trigger *trigger, struct lttng_payload *payload) { @@ -343,7 +340,6 @@ end: return ret; } -LTTNG_HIDDEN bool lttng_trigger_is_equal( const struct lttng_trigger *a, const struct lttng_trigger *b) { @@ -376,20 +372,17 @@ bool lttng_trigger_is_equal( return true; } -LTTNG_HIDDEN bool lttng_trigger_is_hidden(const struct lttng_trigger *trigger) { return trigger->is_hidden; } -LTTNG_HIDDEN void lttng_trigger_set_hidden(struct lttng_trigger *trigger) { LTTNG_ASSERT(!trigger->is_hidden); trigger->is_hidden = true; } -LTTNG_HIDDEN enum lttng_trigger_status lttng_trigger_set_name(struct lttng_trigger *trigger, const char* name) { @@ -436,7 +429,6 @@ end: return status; } -LTTNG_HIDDEN int lttng_trigger_assign_name(struct lttng_trigger *dst, const struct lttng_trigger *src) { @@ -453,7 +445,6 @@ end: return ret; } -LTTNG_HIDDEN void lttng_trigger_set_tracer_token(struct lttng_trigger *trigger, uint64_t token) { @@ -461,7 +452,6 @@ void lttng_trigger_set_tracer_token(struct lttng_trigger *trigger, LTTNG_OPTIONAL_SET(&trigger->tracer_token, token); } -LTTNG_HIDDEN uint64_t lttng_trigger_get_tracer_token(const struct lttng_trigger *trigger) { LTTNG_ASSERT(trigger); @@ -469,7 +459,6 @@ uint64_t lttng_trigger_get_tracer_token(const struct lttng_trigger *trigger) return LTTNG_OPTIONAL_GET(trigger->tracer_token); } -LTTNG_HIDDEN int lttng_trigger_generate_name(struct lttng_trigger *trigger, uint64_t unique_id) { @@ -490,13 +479,11 @@ end: return ret; } -LTTNG_HIDDEN void lttng_trigger_get(struct lttng_trigger *trigger) { urcu_ref_get(&trigger->ref); } -LTTNG_HIDDEN void lttng_trigger_put(struct lttng_trigger *trigger) { if (!trigger) { @@ -513,7 +500,6 @@ static void delete_trigger_array_element(void *ptr) lttng_trigger_put(trigger); } -LTTNG_HIDDEN struct lttng_triggers *lttng_triggers_create(void) { struct lttng_triggers *triggers = NULL; @@ -529,7 +515,6 @@ end: return triggers; } -LTTNG_HIDDEN struct lttng_trigger *lttng_triggers_borrow_mutable_at_index( const struct lttng_triggers *triggers, unsigned int index) { @@ -547,7 +532,6 @@ end: return trigger; } -LTTNG_HIDDEN int lttng_triggers_add( struct lttng_triggers *triggers, struct lttng_trigger *trigger) { @@ -566,7 +550,6 @@ int lttng_triggers_add( return ret; } -LTTNG_HIDDEN int lttng_triggers_remove_hidden_triggers(struct lttng_triggers *triggers) { int ret; @@ -677,7 +660,6 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttng_triggers_create_from_payload( struct lttng_payload_view *src_view, struct lttng_triggers **triggers) @@ -744,14 +726,12 @@ error: return ret; } -LTTNG_HIDDEN const struct lttng_credentials *lttng_trigger_get_credentials( const struct lttng_trigger *trigger) { return &trigger->creds; } -LTTNG_HIDDEN void lttng_trigger_set_credentials(struct lttng_trigger *trigger, const struct lttng_credentials *creds) { @@ -809,7 +789,6 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_domain_type lttng_trigger_get_underlying_domain_type_restriction( const struct lttng_trigger *trigger) { @@ -856,7 +835,6 @@ enum lttng_domain_type lttng_trigger_get_underlying_domain_type_restriction( * Generate bytecode related to the trigger. * On success LTTNG_OK. On error, returns lttng_error code. */ -LTTNG_HIDDEN enum lttng_error_code lttng_trigger_generate_bytecode( struct lttng_trigger *trigger, const struct lttng_credentials *creds) @@ -905,7 +883,6 @@ end: return ret; } -LTTNG_HIDDEN struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger) { int ret; @@ -1005,7 +982,6 @@ end: return copy; } -LTTNG_HIDDEN bool lttng_trigger_needs_tracer_notifier(const struct lttng_trigger *trigger) { bool needs_tracer_notifier = false; @@ -1030,7 +1006,6 @@ end: return needs_tracer_notifier; } -LTTNG_HIDDEN void lttng_trigger_set_as_registered(struct lttng_trigger *trigger) { pthread_mutex_lock(&trigger->lock); @@ -1038,7 +1013,6 @@ void lttng_trigger_set_as_registered(struct lttng_trigger *trigger) pthread_mutex_unlock(&trigger->lock); } -LTTNG_HIDDEN void lttng_trigger_set_as_unregistered(struct lttng_trigger *trigger) { pthread_mutex_lock(&trigger->lock); @@ -1053,26 +1027,22 @@ void lttng_trigger_set_as_unregistered(struct lttng_trigger *trigger) * the trigger lock for the duration of the manipulation using * `lttng_trigger_lock` and `lttng_trigger_unlock`. */ -LTTNG_HIDDEN bool lttng_trigger_is_registered(struct lttng_trigger *trigger) { ASSERT_LOCKED(trigger->lock); return trigger->registered; } -LTTNG_HIDDEN void lttng_trigger_lock(struct lttng_trigger *trigger) { pthread_mutex_lock(&trigger->lock); } -LTTNG_HIDDEN void lttng_trigger_unlock(struct lttng_trigger *trigger) { pthread_mutex_unlock(&trigger->lock); } -LTTNG_HIDDEN enum lttng_error_code lttng_trigger_mi_serialize(const struct lttng_trigger *trigger, struct mi_writer *writer, const struct mi_lttng_error_query_callbacks @@ -1185,7 +1155,6 @@ static int compare_triggers_by_name(const void *a, const void *b) return strcmp(name_a, name_b); } -LTTNG_HIDDEN enum lttng_error_code lttng_triggers_mi_serialize(const struct lttng_triggers *triggers, struct mi_writer *writer, const struct mi_lttng_error_query_callbacks diff --git a/src/common/unix.c b/src/common/unix.c index 933baa61c..9918db2e6 100644 --- a/src/common/unix.c +++ b/src/common/unix.c @@ -25,7 +25,6 @@ /* * Connect to unix socket using the path name. */ -LTTNG_HIDDEN int lttcomm_connect_unix_sock(const char *pathname) { struct sockaddr_un s_un; @@ -75,7 +74,6 @@ error: * Do an accept(2) on the sock and return the new file descriptor. The socket * MUST be bind(2) before. */ -LTTNG_HIDDEN int lttcomm_accept_unix_sock(int sock) { int new_fd; @@ -91,7 +89,6 @@ int lttcomm_accept_unix_sock(int sock) return new_fd; } -LTTNG_HIDDEN int lttcomm_create_anon_unix_socketpair(int *fds) { if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds) < 0) { @@ -105,7 +102,6 @@ int lttcomm_create_anon_unix_socketpair(int *fds) * Creates a AF_UNIX local socket using pathname bind the socket upon creation * and return the fd. */ -LTTNG_HIDDEN int lttcomm_create_unix_sock(const char *pathname) { struct sockaddr_un s_un; @@ -153,7 +149,6 @@ error: /* * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN. */ -LTTNG_HIDDEN int lttcomm_listen_unix_sock(int sock) { int ret; @@ -172,7 +167,6 @@ int lttcomm_listen_unix_sock(int sock) * * Return the size of received data. */ -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len) { struct msghdr msg; @@ -219,7 +213,6 @@ ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len) * * Return the size of received data. */ -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock_non_block(int sock, void *buf, size_t len) { struct msghdr msg; @@ -271,7 +264,6 @@ end: * * Return the size of sent data. */ -LTTNG_HIDDEN ssize_t lttcomm_send_unix_sock(int sock, const void *buf, size_t len) { struct msghdr msg; @@ -325,7 +317,6 @@ end: * * Return the size of sent data. */ -LTTNG_HIDDEN ssize_t lttcomm_send_unix_sock_non_block(int sock, const void *buf, size_t len) { struct msghdr msg; @@ -375,7 +366,6 @@ end: /* * Shutdown cleanly a unix socket. */ -LTTNG_HIDDEN int lttcomm_close_unix_sock(int sock) { int ret, closeret; @@ -399,7 +389,6 @@ int lttcomm_close_unix_sock(int sock) * * Returns the size of data sent, or negative error value. */ -LTTNG_HIDDEN ssize_t lttcomm_send_fds_unix_sock(int sock, const int *fds, size_t nb_fd) { struct msghdr msg; @@ -513,14 +502,12 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttcomm_send_payload_view_fds_unix_sock(int sock, struct lttng_payload_view *view) { return _lttcomm_send_payload_view_fds_unix_sock(sock, view, true); } -LTTNG_HIDDEN ssize_t lttcomm_send_payload_view_fds_unix_sock_non_block(int sock, struct lttng_payload_view *view) { @@ -533,7 +520,6 @@ ssize_t lttcomm_send_payload_view_fds_unix_sock_non_block(int sock, * * Returns the size of data sent, or negative error value. */ -LTTNG_HIDDEN ssize_t lttcomm_send_fds_unix_sock_non_block(int sock, const int *fds, size_t nb_fd) { struct msghdr msg; @@ -618,7 +604,6 @@ end: * Expect at most "nb_fd" file descriptors. Returns the number of fd * actually received in nb_fd. */ -LTTNG_HIDDEN ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd) { struct iovec iov[1]; @@ -826,14 +811,12 @@ end: return ret; } -LTTNG_HIDDEN ssize_t lttcomm_recv_payload_fds_unix_sock(int sock, size_t nb_fd, struct lttng_payload *payload) { return _lttcomm_recv_payload_fds_unix_sock(sock, nb_fd, payload, true); } -LTTNG_HIDDEN ssize_t lttcomm_recv_payload_fds_unix_sock_non_block(int sock, size_t nb_fd, struct lttng_payload *payload) { @@ -852,7 +835,6 @@ ssize_t lttcomm_recv_payload_fds_unix_sock_non_block(int sock, size_t nb_fd, * possible since the FDs are actually in the control message. It is all or * nothing, still the sender side can send the wrong number of fds. */ -LTTNG_HIDDEN ssize_t lttcomm_recv_fds_unix_sock_non_block(int sock, int *fds, size_t nb_fd) { struct iovec iov[1]; @@ -985,7 +967,6 @@ end: * * Returns the size of data sent, or negative error value. */ -LTTNG_HIDDEN ssize_t lttcomm_send_creds_unix_sock(int sock, const void *buf, size_t len) { struct msghdr msg; @@ -1050,7 +1031,6 @@ ssize_t lttcomm_send_creds_unix_sock(int sock, const void *buf, size_t len) * * Returns the size of received data, or negative error value. */ -LTTNG_HIDDEN ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, lttng_sock_cred *creds) { @@ -1146,7 +1126,6 @@ end: * Set socket option to use credentials passing. */ #if defined(__linux__) || defined(__CYGWIN__) -LTTNG_HIDDEN int lttcomm_setsockopt_creds_unix_sock(int sock) { int ret, on = 1; @@ -1159,7 +1138,6 @@ int lttcomm_setsockopt_creds_unix_sock(int sock) return ret; } #elif (defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__)) -LTTNG_HIDDEN int lttcomm_setsockopt_creds_unix_sock(int sock) { return 0; diff --git a/src/common/unix.h b/src/common/unix.h index 4f69e6d48..820dff0b5 100644 --- a/src/common/unix.h +++ b/src/common/unix.h @@ -16,60 +16,39 @@ #include #include -LTTNG_HIDDEN int lttcomm_create_unix_sock(const char *pathname); -LTTNG_HIDDEN int lttcomm_create_anon_unix_socketpair(int *fds); -LTTNG_HIDDEN int lttcomm_connect_unix_sock(const char *pathname); -LTTNG_HIDDEN int lttcomm_accept_unix_sock(int sock); -LTTNG_HIDDEN int lttcomm_listen_unix_sock(int sock); -LTTNG_HIDDEN int lttcomm_close_unix_sock(int sock); /* Send a message accompanied by fd(s) over a unix socket. */ -LTTNG_HIDDEN ssize_t lttcomm_send_fds_unix_sock(int sock, const int *fds, size_t nb_fd); -LTTNG_HIDDEN ssize_t lttcomm_send_payload_view_fds_unix_sock(int sock, struct lttng_payload_view *view); -LTTNG_HIDDEN ssize_t lttcomm_send_fds_unix_sock_non_block( int sock, const int *fds, size_t nb_fd); -LTTNG_HIDDEN ssize_t lttcomm_send_payload_view_fds_unix_sock_non_block(int sock, struct lttng_payload_view *view); /* Recv a message accompanied by fd(s) from a unix socket */ -LTTNG_HIDDEN ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd); -LTTNG_HIDDEN ssize_t lttcomm_recv_payload_fds_unix_sock(int sock, size_t nb_fd, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttcomm_recv_fds_unix_sock_non_block(int sock, int *fds, size_t nb_fd); -LTTNG_HIDDEN ssize_t lttcomm_recv_payload_fds_unix_sock_non_block(int sock, size_t nb_fd, struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock_non_block(int sock, void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_send_unix_sock(int sock, const void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_send_unix_sock_non_block(int sock, const void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_send_creds_unix_sock(int sock, const void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, lttng_sock_cred *creds); -LTTNG_HIDDEN int lttcomm_setsockopt_creds_unix_sock(int sock); #endif /* _LTTCOMM_UNIX_H */ diff --git a/src/common/uri.c b/src/common/uri.c index da67fcd18..fef21b38d 100644 --- a/src/common/uri.c +++ b/src/common/uri.c @@ -203,7 +203,6 @@ static int compare_destination(struct lttng_uri *ctrl, struct lttng_uri *data) /* * Build a string URL from a lttng_uri object. */ -LTTNG_HIDDEN int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size) { int ipver, ret; @@ -240,7 +239,6 @@ int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size) * * Return 0 if equal else 1. */ -LTTNG_HIDDEN int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2) { return memcmp(uri1, uri2, sizeof(struct lttng_uri)); @@ -249,7 +247,6 @@ int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2) /* * Free URI memory. */ -LTTNG_HIDDEN void uri_free(struct lttng_uri *uri) { free(uri); @@ -271,7 +268,6 @@ void uri_free(struct lttng_uri *uri) * This code was originally licensed GPLv2 so we acknolwedge the Free Software * Foundation here for the work and to make sure we are compliant with it. */ -LTTNG_HIDDEN ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris) { int ret, i = 0; @@ -527,7 +523,6 @@ error: * Parse a string URL and creates URI(s) returning the size of the populated * array. */ -LTTNG_HIDDEN ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, struct lttng_uri **uris) { diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c index 60bdddb48..9ce212ef2 100644 --- a/src/common/userspace-probe.c +++ b/src/common/userspace-probe.c @@ -1179,7 +1179,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_serialize( const struct lttng_userspace_probe_location *location, struct lttng_payload *payload) @@ -1472,7 +1471,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_create_from_payload( struct lttng_payload_view *view, struct lttng_userspace_probe_location **location) @@ -1860,7 +1858,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_flatten( const struct lttng_userspace_probe_location *location, struct lttng_dynamic_buffer *buffer) @@ -1888,7 +1885,6 @@ end: return ret; } -LTTNG_HIDDEN struct lttng_userspace_probe_location *lttng_userspace_probe_location_copy( const struct lttng_userspace_probe_location *location) { @@ -1923,7 +1919,6 @@ err: return new_location; } -LTTNG_HIDDEN bool lttng_userspace_probe_location_lookup_method_is_equal( const struct lttng_userspace_probe_location_lookup_method *a, const struct lttng_userspace_probe_location_lookup_method *b) @@ -1948,7 +1943,6 @@ end: return is_equal; } -LTTNG_HIDDEN bool lttng_userspace_probe_location_is_equal( const struct lttng_userspace_probe_location *a, const struct lttng_userspace_probe_location *b) @@ -1978,14 +1972,12 @@ end: return is_equal; } -LTTNG_HIDDEN unsigned long lttng_userspace_probe_location_hash( const struct lttng_userspace_probe_location *location) { return location->hash(location); } -LTTNG_HIDDEN enum lttng_error_code lttng_userspace_probe_location_mi_serialize( const struct lttng_userspace_probe_location *location, struct mi_writer *writer) diff --git a/src/common/utils.c b/src/common/utils.c index c08e349e2..eebed2adb 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -413,13 +413,11 @@ error: free(absolute_path); return NULL; } -LTTNG_HIDDEN char *utils_expand_path(const char *path) { return _utils_expand_path(path, true); } -LTTNG_HIDDEN char *utils_expand_path_keep_symlink(const char *path) { return _utils_expand_path(path, false); @@ -427,7 +425,6 @@ char *utils_expand_path_keep_symlink(const char *path) /* * Create a pipe in dst. */ -LTTNG_HIDDEN int utils_create_pipe(int *dst) { int ret; @@ -450,7 +447,6 @@ int utils_create_pipe(int *dst) * Make sure the pipe opened by this function are closed at some point. Use * utils_close_pipe(). */ -LTTNG_HIDDEN int utils_create_pipe_cloexec(int *dst) { int ret, i; @@ -483,7 +479,6 @@ error: * utils_close_pipe(). Using pipe() and fcntl rather than pipe2() to * support OSes other than Linux 2.6.23+. */ -LTTNG_HIDDEN int utils_create_pipe_cloexec_nonblock(int *dst) { int ret, i; @@ -521,7 +516,6 @@ error: /* * Close both read and write side of the pipe. */ -LTTNG_HIDDEN void utils_close_pipe(int *src) { int i, ret; @@ -547,7 +541,6 @@ void utils_close_pipe(int *src) /* * Create a new string using two strings range. */ -LTTNG_HIDDEN char *utils_strdupdelim(const char *begin, const char *end) { char *str; @@ -568,7 +561,6 @@ error: /* * Set CLOEXEC flag to the give file descriptor. */ -LTTNG_HIDDEN int utils_set_fd_cloexec(int fd) { int ret; @@ -591,7 +583,6 @@ end: /* * Create pid file to the given path and filename. */ -LTTNG_HIDDEN int utils_create_pid_file(pid_t pid, const char *filepath) { int ret; @@ -625,7 +616,6 @@ error: * Create lock file to the given path and filename. * Returns the associated file descriptor, -1 on error. */ -LTTNG_HIDDEN int utils_create_lock_file(const char *filepath) { int ret; @@ -672,7 +662,6 @@ error: * * On success, return 0 else a negative error code. */ -LTTNG_HIDDEN int utils_mkdir(const char *path, mode_t mode, int uid, int gid) { int ret; @@ -701,7 +690,6 @@ end: * * On success, return 0 else a negative error code. */ -LTTNG_HIDDEN int utils_mkdir_recursive(const char *path, mode_t mode, int uid, int gid) { int ret; @@ -729,7 +717,6 @@ end: * * Return 0 on success or else a negative value. */ -LTTNG_HIDDEN int utils_stream_file_path(const char *path_name, const char *file_name, uint64_t size, uint64_t count, const char *suffix, char *out_stream_path, size_t stream_path_len) @@ -780,7 +767,6 @@ int utils_stream_file_path(const char *path_name, const char *file_name, * * @return 0 on success, -1 on failure. */ -LTTNG_HIDDEN int utils_parse_size_suffix(const char * const str, uint64_t * const size) { int ret; @@ -887,7 +873,6 @@ end: * * @return 0 on success, -1 on failure. */ -LTTNG_HIDDEN int utils_parse_time_suffix(char const * const str, uint64_t * const time_us) { int ret; @@ -1100,7 +1085,6 @@ static __attribute__((unused)) unsigned int fls_u32(uint32_t x) * Return the minimum order for which x <= (1UL << order). * Return -1 if x is 0. */ -LTTNG_HIDDEN int utils_get_count_order_u32(uint32_t x) { if (!x) { @@ -1114,7 +1098,6 @@ int utils_get_count_order_u32(uint32_t x) * Return the minimum order for which x <= (1UL << order). * Return -1 if x is 0. */ -LTTNG_HIDDEN int utils_get_count_order_u64(uint64_t x) { if (!x) { @@ -1128,7 +1111,6 @@ int utils_get_count_order_u64(uint64_t x) * Obtain the value of LTTNG_HOME environment variable, if exists. * Otherwise returns the value of HOME. */ -LTTNG_HIDDEN const char *utils_get_home_dir(void) { char *val = NULL; @@ -1160,7 +1142,6 @@ end: * Get user's home directory. Dynamically allocated, must be freed * by the caller. */ -LTTNG_HIDDEN char *utils_get_user_home_dir(uid_t uid) { struct passwd pwd; @@ -1201,7 +1182,6 @@ end: * * Return amount of bytes set in the buffer or else 0 on error. */ -LTTNG_HIDDEN size_t utils_get_current_time_str(const char *format, char *dst, size_t len) { size_t ret; @@ -1227,7 +1207,6 @@ size_t utils_get_current_time_str(const char *format, char *dst, size_t len) * Return 0 on success and set *gid to the group_ID matching the passed name. * Else -1 if it cannot be found or an error occurred. */ -LTTNG_HIDDEN int utils_get_group_id(const char *name, bool warn, gid_t *gid) { static volatile int warn_once; @@ -1309,7 +1288,6 @@ error: * of elements in the long_options array. Returns NULL if the string's * allocation fails. */ -LTTNG_HIDDEN char *utils_generate_optstring(const struct option *long_options, size_t opt_count) { @@ -1352,7 +1330,6 @@ end: * Try to remove a hierarchy of empty directories, recursively. Don't unlink * any file. Try to rmdir any empty directory within the hierarchy. */ -LTTNG_HIDDEN int utils_recursive_rmdir(const char *path) { int ret; @@ -1369,7 +1346,6 @@ end: return ret; } -LTTNG_HIDDEN int utils_truncate_stream_file(int fd, off_t length) { int ret; @@ -1401,7 +1377,6 @@ static const char *get_man_bin_path(void) return DEFAULT_MAN_BIN_PATH; } -LTTNG_HIDDEN int utils_show_help(int section, const char *page_name, const char *help_msg) { @@ -1490,7 +1465,6 @@ fopen_error: * the information in `/proc/meminfo`. The number returned by this function is * a best guess. */ -LTTNG_HIDDEN int utils_get_memory_available(size_t *value) { return read_proc_meminfo_field(PROC_MEMINFO_MEMAVAILABLE_LINE, value); @@ -1500,13 +1474,11 @@ int utils_get_memory_available(size_t *value) * Returns the total size of the memory on the system in bytes based on the * the information in `/proc/meminfo`. */ -LTTNG_HIDDEN int utils_get_memory_total(size_t *value) { return read_proc_meminfo_field(PROC_MEMINFO_MEMTOTAL_LINE, value); } -LTTNG_HIDDEN int utils_change_working_directory(const char *path) { int ret; @@ -1538,7 +1510,6 @@ end: return ret; } -LTTNG_HIDDEN enum lttng_error_code utils_user_id_from_name(const char *user_name, uid_t *uid) { struct passwd p, *pres; @@ -1603,7 +1574,6 @@ end: return ret_val; } -LTTNG_HIDDEN enum lttng_error_code utils_group_id_from_name( const char *group_name, gid_t *gid) { @@ -1669,7 +1639,6 @@ end: return ret_val; } -LTTNG_HIDDEN int utils_parse_unsigned_long_long(const char *str, unsigned long long *value) { diff --git a/src/common/utils.h b/src/common/utils.h index 52dcd01fa..a3250639b 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -65,7 +65,6 @@ enum lttng_error_code utils_group_id_from_name( * - `str` is zero length * - `str` contains invalid */ -LTTNG_HIDDEN int utils_parse_unsigned_long_long(const char *str, unsigned long long *value); diff --git a/src/common/uuid.h b/src/common/uuid.h index a4aee16e1..0d3e79aee 100644 --- a/src/common/uuid.h +++ b/src/common/uuid.h @@ -38,7 +38,6 @@ typedef uint8_t lttng_uuid[LTTNG_UUID_LEN]; -LTTNG_HIDDEN int lttng_uuid_from_str(const char *str_in, lttng_uuid uuid_out); /* @@ -47,22 +46,17 @@ int lttng_uuid_from_str(const char *str_in, lttng_uuid uuid_out); * * Assumes uuid_str is at least LTTNG_UUID_STR_LEN byte long. */ -LTTNG_HIDDEN void lttng_uuid_to_str(const lttng_uuid uuid, char *uuid_str); -LTTNG_HIDDEN bool lttng_uuid_is_equal(const lttng_uuid a, const lttng_uuid b); -LTTNG_HIDDEN bool lttng_uuid_is_nil(const lttng_uuid uuid); -LTTNG_HIDDEN void lttng_uuid_copy(lttng_uuid dst, const lttng_uuid src); /* * Generate a random UUID according to RFC4122, section 4.4. */ -LTTNG_HIDDEN int lttng_uuid_generate(lttng_uuid uuid_out); #endif /* LTTNG_UUID_H */ diff --git a/src/common/waiter.c b/src/common/waiter.c index 52a374f6d..aca88eb4d 100644 --- a/src/common/waiter.c +++ b/src/common/waiter.c @@ -26,7 +26,6 @@ enum waiter_state { WAITER_TEARDOWN = (1 << 2), }; -LTTNG_HIDDEN void lttng_waiter_init(struct lttng_waiter *waiter) { cds_wfs_node_init(&waiter->wait_queue_node); @@ -37,7 +36,6 @@ void lttng_waiter_init(struct lttng_waiter *waiter) /* * User must init "waiter" before passing its memory to waker thread. */ -LTTNG_HIDDEN void lttng_waiter_wait(struct lttng_waiter *waiter) { unsigned int i; @@ -93,7 +91,6 @@ skip_futex_wait: * execution. In this scheme, the waiter owns the node memory, and we only allow * it to free this memory when it sees the WAITER_TEARDOWN flag. */ -LTTNG_HIDDEN void lttng_waiter_wake_up(struct lttng_waiter *waiter) { cmm_smp_mb(); diff --git a/src/common/waiter.h b/src/common/waiter.h index f4b73c744..ed870aeb0 100644 --- a/src/common/waiter.h +++ b/src/common/waiter.h @@ -22,10 +22,8 @@ struct lttng_waiter { int32_t state; }; -LTTNG_HIDDEN void lttng_waiter_init(struct lttng_waiter *waiter); -LTTNG_HIDDEN void lttng_waiter_wait(struct lttng_waiter *waiter); /* @@ -33,7 +31,6 @@ void lttng_waiter_wait(struct lttng_waiter *waiter); * It is invalid for multiple "wake" operations to be invoked * on a single waiter without re-initializing it before. */ -LTTNG_HIDDEN void lttng_waiter_wake_up(struct lttng_waiter *waiter); #endif /* LTTNG_WAITER_H */ diff --git a/src/lib/lttng-ctl/Makefile.am b/src/lib/lttng-ctl/Makefile.am index 8c271f5ef..e1ffd6a48 100644 --- a/src/lib/lttng-ctl/Makefile.am +++ b/src/lib/lttng-ctl/Makefile.am @@ -12,7 +12,12 @@ liblttng_ctl_la_SOURCES = lttng-ctl.c snapshot.c lttng-ctl-helper.h \ tracker.c liblttng_ctl_la_LDFLAGS = \ - $(LT_NO_UNDEFINED) + $(LT_NO_UNDEFINED) \ + -export-symbols $(srcdir)/liblttng-ctl.sym + +EXTRA_liblttng_ctl_la_DEPENDENCIES = liblttng-ctl.sym + +EXTRA_DIST = liblttng-ctl.sym liblttng_ctl_la_LIBADD = \ $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ diff --git a/src/lib/lttng-ctl/liblttng-ctl.sym b/src/lib/lttng-ctl/liblttng-ctl.sym new file mode 100644 index 000000000..b69e78df9 --- /dev/null +++ b/src/lib/lttng-ctl/liblttng-ctl.sym @@ -0,0 +1,677 @@ +config_buffer_type_global +config_buffer_type_per_pid +config_buffer_type_per_uid +config_domain_type_jul +config_domain_type_kernel +config_domain_type_log4j +config_domain_type_python +config_domain_type_ust +config_element_address +config_element_attributes +config_element_buffer_type +config_element_channel +config_element_channels +config_element_config +config_element_consumer_output +config_element_context +config_element_contexts +config_element_control_uri +config_element_data_uri +config_element_destination +config_element_domain +config_element_domains +config_element_enabled +config_element_event +config_element_events +config_element_exclusion +config_element_exclusions +config_element_filter +config_element_function_attributes +config_element_live_timer_interval +config_element_loglevel +config_element_loglevel_type +config_element_max_size +config_element_name +config_element_net_output +config_element_num_subbuf +config_element_offset +config_element_output +config_element_output_type +config_element_overwrite_mode +config_element_path +config_element_perf +config_element_pid +config_element_pids +config_element_pid_tracker +config_element_probe_attributes +config_element_read_timer_interval +config_element_session +config_element_sessions +config_element_shared_memory_path +config_element_snapshot_mode +config_element_snapshot_outputs +config_element_started +config_element_subbuf_size +config_element_switch_timer_interval +config_element_symbol_name +config_element_target_pid +config_element_targets +config_element_tracefile_count +config_element_tracefile_size +config_element_trackers +config_element_type +config_event_context_hostname +config_event_context_ip +config_event_context_nice +config_event_context_perf_thread_counter +config_event_context_pid +config_event_context_ppid +config_event_context_prio +config_event_context_procname +config_event_context_pthread_id +config_event_context_tid +config_event_context_vpid +config_event_context_vppid +config_event_context_vtid +config_event_type_all +config_event_type_function +config_event_type_function_entry +config_event_type_kprobe +config_event_type_kretprobe +config_event_type_noop +config_event_type_probe +config_event_type_syscall +config_event_type_tracepoint +config_loglevel_type_all +config_loglevel_type_range +config_loglevel_type_single +config_output_type_mmap +config_output_type_splice +config_overwrite_mode_discard +config_overwrite_mode_overwrite +config_str_false +config_str_no +config_str_off +config_str_on +config_str_true +config_str_yes +config_xml_encoding +config_xml_encoding_bytes_per_char +config_xml_false +config_xml_indent_string +config_xml_true +default_channel_subbuf_size +default_kernel_channel_subbuf_size +default_metadata_subbuf_size +default_ust_pid_channel_subbuf_size +default_ust_uid_channel_subbuf_size +error_log_time +lttcomm_inet_tcp_timeout +lttng_action_destroy +lttng_action_get_type +lttng_action_list_add_action +lttng_action_list_create +lttng_action_list_get_at_index +lttng_action_list_get_count +lttng_action_notify_create +lttng_action_notify_get_rate_policy +lttng_action_notify_set_rate_policy +lttng_action_path_create +lttng_action_path_destroy +lttng_action_path_get_index_at_index +lttng_action_path_get_index_count +lttng_action_rotate_session_create +lttng_action_rotate_session_get_rate_policy +lttng_action_rotate_session_get_session_name +lttng_action_rotate_session_set_rate_policy +lttng_action_rotate_session_set_session_name +lttng_action_snapshot_session_create +lttng_action_snapshot_session_get_output +lttng_action_snapshot_session_get_rate_policy +lttng_action_snapshot_session_get_session_name +lttng_action_snapshot_session_set_output +lttng_action_snapshot_session_set_rate_policy +lttng_action_snapshot_session_set_session_name +lttng_action_start_session_create +lttng_action_start_session_get_rate_policy +lttng_action_start_session_get_session_name +lttng_action_start_session_set_rate_policy +lttng_action_start_session_set_session_name +lttng_action_stop_session_create +lttng_action_stop_session_get_rate_policy +lttng_action_stop_session_get_session_name +lttng_action_stop_session_set_rate_policy +lttng_action_stop_session_set_session_name +lttng_add_context +lttng_calibrate +lttng_channel_create +lttng_channel_destroy +lttng_channel_get_blocking_timeout +lttng_channel_get_discarded_event_count +lttng_channel_get_lost_packet_count +lttng_channel_get_monitor_timer_interval +lttng_channel_set_blocking_timeout +lttng_channel_set_default_attr +lttng_channel_set_monitor_timer_interval +lttng_clear_handle_destroy +lttng_clear_handle_get_result +lttng_clear_handle_wait_for_completion +lttng_clear_session +lttng_condition_buffer_usage_get_channel_name +lttng_condition_buffer_usage_get_domain_type +lttng_condition_buffer_usage_get_session_name +lttng_condition_buffer_usage_get_threshold +lttng_condition_buffer_usage_get_threshold_ratio +lttng_condition_buffer_usage_high_create +lttng_condition_buffer_usage_low_create +lttng_condition_buffer_usage_set_channel_name +lttng_condition_buffer_usage_set_domain_type +lttng_condition_buffer_usage_set_session_name +lttng_condition_buffer_usage_set_threshold +lttng_condition_buffer_usage_set_threshold_ratio +lttng_condition_destroy +lttng_condition_event_rule_matches_append_capture_descriptor +lttng_condition_event_rule_matches_create +lttng_condition_event_rule_matches_get_capture_descriptor_at_index +lttng_condition_event_rule_matches_get_capture_descriptor_count +lttng_condition_event_rule_matches_get_rule +lttng_condition_get_type +lttng_condition_session_consumed_size_create +lttng_condition_session_consumed_size_get_session_name +lttng_condition_session_consumed_size_get_threshold +lttng_condition_session_consumed_size_set_session_name +lttng_condition_session_consumed_size_set_threshold +lttng_condition_session_rotation_completed_create +lttng_condition_session_rotation_get_session_name +lttng_condition_session_rotation_ongoing_create +lttng_condition_session_rotation_set_session_name +lttng_create_handle +lttng_create_session +_lttng_create_session_ext +lttng_create_session_ext +lttng_create_session_live +lttng_create_session_snapshot +lttng_data_pending +lttng_destroy_handle +lttng_destroy_session +lttng_destroy_session_ext +lttng_destroy_session_no_wait +lttng_destruction_handle_destroy +lttng_destruction_handle_get_archive_location +lttng_destruction_handle_get_result +lttng_destruction_handle_get_rotation_state +lttng_destruction_handle_wait_for_completion +lttng_disable_channel +lttng_disable_consumer +lttng_disable_event +lttng_disable_event_ext +lttng_elf_get_sdt_probe_offsets +lttng_elf_get_symbol_offset +lttng_enable_channel +lttng_enable_consumer +lttng_enable_event +lttng_enable_event_with_exclusions +lttng_enable_event_with_filter +lttng_error_query_action_create +lttng_error_query_condition_create +lttng_error_query_destroy +lttng_error_query_execute +lttng_error_query_result_counter_get_value +lttng_error_query_result_get_description +lttng_error_query_result_get_name +lttng_error_query_result_get_type +lttng_error_query_results_destroy +lttng_error_query_results_get_count +lttng_error_query_results_get_result +lttng_error_query_trigger_create +lttng_evaluation_buffer_usage_get_usage +lttng_evaluation_buffer_usage_get_usage_ratio +lttng_evaluation_destroy +lttng_evaluation_event_rule_matches_get_captured_values +lttng_evaluation_get_type +lttng_evaluation_session_consumed_size_get_consumed_size +lttng_evaluation_session_rotation_completed_get_location +lttng_evaluation_session_rotation_get_id +lttng_event_create +lttng_event_destroy +lttng_event_expr_app_specific_context_field_create +lttng_event_expr_app_specific_context_field_get_provider_name +lttng_event_expr_app_specific_context_field_get_type_name +lttng_event_expr_array_field_element_create +lttng_event_expr_array_field_element_get_index +lttng_event_expr_array_field_element_get_parent_expr +lttng_event_expr_channel_context_field_create +lttng_event_expr_channel_context_field_get_name +lttng_event_expr_destroy +lttng_event_expr_event_payload_field_create +lttng_event_expr_event_payload_field_get_name +lttng_event_expr_get_type +lttng_event_expr_is_equal +lttng_event_field_value_array_get_element_at_index +lttng_event_field_value_array_get_length +lttng_event_field_value_get_type +lttng_event_field_value_real_get_value +lttng_event_field_value_signed_int_get_value +lttng_event_field_value_string_get_value +lttng_event_field_value_unsigned_int_get_value +lttng_event_get_exclusion_name +lttng_event_get_exclusion_name_count +lttng_event_get_filter_expression +lttng_event_get_userspace_probe_location +lttng_event_rule_destroy +lttng_event_rule_get_type +lttng_event_rule_jul_logging_create +lttng_event_rule_jul_logging_get_filter +lttng_event_rule_jul_logging_get_log_level_rule +lttng_event_rule_jul_logging_get_name_pattern +lttng_event_rule_jul_logging_set_filter +lttng_event_rule_jul_logging_set_log_level_rule +lttng_event_rule_jul_logging_set_name_pattern +lttng_event_rule_kernel_kprobe_create +lttng_event_rule_kernel_kprobe_get_event_name +lttng_event_rule_kernel_kprobe_get_location +lttng_event_rule_kernel_kprobe_set_event_name +lttng_event_rule_kernel_syscall_create +lttng_event_rule_kernel_syscall_get_emission_site +lttng_event_rule_kernel_syscall_get_filter +lttng_event_rule_kernel_syscall_get_name_pattern +lttng_event_rule_kernel_syscall_set_filter +lttng_event_rule_kernel_syscall_set_name_pattern +lttng_event_rule_kernel_tracepoint_create +lttng_event_rule_kernel_tracepoint_get_filter +lttng_event_rule_kernel_tracepoint_get_name_pattern +lttng_event_rule_kernel_tracepoint_set_filter +lttng_event_rule_kernel_tracepoint_set_name_pattern +lttng_event_rule_kernel_uprobe_create +lttng_event_rule_kernel_uprobe_get_event_name +lttng_event_rule_kernel_uprobe_get_location +lttng_event_rule_kernel_uprobe_set_event_name +lttng_event_rule_log4j_logging_create +lttng_event_rule_log4j_logging_get_filter +lttng_event_rule_log4j_logging_get_log_level_rule +lttng_event_rule_log4j_logging_get_name_pattern +lttng_event_rule_log4j_logging_set_filter +lttng_event_rule_log4j_logging_set_log_level_rule +lttng_event_rule_log4j_logging_set_name_pattern +lttng_event_rule_python_logging_create +lttng_event_rule_python_logging_get_filter +lttng_event_rule_python_logging_get_log_level_rule +lttng_event_rule_python_logging_get_name_pattern +lttng_event_rule_python_logging_set_filter +lttng_event_rule_python_logging_set_log_level_rule +lttng_event_rule_python_logging_set_name_pattern +lttng_event_rule_user_tracepoint_add_name_pattern_exclusion +lttng_event_rule_user_tracepoint_create +lttng_event_rule_user_tracepoint_get_filter +lttng_event_rule_user_tracepoint_get_log_level_rule +lttng_event_rule_user_tracepoint_get_name_pattern +lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_at_index +lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_count +lttng_event_rule_user_tracepoint_set_filter +lttng_event_rule_user_tracepoint_set_log_level_rule +lttng_event_rule_user_tracepoint_set_name_pattern +lttng_event_set_userspace_probe_location +lttng_health_create_consumerd +lttng_health_create_relayd +lttng_health_create_sessiond +lttng_health_destroy +lttng_health_get_nr_threads +lttng_health_get_thread +lttng_health_query +lttng_health_state +lttng_health_thread_name +lttng_health_thread_state +lttng_ht_seed +lttng_index_allocator_alloc +lttng_index_allocator_create +lttng_index_allocator_destroy +lttng_index_allocator_get_index_count +lttng_index_allocator_release +lttng_kernel_probe_location_address_create +lttng_kernel_probe_location_address_get_address +lttng_kernel_probe_location_destroy +lttng_kernel_probe_location_get_type +lttng_kernel_probe_location_symbol_create +lttng_kernel_probe_location_symbol_get_name +lttng_kernel_probe_location_symbol_get_offset +lttng_list_channels +lttng_list_domains +lttng_list_events +lttng_list_sessions +lttng_list_syscalls +lttng_list_tracepoint_fields +lttng_list_tracepoints +lttng_list_tracker_pids +lttng_list_triggers +lttng_load_session +lttng_load_session_attr_create +lttng_load_session_attr_destroy +lttng_load_session_attr_get_input_url +lttng_load_session_attr_get_override_ctrl_url +lttng_load_session_attr_get_override_data_url +lttng_load_session_attr_get_override_session_name +lttng_load_session_attr_get_override_url +lttng_load_session_attr_get_overwrite +lttng_load_session_attr_get_session_name +lttng_load_session_attr_set_input_url +lttng_load_session_attr_set_override_ctrl_url +lttng_load_session_attr_set_override_data_url +lttng_load_session_attr_set_override_session_name +lttng_load_session_attr_set_override_url +lttng_load_session_attr_set_overwrite +lttng_load_session_attr_set_session_name +lttng_log_level_rule_at_least_as_severe_as_create +lttng_log_level_rule_at_least_as_severe_as_get_level +lttng_log_level_rule_destroy +lttng_log_level_rule_exactly_create +lttng_log_level_rule_exactly_get_level +lttng_log_level_rule_get_type +lttng_metadata_regenerate +lttng_notification_channel_create +lttng_notification_channel_destroy +lttng_notification_channel_get_next_notification +lttng_notification_channel_has_pending_notification +lttng_notification_channel_subscribe +lttng_notification_channel_unsubscribe +lttng_notification_destroy +lttng_notification_get_condition +lttng_notification_get_evaluation +lttng_notification_get_trigger +lttng_opt_mi +lttng_opt_quiet +lttng_opt_verbose +lttng_process_attr_group_id_tracker_handle_add_gid +lttng_process_attr_group_id_tracker_handle_add_group_name +lttng_process_attr_group_id_tracker_handle_remove_gid +lttng_process_attr_group_id_tracker_handle_remove_group_name +lttng_process_attr_process_id_tracker_handle_add_pid +lttng_process_attr_process_id_tracker_handle_remove_pid +lttng_process_attr_tracker_handle_destroy +lttng_process_attr_tracker_handle_get_inclusion_set +lttng_process_attr_tracker_handle_get_tracking_policy +lttng_process_attr_tracker_handle_set_tracking_policy +lttng_process_attr_user_id_tracker_handle_add_uid +lttng_process_attr_user_id_tracker_handle_add_user_name +lttng_process_attr_user_id_tracker_handle_remove_uid +lttng_process_attr_user_id_tracker_handle_remove_user_name +lttng_process_attr_values_get_count +lttng_process_attr_values_get_gid_at_index +lttng_process_attr_values_get_group_name_at_index +lttng_process_attr_values_get_pid_at_index +lttng_process_attr_values_get_type_at_index +lttng_process_attr_values_get_uid_at_index +lttng_process_attr_values_get_user_name_at_index +lttng_process_attr_virtual_group_id_tracker_handle_add_gid +lttng_process_attr_virtual_group_id_tracker_handle_add_group_name +lttng_process_attr_virtual_group_id_tracker_handle_remove_gid +lttng_process_attr_virtual_group_id_tracker_handle_remove_group_name +lttng_process_attr_virtual_process_id_tracker_handle_add_pid +lttng_process_attr_virtual_process_id_tracker_handle_remove_pid +lttng_process_attr_virtual_user_id_tracker_handle_add_uid +lttng_process_attr_virtual_user_id_tracker_handle_add_user_name +lttng_process_attr_virtual_user_id_tracker_handle_remove_uid +lttng_process_attr_virtual_user_id_tracker_handle_remove_user_name +lttng_rate_policy_destroy +lttng_rate_policy_every_n_create +lttng_rate_policy_every_n_get_interval +lttng_rate_policy_get_type +lttng_rate_policy_once_after_n_create +lttng_rate_policy_once_after_n_get_threshold +lttng_regenerate_metadata +lttng_regenerate_statedump +lttng_register_consumer +lttng_register_trigger +lttng_register_trigger_with_automatic_name +lttng_register_trigger_with_name +lttng_rotate_session +lttng_rotation_handle_destroy +lttng_rotation_handle_get_archive_location +lttng_rotation_handle_get_state +lttng_rotation_schedule_destroy +lttng_rotation_schedule_get_type +lttng_rotation_schedule_periodic_create +lttng_rotation_schedule_periodic_get_period +lttng_rotation_schedule_periodic_set_period +lttng_rotation_schedules_destroy +lttng_rotation_schedules_get_at_index +lttng_rotation_schedules_get_count +lttng_rotation_schedule_size_threshold_create +lttng_rotation_schedule_size_threshold_get_threshold +lttng_rotation_schedule_size_threshold_set_threshold +lttng_save_session +lttng_save_session_attr_create +lttng_save_session_attr_destroy +lttng_save_session_attr_get_omit_name +lttng_save_session_attr_get_omit_output +lttng_save_session_attr_get_output_url +lttng_save_session_attr_get_overwrite +lttng_save_session_attr_get_session_name +lttng_save_session_attr_set_omit_name +lttng_save_session_attr_set_omit_output +lttng_save_session_attr_set_output_url +lttng_save_session_attr_set_overwrite +lttng_save_session_attr_set_session_name +lttng_session_add_rotation_schedule +lttng_session_daemon_alive +lttng_session_daemon_command_endpoint +lttng_session_daemon_notification_endpoint +lttng_session_descriptor_create +lttng_session_descriptor_destroy +lttng_session_descriptor_get_session_name +lttng_session_descriptor_live_create +lttng_session_descriptor_live_network_create +lttng_session_descriptor_local_create +lttng_session_descriptor_network_create +lttng_session_descriptor_snapshot_create +lttng_session_descriptor_snapshot_local_create +lttng_session_descriptor_snapshot_network_create +lttng_session_get_creation_time +lttng_session_get_tracker_handle +lttng_session_list_rotation_schedules +lttng_session_remove_rotation_schedule +lttng_set_consumer_url +lttng_set_session_shm_path +lttng_set_tracing_group +lttng_snapshot_add_output +lttng_snapshot_del_output +lttng_snapshot_list_output +lttng_snapshot_output_create +lttng_snapshot_output_destroy +lttng_snapshot_output_get_ctrl_url +lttng_snapshot_output_get_data_url +lttng_snapshot_output_get_id +lttng_snapshot_output_get_maxsize +lttng_snapshot_output_get_name +lttng_snapshot_output_list_destroy +lttng_snapshot_output_list_get_next +lttng_snapshot_output_set_ctrl_url +lttng_snapshot_output_set_data_url +lttng_snapshot_output_set_id +lttng_snapshot_output_set_local_path +lttng_snapshot_output_set_name +lttng_snapshot_output_set_network_url +lttng_snapshot_output_set_network_urls +lttng_snapshot_output_set_size +lttng_snapshot_record +lttng_start_tracing +lttng_stop_tracing +lttng_stop_tracing_no_wait +lttng_strerror +lttng_trace_archive_location_get_type +lttng_trace_archive_location_local_get_absolute_path +lttng_trace_archive_location_relay_get_control_port +lttng_trace_archive_location_relay_get_data_port +lttng_trace_archive_location_relay_get_host +lttng_trace_archive_location_relay_get_protocol_type +lttng_trace_archive_location_relay_get_relative_path +lttng_track_pid +lttng_trigger_create +lttng_trigger_destroy +lttng_trigger_get_action +lttng_trigger_get_condition +lttng_trigger_get_const_action +lttng_trigger_get_const_condition +lttng_trigger_get_name +lttng_trigger_get_owner_uid +lttng_triggers_destroy +lttng_trigger_set_owner_uid +lttng_triggers_get_at_index +lttng_triggers_get_count +lttng_unregister_trigger +lttng_untrack_pid +lttng_userspace_probe_location_destroy +lttng_userspace_probe_location_function_create +lttng_userspace_probe_location_function_get_binary_fd +lttng_userspace_probe_location_function_get_binary_path +lttng_userspace_probe_location_function_get_function_name +lttng_userspace_probe_location_function_get_instrumentation_type +lttng_userspace_probe_location_function_set_instrumentation_type +lttng_userspace_probe_location_get_lookup_method +lttng_userspace_probe_location_get_type +lttng_userspace_probe_location_lookup_method_destroy +lttng_userspace_probe_location_lookup_method_function_elf_create +lttng_userspace_probe_location_lookup_method_get_type +lttng_userspace_probe_location_lookup_method_tracepoint_sdt_create +lttng_userspace_probe_location_tracepoint_create +lttng_userspace_probe_location_tracepoint_get_binary_fd +lttng_userspace_probe_location_tracepoint_get_binary_path +lttng_userspace_probe_location_tracepoint_get_probe_name +lttng_userspace_probe_location_tracepoint_get_provider_name +lttng_yyalloc +lttng_yy_create_buffer +lttng_yy_delete_buffer +lttng_yy_flush_buffer +lttng_yyfree +lttng_yyget_column +lttng_yyget_debug +lttng_yyget_extra +lttng_yyget_in +lttng_yyget_leng +lttng_yyget_lineno +lttng_yyget_lval +lttng_yyget_out +lttng_yyget_text +lttng_yylex_init +lttng_yypop_buffer_state +lttng_yypush_buffer_state +lttng_yyrealloc +lttng_yy_scan_buffer +lttng_yy_scan_bytes +lttng_yy_scan_string +lttng_yyset_column +lttng_yyset_debug +lttng_yyset_extra +lttng_yyset_in +lttng_yyset_lineno +lttng_yyset_lval +lttng_yyset_out +lttng_yy_switch_to_buffer +mi_lttng_context_type_perf_counter +mi_lttng_context_type_perf_cpu_counter +mi_lttng_context_type_perf_thread_counter +mi_lttng_element_calibrate +mi_lttng_element_calibrate_function +mi_lttng_element_command +mi_lttng_element_command_action +mi_lttng_element_command_add_context +mi_lttng_element_command_calibrate +mi_lttng_element_command_create +mi_lttng_element_command_destroy +mi_lttng_element_command_disable_channel +mi_lttng_element_command_disable_event +mi_lttng_element_command_enable_channels +mi_lttng_element_command_enable_event +mi_lttng_element_command_list +mi_lttng_element_command_load +mi_lttng_element_command_name +mi_lttng_element_command_output +mi_lttng_element_command_save +mi_lttng_element_command_set_session +mi_lttng_element_command_snapshot +mi_lttng_element_command_snapshot_add +mi_lttng_element_command_snapshot_del +mi_lttng_element_command_snapshot_list +mi_lttng_element_command_snapshot_record +mi_lttng_element_command_start +mi_lttng_element_command_stop +mi_lttng_element_command_success +mi_lttng_element_command_track +mi_lttng_element_command_untrack +mi_lttng_element_command_version +mi_lttng_element_empty +mi_lttng_element_event_field +mi_lttng_element_event_fields +mi_lttng_element_id +mi_lttng_element_load +mi_lttng_element_nowrite +mi_lttng_element_perf_counter_context +mi_lttng_element_pid_id +mi_lttng_element_save +mi_lttng_element_snapshot_ctrl_url +mi_lttng_element_snapshot_data_url +mi_lttng_element_snapshot_max_size +mi_lttng_element_snapshot_n_ptr +mi_lttng_element_snapshots +mi_lttng_element_snapshot_session_name +mi_lttng_element_success +mi_lttng_element_track_untrack_all_wildcard +mi_lttng_element_track_untrack_pid_target +mi_lttng_element_track_untrack_targets +mi_lttng_element_type_enum +mi_lttng_element_type_float +mi_lttng_element_type_integer +mi_lttng_element_type_other +mi_lttng_element_type_string +mi_lttng_element_version +mi_lttng_element_version_commit +mi_lttng_element_version_description +mi_lttng_element_version_license +mi_lttng_element_version_major +mi_lttng_element_version_minor +mi_lttng_element_version_patch_level +mi_lttng_element_version_str +mi_lttng_element_version_web +mi_lttng_loglevel_str_alert +mi_lttng_loglevel_str_crit +mi_lttng_loglevel_str_debug +mi_lttng_loglevel_str_debug_function +mi_lttng_loglevel_str_debug_line +mi_lttng_loglevel_str_debug_module +mi_lttng_loglevel_str_debug_process +mi_lttng_loglevel_str_debug_program +mi_lttng_loglevel_str_debug_system +mi_lttng_loglevel_str_debug_unit +mi_lttng_loglevel_str_emerg +mi_lttng_loglevel_str_err +mi_lttng_loglevel_str_info +mi_lttng_loglevel_str_jul_all +mi_lttng_loglevel_str_jul_config +mi_lttng_loglevel_str_jul_fine +mi_lttng_loglevel_str_jul_finer +mi_lttng_loglevel_str_jul_finest +mi_lttng_loglevel_str_jul_info +mi_lttng_loglevel_str_jul_off +mi_lttng_loglevel_str_jul_severe +mi_lttng_loglevel_str_jul_warning +mi_lttng_loglevel_str_log4j_all +mi_lttng_loglevel_str_log4j_debug +mi_lttng_loglevel_str_log4j_error +mi_lttng_loglevel_str_log4j_fatal +mi_lttng_loglevel_str_log4j_info +mi_lttng_loglevel_str_log4j_off +mi_lttng_loglevel_str_log4j_trace +mi_lttng_loglevel_str_log4j_warn +mi_lttng_loglevel_str_notice +mi_lttng_loglevel_str_python_critical +mi_lttng_loglevel_str_python_debug +mi_lttng_loglevel_str_python_error +mi_lttng_loglevel_str_python_info +mi_lttng_loglevel_str_python_notset +mi_lttng_loglevel_str_python_warning +mi_lttng_loglevel_str_unknown +mi_lttng_loglevel_str_warning +mi_lttng_loglevel_type_all +mi_lttng_loglevel_type_range +mi_lttng_loglevel_type_single +mi_lttng_loglevel_type_unknown +spawn_viewer diff --git a/src/lib/lttng-ctl/lttng-ctl-helper.h b/src/lib/lttng-ctl/lttng-ctl-helper.h index b96ed56e4..64e659dca 100644 --- a/src/lib/lttng-ctl/lttng-ctl-helper.h +++ b/src/lib/lttng-ctl/lttng-ctl-helper.h @@ -13,12 +13,6 @@ #include #include -/* - * NOTE: Every symbol in this helper header MUST be set to hidden so not to - * polute the library name space. Use LTTNG_HIDDEN macro before declaring the - * function in the C file. - */ - /* Copy helper functions. */ void lttng_ctl_copy_lttng_domain(struct lttng_domain *dst, struct lttng_domain *src); @@ -42,7 +36,6 @@ int lttng_ctl_ask_sessiond_fds_varlen(struct lttcomm_session_msg *lsm, * Return the size of the received data on success or else a negative lttng * error code. */ -LTTNG_HIDDEN int lttng_ctl_ask_sessiond_payload(struct lttng_payload_view *message, struct lttng_payload *reply); diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 46d9cb1c3..239ed8f33 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -81,7 +81,6 @@ int lttng_opt_mi; * * If domain is unknown, default domain will be the kernel. */ -LTTNG_HIDDEN void lttng_ctl_copy_lttng_domain(struct lttng_domain *dst, struct lttng_domain *src) { @@ -244,7 +243,6 @@ end: * * If yes return 1, else return -1. */ -LTTNG_HIDDEN int lttng_check_tracing_group(void) { gid_t *grp_list, tracing_gid; @@ -434,7 +432,7 @@ error: * * On success, return the socket's file descriptor. On error, return -1. */ -LTTNG_HIDDEN int connect_sessiond(void) +int connect_sessiond(void) { int ret; @@ -533,7 +531,6 @@ end: * * Return size of data (only payload, not header) or a negative error code. */ -LTTNG_HIDDEN int lttng_ctl_ask_sessiond_fds_varlen(struct lttcomm_session_msg *lsm, const int *fds, size_t nb_fd, const void *vardata, size_t vardata_len, void **user_payload_buf, @@ -605,7 +602,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_ctl_ask_sessiond_payload(struct lttng_payload_view *message, struct lttng_payload *reply) {