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,
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);
* 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,
* 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,
struct lttng_rate_policy *policy;
};
-LTTNG_HIDDEN
ssize_t lttng_action_notify_create_from_payload(
struct lttng_payload_view *view,
struct lttng_action **action);
};
/* 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);
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);
* 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);
* 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);
* 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);
* 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);
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);
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,
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 */
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);
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);
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);
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);
extern "C" {
#endif
-LTTNG_HIDDEN
const char *lttng_domain_type_str(enum lttng_domain_type domain_type);
#ifdef __cplusplus
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);
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);
* `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,
* * `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 */
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 */
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);
* 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);
* 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);
/*
*
* 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);
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);
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);
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 */
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);
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);
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);
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);
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);
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);
} 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);
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);
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);
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);
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
* 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);
/*
* 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);
* 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);
* 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);
* 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);
* 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);
* 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);
/*
* 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);
/*
* 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);
* 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);
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);
* 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);
/*
* Set the socket options regarding TCP keep-alive.
*/
-LTTNG_HIDDEN
int socket_apply_keep_alive_config(int socket_fd)
{
int ret;
#include <common/macros.h>
-LTTNG_HIDDEN
int socket_apply_keep_alive_config(int socket_fd);
#endif /* RELAYD_TCP_KEEP_ALIVE_H */
}
}
-LTTNG_HIDDEN
struct lttng_condition *lttng_condition_copy(const struct lttng_condition *condition)
{
int ret;
/*
* Setup necessary data for kernel tracer action.
*/
-LTTNG_HIDDEN
int init_kernel_tracer(void)
{
int ret;
}
}
-LTTNG_HIDDEN
void cleanup_kernel_tracer(void)
{
DBG2("Closing kernel event notifier group notification file descriptor");
free(syscall_table);
}
-LTTNG_HIDDEN
bool kernel_tracer_is_initialized(void)
{
return kernel_tracer_fd >= 0;
/*
* 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,
return notification;
}
-LTTNG_HIDDEN
void lttng_event_notifier_notification_destroy(
struct lttng_event_notifier_notification *notification)
{
return NULL;
}
-LTTNG_HIDDEN
bool notification_client_list_get(struct notification_client_list *list)
{
return urcu_ref_get_unless_zero(&list->ref);
* 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,
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. */
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,
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,
/*
* 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);
}
/* Only use for dynamically-allocated strings. */
-LTTNG_HIDDEN
void config_string_set(struct config_string *config_str, char *value)
{
LTTNG_ASSERT(config_str);
config_str->value = value;
}
-LTTNG_HIDDEN
int sessiond_config_apply_env_config(struct sessiond_config *config)
{
int ret = 0;
return ret;
}
-LTTNG_HIDDEN
int sessiond_config_init(struct sessiond_config *config)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
void sessiond_config_fini(struct sessiond_config *config)
{
config_string_fini(&config->tracing_group_name);
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);
return 0;
}
-LTTNG_HIDDEN
void sessiond_config_log(struct sessiond_config *config)
{
DBG_NO_LOC("[sessiond configuration]");
};
/* Config string takes ownership of value. */
-LTTNG_HIDDEN
void config_string_set(struct config_string *string, char *value);
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 */
#include <lttng/trigger/trigger-internal.h>
#include <lttng/action/action-internal.h>
-LTTNG_HIDDEN
enum lttng_trigger_status lttng_trigger_add_error_results(
const struct lttng_trigger *trigger,
struct lttng_error_query_results *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)
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)
return ret;
}
-LTTNG_HIDDEN
int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel)
{
int ret = lookup_value_from_name(loglevel_values,
return ret;
}
-LTTNG_HIDDEN
bool loglevel_parse_range_string(const char *str,
enum lttng_loglevel *min,
enum lttng_loglevel *max)
return ret;
}
-LTTNG_HIDDEN
int loglevel_log4j_name_to_value(
const char *name, enum lttng_loglevel_log4j *loglevel)
{
return ret;
}
-LTTNG_HIDDEN
bool loglevel_log4j_parse_range_string(const char *str,
enum lttng_loglevel_log4j *min,
enum lttng_loglevel_log4j *max)
return ret;
}
-LTTNG_HIDDEN
int loglevel_jul_name_to_value(
const char *name, enum lttng_loglevel_jul *loglevel)
{
return ret;
}
-LTTNG_HIDDEN
bool loglevel_jul_parse_range_string(const char *str,
enum lttng_loglevel_jul *min,
enum lttng_loglevel_jul *max)
return ret;
}
-LTTNG_HIDDEN
int loglevel_python_name_to_value(
const char *name, enum lttng_loglevel_python *loglevel)
{
return ret;
}
-LTTNG_HIDDEN
bool loglevel_python_parse_range_string(const char *str,
enum lttng_loglevel_python *min,
enum lttng_loglevel_python *max)
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,
#include <lttng/lttng.h>
#include <common/macros.h>
-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 */
* 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)
{
struct lttng_userspace_probe_location;
-LTTNG_HIDDEN
int parse_userspace_probe_opts(const char *opt,
struct lttng_userspace_probe_location **uprobe_loc);
#include <lttng/action/stop-session-internal.h>
#include <lttng/error-query-internal.h>
-LTTNG_HIDDEN
const char *lttng_action_type_string(enum lttng_action_type action_type)
{
switch (action_type) {
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,
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) {
lttng_action_put(action);
}
-LTTNG_HIDDEN
bool lttng_action_validate(struct lttng_action *action)
{
bool valid;
return valid;
}
-LTTNG_HIDDEN
int lttng_action_serialize(struct lttng_action *action,
struct lttng_payload *payload)
{
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_action_create_from_payload(struct lttng_payload_view *view,
struct lttng_action **action)
{
return consumed_len;
}
-LTTNG_HIDDEN
bool lttng_action_is_equal(const struct lttng_action *a,
const struct lttng_action *b)
{
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;
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)
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)
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,
return action_status;
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_action_list_mi_serialize(
const struct lttng_trigger *trigger,
const struct lttng_action *action,
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)
{
return;
}
-LTTNG_HIDDEN
int lttng_action_path_copy(const struct lttng_action_path *src,
struct lttng_action_path *dst)
{
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_action_path_create_from_payload(
struct lttng_payload_view *view,
struct lttng_action_path **_action_path)
return ret;
}
-LTTNG_HIDDEN
int lttng_action_path_serialize(const struct lttng_action_path *action_path,
struct lttng_payload *payload)
{
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)
{
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,
rate_policy->destroy(rate_policy);
}
-LTTNG_HIDDEN
int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
struct lttng_payload *payload)
{
return consumed_len;
}
-LTTNG_HIDDEN
ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view,
struct lttng_rate_policy **rate_policy)
{
return consumed_len;
}
-LTTNG_HIDDEN
bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a,
const struct lttng_rate_policy *b)
{
return is_equal;
}
-LTTNG_HIDDEN
bool lttng_rate_policy_should_execute(
const struct lttng_rate_policy *policy, uint64_t counter)
{
return status;
}
-LTTNG_HIDDEN
struct lttng_rate_policy *lttng_rate_policy_copy(
const struct lttng_rate_policy *source)
{
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)
#include <common/dynamic-buffer.h>
#include <common/error.h>
-LTTNG_HIDDEN
struct lttng_buffer_view lttng_buffer_view_init(
const char *src, size_t offset, ptrdiff_t len)
{
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)
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)
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)
* 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);
*
* @view Buffer view to validate
*/
-LTTNG_HIDDEN
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);
* 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);
* @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);
return order;
}
-LTTNG_HIDDEN
int bytecode_init(struct lttng_bytecode_alloc **fb)
{
uint32_t alloc_len;
return ret;
}
-LTTNG_HIDDEN
int bytecode_push(struct lttng_bytecode_alloc **fb, const void *data,
uint32_t align, uint32_t len)
{
return 0;
}
-LTTNG_HIDDEN
int bytecode_push_logical(struct lttng_bytecode_alloc **fb,
struct logical_op *data,
uint32_t align, uint32_t len,
return 0;
}
-LTTNG_HIDDEN
int bytecode_push_get_payload_root(struct lttng_bytecode_alloc **bytecode)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int bytecode_push_get_context_root(struct lttng_bytecode_alloc **bytecode)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int bytecode_push_get_app_context_root(struct lttng_bytecode_alloc **bytecode)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int bytecode_push_get_index_u64(struct lttng_bytecode_alloc **bytecode,
uint64_t index)
{
return ret;
}
-LTTNG_HIDDEN
int bytecode_push_get_symbol(struct lttng_bytecode_alloc **bytecode,
struct lttng_bytecode_alloc **bytecode_reloc,
const char *symbol)
*
* Return allocated bytecode or NULL on error.
*/
-LTTNG_HIDDEN
struct lttng_bytecode *lttng_bytecode_copy(
const struct lttng_bytecode *orig_f)
{
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);
#ifdef __linux__
-LTTNG_HIDDEN
int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
unsigned int flags)
{
(ino_t) reserved_val; \
})
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_create(const char *path)
{
const struct lttng_directory_handle cwd_handle = {
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)
return NULL;
}
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd(
int dirfd)
{
free(handle);
}
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_copy(
const struct lttng_directory_handle *handle)
{
return new_handle;
}
-LTTNG_HIDDEN
bool lttng_directory_handle_equals(const struct lttng_directory_handle *lhs,
const struct lttng_directory_handle *rhs)
{
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)
{
return handle;
}
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_create(
const char *path)
{
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)
return new_handle;
}
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd(
int dirfd)
{
free(handle);
}
-LTTNG_HIDDEN
struct lttng_directory_handle *lttng_directory_handle_copy(
const struct lttng_directory_handle *handle)
{
return new_handle;
}
-LTTNG_HIDDEN
bool lttng_directory_handle_equals(const struct lttng_directory_handle *lhs,
const struct lttng_directory_handle *rhs)
{
handle->base_path = NULL;
}
-LTTNG_HIDDEN
int lttng_directory_handle_stat(const struct lttng_directory_handle *handle,
const char *subdirectory, struct stat *st)
{
return ret;
}
-LTTNG_HIDDEN
bool lttng_directory_handle_uses_fd(
const struct lttng_directory_handle *handle)
{
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) {
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,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_create_subdirectory_recursive_as_user(
const struct lttng_directory_handle *handle,
const char *subdirectory_path,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_create_subdirectory(
const struct lttng_directory_handle *handle,
const char *subdirectory,
handle, subdirectory, mode, NULL);
}
-LTTNG_HIDDEN
int lttng_directory_handle_create_subdirectory_recursive(
const struct lttng_directory_handle *handle,
const char *subdirectory_path,
handle, subdirectory_path, mode, NULL);
}
-LTTNG_HIDDEN
int lttng_directory_handle_open_file_as_user(
const struct lttng_directory_handle *handle,
const char *filename,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_open_file(
const struct lttng_directory_handle *handle,
const char *filename,
mode, NULL);
}
-LTTNG_HIDDEN
int lttng_directory_handle_unlink_file_as_user(
const struct lttng_directory_handle *handle,
const char *filename,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_unlink_file(
const struct lttng_directory_handle *handle,
const char *filename)
filename, NULL);
}
-LTTNG_HIDDEN
int lttng_directory_handle_rename(
const struct lttng_directory_handle *old_handle,
const char *old_name,
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,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_remove_subdirectory(
const struct lttng_directory_handle *handle,
const char *name)
NULL);
}
-LTTNG_HIDDEN
int lttng_directory_handle_remove_subdirectory_as_user(
const struct lttng_directory_handle *handle,
const char *name,
return ret;
}
-LTTNG_HIDDEN
int lttng_directory_handle_remove_subdirectory_recursive(
const struct lttng_directory_handle *handle,
const char *name,
handle, name, NULL, flags);
}
-LTTNG_HIDDEN
int lttng_directory_handle_remove_subdirectory_recursive_as_user(
const struct lttng_directory_handle *handle,
const char *name,
* 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);
* 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);
* 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);
* 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,
* 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,
/*
* 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,
* 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,
/*
* 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,
* 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,
/*
* 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);
/*
* 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,
* 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,
* 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,
/*
* 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);
/*
* 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,
* 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);
* 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,
/*
* stat() a file relative to a directory handle.
*/
-LTTNG_HIDDEN
int lttng_directory_handle_stat(
const struct lttng_directory_handle *handle,
const char *name,
* 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);
*
* 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);
/*
* 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;
/*
* 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;
/*
* Remove a fd from the epoll set.
*/
-LTTNG_HIDDEN
int compat_epoll_del(struct lttng_poll_event *events, int fd)
{
int ret;
/*
* Set an fd's events.
*/
-LTTNG_HIDDEN
int compat_epoll_mod(struct lttng_poll_event *events, int fd, uint32_t req_events)
{
int ret;
/*
* 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)
{
/*
* Setup poll set maximum size.
*/
-LTTNG_HIDDEN
int compat_epoll_set_max_size(void)
{
int ret, fd, retval = 0;
/*
* Create pollfd data structure.
*/
-LTTNG_HIDDEN
int compat_poll_create(struct lttng_poll_event *events, int size)
{
struct compat_poll_event_array *current, *wait;
/*
* 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)
{
/*
* Modify an fd's events..
*/
-LTTNG_HIDDEN
int compat_poll_mod(struct lttng_poll_event *events, int fd,
uint32_t req_events)
{
/*
* 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;
/*
* Wait on poll() with timeout. Blocking call.
*/
-LTTNG_HIDDEN
int compat_poll_wait(struct lttng_poll_event *events, int timeout,
bool interruptible)
{
/*
* Setup poll set maximum size.
*/
-LTTNG_HIDDEN
int compat_poll_set_max_size(void)
{
int ret, retval = 0;
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_buffer_usage_low_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **_condition)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_buffer_usage_high_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **_condition)
return evaluation;
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_buffer_usage_low_create_from_payload(
struct lttng_payload_view *view,
struct lttng_evaluation **_evaluation)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_buffer_usage_high_create_from_payload(
struct lttng_payload_view *view,
struct lttng_evaluation **_evaluation)
free(usage);
}
-LTTNG_HIDDEN
struct lttng_evaluation *lttng_evaluation_buffer_usage_create(
enum lttng_condition_type type, uint64_t use, uint64_t capacity)
{
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) {
}
-LTTNG_HIDDEN
bool lttng_condition_validate(const struct lttng_condition *condition)
{
bool valid;
return valid;
}
-LTTNG_HIDDEN
int lttng_condition_serialize(const struct lttng_condition *condition,
struct lttng_payload *payload)
{
return ret;
}
-LTTNG_HIDDEN
bool lttng_condition_is_equal(const struct lttng_condition *a,
const struct lttng_condition *b)
{
return is_equal;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **condition)
return ret;
}
-LTTNG_HIDDEN
void lttng_condition_init(struct lttng_condition *condition,
enum lttng_condition_type type)
{
urcu_ref_init(&condition->ref);
}
-LTTNG_HIDDEN
const char *lttng_condition_type_str(enum lttng_condition_type type)
{
switch (type) {
}
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_condition_mi_serialize(
const struct lttng_trigger *trigger,
const struct lttng_condition *condition,
return expr;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_event_rule_matches_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **_condition)
return consumed_length;
}
-LTTNG_HIDDEN
enum lttng_condition_status
lttng_condition_event_rule_matches_borrow_rule_mutable(
const struct lttng_condition *condition,
return status;
}
-LTTNG_HIDDEN
void lttng_condition_event_rule_matches_set_error_counter_index(
struct lttng_condition *condition, uint64_t error_counter_index)
{
error_counter_index);
}
-LTTNG_HIDDEN
uint64_t lttng_condition_event_rule_matches_get_error_counter_index(
const struct lttng_condition *condition)
{
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,
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,
return status;
}
-LTTNG_HIDDEN
enum lttng_error_code
lttng_condition_event_rule_matches_generate_capture_descriptor_bytecode(
struct lttng_condition *condition)
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)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_session_consumed_size_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **_condition)
return evaluation;
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_session_consumed_size_create_from_payload(
struct lttng_payload_view *view,
struct lttng_evaluation **_evaluation)
free(consumed);
}
-LTTNG_HIDDEN
struct lttng_evaluation *lttng_evaluation_session_consumed_size_create(
uint64_t consumed)
{
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_condition_session_rotation_ongoing_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **condition)
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)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_session_rotation_ongoing_create_from_payload(
struct lttng_payload_view *view,
struct lttng_evaluation **evaluation)
view, evaluation);
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_session_rotation_completed_create_from_payload(
struct lttng_payload_view *view,
struct lttng_evaluation **evaluation)
view, evaluation);
}
-LTTNG_HIDDEN
struct lttng_evaluation *lttng_evaluation_session_rotation_ongoing_create(
uint64_t id)
{
NULL);
}
-LTTNG_HIDDEN
struct lttng_evaluation *lttng_evaluation_session_rotation_completed_create(
uint64_t id, struct lttng_trace_archive_location *location)
{
}
/* 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) */
}
/* See documentation in header file. */
-LTTNG_HIDDEN
int ini_parse(const char* filename, ini_entry_handler handler, void* user)
{
FILE* file;
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";
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";
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";
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";
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";
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;
return ret;
}
-LTTNG_HIDDEN
int config_get_section_entries(const char *override_path, const char *section,
config_entry_handler_cb handler, void *user_data)
{
return ret;
}
-LTTNG_HIDDEN
int config_parse_value(const char *value)
{
int i, ret = 0;
return out_str;
}
-LTTNG_HIDDEN
struct config_writer *config_writer_create(int fd_output, int indent)
{
int ret;
return NULL;
}
-LTTNG_HIDDEN
int config_writer_destroy(struct config_writer *writer)
{
int ret = 0;
return ret;
}
-LTTNG_HIDDEN
int config_writer_open_element(struct config_writer *writer,
const char *element_name)
{
return ret >= 0 ? 0 : ret;
}
-LTTNG_HIDDEN
int config_writer_write_attribute(struct config_writer *writer,
const char *name, const char *value)
{
return ret >= 0 ? 0 : ret;
}
-LTTNG_HIDDEN
int config_writer_close_element(struct config_writer *writer)
{
int ret;
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)
{
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)
{
return ret >= 0 ? 0 : ret;
}
-LTTNG_HIDDEN
int config_writer_write_element_bool(struct config_writer *writer,
const char *element_name, int value)
{
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)
return ret >= 0 ? 0 : ret;
}
-LTTNG_HIDDEN
int config_writer_write_element_string(struct config_writer *writer,
const char *element_name, const char *value)
{
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)
* 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);
* 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);
/*
* 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);
/*
* 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);
/*
* 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);
* 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);
* 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);
/*
* 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);
*
* 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);
* 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);
* 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);
* 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);
* 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);
#include <common/error.h>
#include <common/macros.h>
-LTTNG_HIDDEN
int parse_application_context(const char *str, char **out_provider_name,
char **out_ctx_name)
{
* 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);
#include <stdbool.h>
#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)
{
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)
{
return a->gid.value == b->gid.value;
}
-LTTNG_HIDDEN
bool lttng_credentials_is_equal(const struct lttng_credentials *a,
const struct lttng_credentials *b)
{
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);
#include <common/daemonize.h>
#include <common/error.h>
-LTTNG_HIDDEN
int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
int close_fds)
{
*
* Return 0 on success else -1 on error.
*/
-LTTNG_HIDDEN
int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
int close_fds);
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) {
* 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);
/*
* 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);
/*
* 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);
/*
* 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);
/*
* 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);
/*
* 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 */
#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) {
#include <common/dynamic-array.h>
-LTTNG_HIDDEN
void lttng_dynamic_array_init(struct lttng_dynamic_array *array,
size_t element_size,
lttng_dynamic_array_element_destructor destructor)
array->destructor = destructor;
}
-LTTNG_HIDDEN
int lttng_dynamic_array_set_count(struct lttng_dynamic_array *array,
size_t new_element_count)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_array_add_element(struct lttng_dynamic_array *array,
const void *element)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_array_remove_element(struct lttng_dynamic_array *array,
size_t element_index)
{
array->buffer.size - array->element_size);
}
-LTTNG_HIDDEN
void lttng_dynamic_array_reset(struct lttng_dynamic_array *array)
{
if (array->destructor) {
array->size = 0;
}
-LTTNG_HIDDEN
void lttng_dynamic_array_clear(struct lttng_dynamic_array *array)
{
if (array->destructor) {
array->size = 0;
}
-LTTNG_HIDDEN
void lttng_dynamic_pointer_array_init(
struct lttng_dynamic_pointer_array *array,
lttng_dynamic_pointer_array_destructor destructor)
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)
{
}
/* Release any memory used by the dynamic array. */
-LTTNG_HIDDEN
void lttng_dynamic_pointer_array_reset(
struct lttng_dynamic_pointer_array *array)
{
lttng_dynamic_array_reset(&array->array);
}
-LTTNG_HIDDEN
void lttng_dynamic_pointer_array_clear(
struct lttng_dynamic_pointer_array *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);
* 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);
*
* 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);
* 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);
/*
* 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);
* 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);
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)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_buffer_append_buffer(struct lttng_dynamic_buffer *dst_buffer,
const struct lttng_dynamic_buffer *src_buffer)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_buffer_append_view(struct lttng_dynamic_buffer *buffer,
const struct lttng_buffer_view *src)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_buffer_set_size(struct lttng_dynamic_buffer *buffer,
size_t new_size)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_dynamic_buffer_set_capacity(struct lttng_dynamic_buffer *buffer,
size_t demanded_capacity)
{
}
/* Release any memory used by the dynamic buffer. */
-LTTNG_HIDDEN
void lttng_dynamic_buffer_reset(struct lttng_dynamic_buffer *buffer)
{
if (!buffer) {
buffer->data = NULL;
}
-LTTNG_HIDDEN
size_t lttng_dynamic_buffer_get_capacity_left(
struct lttng_dynamic_buffer *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);
/*
* (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);
* 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);
* 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);
* 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);
*
* 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);
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)
return ret;
}
-LTTNG_HIDDEN
void lttng_error_query_result_destroy(struct lttng_error_query_result *counter)
{
if (!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)
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));
return set;
}
-LTTNG_HIDDEN
int lttng_error_query_results_add_result(
struct lttng_error_query_results *results,
struct lttng_error_query_result *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)
return used_size;
}
-LTTNG_HIDDEN
int lttng_error_query_results_serialize(
const struct lttng_error_query_results *results,
struct lttng_payload *payload)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_error_query_results_create_from_payload(
struct lttng_payload_view *view,
struct lttng_error_query_results **_results)
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)
{
return query_trigger->trigger;
}
-LTTNG_HIDDEN
const struct lttng_trigger *lttng_error_query_condition_borrow_target(
const struct lttng_error_query *query)
{
return query_trigger->trigger;
}
-LTTNG_HIDDEN
const struct lttng_trigger *lttng_error_query_action_borrow_trigger_target(
const struct lttng_error_query *query)
{
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)
trigger, &query_action->action_path);
}
-LTTNG_HIDDEN
int lttng_error_query_serialize(const struct lttng_error_query *query,
struct lttng_payload *payload)
{
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
struct lttng_error_query **query)
{
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)
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;
return "";
}
-LTTNG_HIDDEN
void logger_set_thread_name(const char *name, bool set_pthread_name)
{
int ret;
*
* 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;
return error_string_array[ERROR_INDEX(code)];
}
-LTTNG_HIDDEN
void lttng_abort_on_error(void)
{
if (lttng_opt_abort_on_error < 0) {
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;
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 */
#include <common/error.h>
#include <stdbool.h>
-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)
{
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_evaluation_create_from_payload(
const struct lttng_condition *condition,
struct lttng_payload_view *src_view,
return status;
}
-LTTNG_HIDDEN
int lttng_event_expr_to_bytecode(const struct lttng_event_expr *expr,
struct lttng_bytecode **bytecode_out)
{
return ret_code;
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_event_expr_mi_serialize(
const struct lttng_event_expr *expression,
struct mi_writer *writer)
return field_val;
}
-LTTNG_HIDDEN
struct lttng_event_field_value *lttng_event_field_value_uint_create(
uint64_t val)
{
return &field_val->parent;
}
-LTTNG_HIDDEN
struct lttng_event_field_value *lttng_event_field_value_int_create(
int64_t val)
{
return field_val;
}
-LTTNG_HIDDEN
struct lttng_event_field_value *lttng_event_field_value_enum_uint_create(
uint64_t val)
{
return &field_val->parent.parent;
}
-LTTNG_HIDDEN
struct lttng_event_field_value *lttng_event_field_value_enum_int_create(
int64_t val)
{
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(
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)
{
return &field_val->parent;
}
-LTTNG_HIDDEN
struct lttng_event_field_value *lttng_event_field_value_string_create(
const char *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(
return &field_val->parent;
}
-LTTNG_HIDDEN
void lttng_event_field_value_destroy(struct lttng_event_field_value *field_val)
{
if (!field_val) {
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)
return ret;
}
-LTTNG_HIDDEN
int lttng_event_field_value_enum_append_label(
struct lttng_event_field_value *field_val,
const char *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)
field_val);
}
-LTTNG_HIDDEN
int lttng_event_field_value_array_append_unavailable(
struct lttng_event_field_value *array_field_val)
{
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)
{
lttng_event_rule_put(event_rule);
}
-LTTNG_HIDDEN
bool lttng_event_rule_validate(const struct lttng_event_rule *event_rule)
{
bool valid;
return valid;
}
-LTTNG_HIDDEN
int lttng_event_rule_serialize(const struct lttng_event_rule *event_rule,
struct lttng_payload *payload)
{
return ret;
}
-LTTNG_HIDDEN
bool lttng_event_rule_is_equal(const struct lttng_event_rule *a,
const struct lttng_event_rule *b)
{
return is_equal;
}
-LTTNG_HIDDEN
ssize_t lttng_event_rule_create_from_payload(
struct lttng_payload_view *view,
struct lttng_event_rule **event_rule)
return ret;
}
-LTTNG_HIDDEN
void lttng_event_rule_init(struct lttng_event_rule *event_rule,
enum lttng_event_rule_type type)
{
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) {
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)
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)
{
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)
return rule->generate_exclusions(rule, exclusions);
}
-LTTNG_HIDDEN
struct lttng_event *lttng_event_rule_generate_lttng_event(
const struct lttng_event_rule *rule)
{
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;
}
}
-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)
{
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)
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)
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)
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)
{
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)
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)
return status;
}
-LTTNG_HIDDEN
struct lttng_userspace_probe_location *
lttng_event_rule_kernel_uprobe_get_location_mutable(
const struct lttng_event_rule *rule)
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)
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)
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)
#include <lttng/event-internal.h>
#include <common/error.h>
-LTTNG_HIDDEN
struct lttng_event *lttng_event_copy(const struct lttng_event *event)
{
struct lttng_event *new_event;
free(handle);
}
-LTTNG_HIDDEN
struct fd_handle *fd_handle_create(int fd)
{
struct fd_handle *handle = NULL;
return handle;
}
-LTTNG_HIDDEN
void fd_handle_get(struct fd_handle *handle)
{
if (!handle) {
urcu_ref_get(&handle->ref);
}
-LTTNG_HIDDEN
void fd_handle_put(struct fd_handle *handle)
{
if (!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;
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);
/*
*
* This function can't fail.
*/
-LTTNG_HIDDEN
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 */
return ret;
}
-LTTNG_HIDDEN
struct fd_tracker *fd_tracker_create(const char *unlinked_file_path,
unsigned int capacity)
{
return NULL;
}
-LTTNG_HIDDEN
void fd_tracker_log(struct fd_tracker *tracker)
{
struct fs_handle_tracked *handle;
pthread_mutex_unlock(&tracker->lock);
}
-LTTNG_HIDDEN
int fd_tracker_destroy(struct fd_tracker *tracker)
{
int ret = 0;
return ret;
}
-LTTNG_HIDDEN
struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
struct lttng_directory_handle *directory,
const char *path,
return left_to_close ? -EMFILE : 0;
}
-LTTNG_HIDDEN
int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker,
int *out_fds,
const char **names,
goto end_unlock;
}
-LTTNG_HIDDEN
int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker,
int *fds_in,
unsigned int fd_count,
* 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);
/*
* (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,
* - 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,
* 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,
/*
* Log the contents of the fd_tracker.
*/
-LTTNG_HIDDEN
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);
/*
* 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 */
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));
return NULL;
}
-LTTNG_HIDDEN void lttng_unlinked_file_pool_destroy(
+void lttng_unlinked_file_pool_destroy(
struct lttng_unlinked_file_pool *pool)
{
if (!pool) {
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)
{
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)
{
}
}
-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,
return ret;
}
-LTTNG_HIDDEN int lttng_inode_unlink(struct lttng_inode *inode)
+int lttng_inode_unlink(struct lttng_inode *inode)
{
int ret = 0;
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));
return NULL;
}
-LTTNG_HIDDEN void lttng_inode_registry_destroy(
+void lttng_inode_registry_destroy(
struct lttng_inode_registry *registry)
{
if (!registry) {
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,
* 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,
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,
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 */
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)
{
return ret;
}
-LTTNG_HIDDEN
int fd_tracker_util_pipe_close(struct fd_tracker *tracker, int *pipe)
{
return fd_tracker_close_unsuspendable_fd(
}
#endif
-LTTNG_HIDDEN
struct lttng_directory_handle *fd_tracker_create_directory_handle(
struct fd_tracker *tracker, const char *path)
{
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,
* 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,
size_t offset, len;
};
-LTTNG_HIDDEN
struct bytecode_symbol_iterator *bytecode_symbol_iterator_create(
struct lttng_bytecode *bytecode)
{
return it;
}
-LTTNG_HIDDEN
int bytecode_symbol_iterator_next(struct bytecode_symbol_iterator *it)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int bytecode_symbol_iterator_get_type(struct bytecode_symbol_iterator *it)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
const char *bytecode_symbol_iterator_get_name(
struct bytecode_symbol_iterator *it)
{
return ret;
}
-LTTNG_HIDDEN
void bytecode_symbol_iterator_destroy(struct bytecode_symbol_iterator *it)
{
free(it);
* 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);
*
* 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 */
} 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 {
[ NODE_UNARY_OP ] = "NODE_UNARY_OP",
};
-LTTNG_HIDDEN
const char *node_type(struct filter_node *node)
{
if (node->type < NR_NODE_TYPES)
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);
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;
return NULL;
}
-LTTNG_HIDDEN
void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx)
{
int ret;
free(parser_ctx);
}
-LTTNG_HIDDEN
int filter_parser_ctx_create_from_filter_expression(
const char *filter_expression, struct filter_parser_ctx **ctxp)
{
{
#include "common/macros.h"
-LTTNG_HIDDEN
void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src);
}
}
}
-LTTNG_HIDDEN
void filter_bytecode_free(struct filter_parser_ctx *ctx)
{
if (!ctx) {
}
}
-LTTNG_HIDDEN
int filter_visitor_bytecode_generate(struct filter_parser_ctx *ctx)
{
int ret;
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;
}
}
-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);
* 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);
* 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);
}
}
-LTTNG_HIDDEN
int filter_visitor_ir_validate_string(struct filter_parser_ctx *ctx)
{
return validate_string(ctx->ir_root);
return 0;
}
-LTTNG_HIDDEN
int filter_visitor_print_xml(struct filter_parser_ctx *ctx, FILE *stream,
int indent)
{
#include <common/fs-handle.h>
#include <common/readwrite.h>
-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;
return ret;
}
-LTTNG_HIDDEN
ssize_t fs_handle_write(struct fs_handle *handle, const void *buf, size_t count)
{
ssize_t ret;
return ret;
}
-LTTNG_HIDDEN
int fs_handle_truncate(struct fs_handle *handle, off_t offset)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
off_t fs_handle_seek(struct fs_handle *handle, off_t offset, int whence)
{
off_t ret;
* 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);
/*
* 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 */
* 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) {
/*
* Prepare futex.
*/
-LTTNG_HIDDEN
void futex_nto1_prepare(int32_t *futex)
{
uatomic_set(futex, -1);
/*
* Wait futex.
*/
-LTTNG_HIDDEN
void futex_nto1_wait(int32_t *futex)
{
cmm_smp_mb();
/*
* Wake 1 futex.
*/
-LTTNG_HIDDEN
void futex_nto1_wake(int32_t *futex)
{
if (caa_unlikely(uatomic_read(futex) != -1))
/*
* Return an allocated lttng hashtable.
*/
-LTTNG_HIDDEN
struct lttng_ht *lttng_ht_new(unsigned long size, int type)
{
struct lttng_ht *ht;
/*
* Free a lttng hashtable.
*/
-LTTNG_HIDDEN
void lttng_ht_destroy(struct lttng_ht *ht)
{
int ret;
/*
* Init lttng ht node string.
*/
-LTTNG_HIDDEN
void lttng_ht_node_init_str(struct lttng_ht_node_str *node, char *key)
{
LTTNG_ASSERT(node);
/*
* Init lttng ht node unsigned long.
*/
-LTTNG_HIDDEN
void lttng_ht_node_init_ulong(struct lttng_ht_node_ulong *node,
unsigned long key)
{
/*
* Init lttng ht node uint64_t.
*/
-LTTNG_HIDDEN
void lttng_ht_node_init_u64(struct lttng_ht_node_u64 *node,
uint64_t key)
{
/*
* 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)
{
/*
* Free lttng ht node string.
*/
-LTTNG_HIDDEN
void lttng_ht_node_free_str(struct lttng_ht_node_str *node)
{
LTTNG_ASSERT(node);
/*
* Free lttng ht node unsigned long.
*/
-LTTNG_HIDDEN
void lttng_ht_node_free_ulong(struct lttng_ht_node_ulong *node)
{
LTTNG_ASSERT(node);
/*
* Free lttng ht node uint64_t.
*/
-LTTNG_HIDDEN
void lttng_ht_node_free_u64(struct lttng_ht_node_u64 *node)
{
LTTNG_ASSERT(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);
/*
* Lookup function in hashtable.
*/
-LTTNG_HIDDEN
void lttng_ht_lookup(struct lttng_ht *ht, const void *key,
struct lttng_ht_iter *iter)
{
/*
* Add unique string node to hashtable.
*/
-LTTNG_HIDDEN
void lttng_ht_add_unique_str(struct lttng_ht *ht,
struct lttng_ht_node_str *node)
{
/*
* Add string node to hashtable.
*/
-LTTNG_HIDDEN
void lttng_ht_add_str(struct lttng_ht *ht,
struct lttng_ht_node_str *node)
{
/*
* 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);
/*
* 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);
/*
* 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)
{
/*
* 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)
{
/*
* 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)
{
/*
* 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)
{
/*
* 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)
{
/*
* Delete node from hashtable.
*/
-LTTNG_HIDDEN
int lttng_ht_del(struct lttng_ht *ht, struct lttng_ht_iter *iter)
{
int ret;
/*
* 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);
/*
* 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);
/*
* Return the number of nodes in the hashtable.
*/
-LTTNG_HIDDEN
unsigned long lttng_ht_get_count(struct lttng_ht *ht)
{
long scb, sca;
/*
* 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)
{
/*
* 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)
{
/*
* 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)
{
/*
* 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)
{
};
/* 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);
return c;
}
-LTTNG_HIDDEN
unsigned long hash_key_u64(const void *_key, unsigned long seed)
{
union {
* 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;
* 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;
/*
* 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);
/*
* 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 =
/*
* Hash function compare for number value.
*/
-LTTNG_HIDDEN
int hash_match_key_ulong(const void *key1, const void *key2)
{
if (key1 == 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) {
/*
* Hash compare function for string.
*/
-LTTNG_HIDDEN
int hash_match_key_str(const void *key1, const void *key2)
{
if (strcmp(key1, key2) == 0) {
/*
* 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 =
return ret;
}
-LTTNG_HIDDEN
int lttng_kernel_probe_location_serialize(
const struct lttng_kernel_probe_location *location,
struct lttng_payload *payload)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_kernel_probe_location_create_from_payload(
struct lttng_payload_view *view,
struct lttng_kernel_probe_location **location)
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)
return new_location;
}
-LTTNG_HIDDEN
struct lttng_kernel_probe_location *lttng_kernel_probe_location_copy(
const struct lttng_kernel_probe_location *location)
{
return new_location;
}
-LTTNG_HIDDEN
unsigned long lttng_kernel_probe_location_hash(
const struct lttng_kernel_probe_location *location)
{
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)
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) {
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)
{
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,
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)
return -1;
}
-LTTNG_HIDDEN
ssize_t lttng_trace_archive_location_serialize(
const struct lttng_trace_archive_location *location,
struct lttng_dynamic_buffer *buffer)
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)
return ret;
}
-LTTNG_HIDDEN
int lttng_log_level_rule_serialize(const struct lttng_log_level_rule *rule,
struct lttng_payload *payload)
{
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)
{
return is_equal;
}
-LTTNG_HIDDEN
struct lttng_log_level_rule *lttng_log_level_rule_copy(
const struct lttng_log_level_rule *source)
{
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,
*loglevel_value = log_level_rule->level;
}
-LTTNG_HIDDEN
unsigned long lttng_log_level_rule_hash(
const struct lttng_log_level_rule *log_level_rule)
{
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)
*/
#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))
#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 */
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";
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";
/* 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 = "";
/* 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;
* 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) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_logleveltype_string(enum lttng_loglevel_type value)
{
switch (value) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type val)
{
switch (val) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_domaintype_string(enum lttng_domain_type value)
{
switch (value) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_buffertype_string(enum lttng_buffer_type value)
{
switch (value) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_rotation_state_string(enum lttng_rotation_state value)
{
switch (value) {
}
}
-LTTNG_HIDDEN
const char *mi_lttng_trace_archive_location_relay_protocol_type_string(
enum lttng_trace_archive_location_relay_protocol_type value)
{
}
}
-LTTNG_HIDDEN
struct mi_writer *mi_lttng_writer_create(int fd_output, int mi_output_type)
{
struct mi_writer *mi_writer;
return NULL;
}
-LTTNG_HIDDEN
int mi_lttng_writer_destroy(struct mi_writer *writer)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_writer_command_open(struct mi_writer *writer, const char *command)
{
int ret;
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)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_writer_write_element_unsigned_int(struct mi_writer *writer,
const char *element_name, uint64_t value)
{
element_name, value);
}
-LTTNG_HIDDEN
int mi_lttng_writer_write_element_signed_int(struct mi_writer *writer,
const char *element_name, int64_t value)
{
element_name, value);
}
-LTTNG_HIDDEN
int mi_lttng_writer_write_element_bool(struct mi_writer *writer,
const char *element_name, int value)
{
element_name, value);
}
-LTTNG_HIDDEN
int mi_lttng_writer_write_element_string(struct mi_writer *writer,
const char *element_name, const char *value)
{
element_name, value);
}
-LTTNG_HIDDEN
int mi_lttng_writer_write_element_double(struct mi_writer *writer,
const char *element_name,
double value)
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)
{
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)
{
}
-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)
{
}
-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)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_channel_attr(struct mi_writer *writer,
struct lttng_channel_attr *attr)
{
}
-LTTNG_HIDDEN
int mi_lttng_event_common_attributes(struct mi_writer *writer,
struct lttng_event *event)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_event_tracepoint_loglevel(struct mi_writer *writer,
struct lttng_event *event, enum lttng_domain_type domain)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_event_tracepoint_no_loglevel(struct mi_writer *writer,
struct lttng_event *event)
{
return write_event_exclusions(writer, event);
}
-LTTNG_HIDDEN
int mi_lttng_event_function_probe(struct mi_writer *writer,
struct lttng_event *event)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_event_function_entry(struct mi_writer *writer,
struct lttng_event *event)
{
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)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_trackers_open(struct mi_writer *writer)
{
return mi_lttng_writer_open_element(
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_process_attribute_tracker_open(
struct mi_writer *writer, enum lttng_process_attr process_attr)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_pids_open(struct mi_writer *writer)
{
return mi_lttng_writer_open_element(writer, config_element_pids);
* 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,
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)
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_integral_process_attribute_value(struct mi_writer *writer,
enum lttng_process_attr process_attr,
int64_t value,
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_string_process_attribute_value(struct mi_writer *writer,
enum lttng_process_attr process_attr,
const char *value,
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)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_perf_counter_context(struct mi_writer *writer,
struct lttng_event_perf_counter_ctx *perf_context)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_context(struct mi_writer *writer,
struct lttng_event_context *context, int is_open)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_snapshot_output_session_name(struct mi_writer *writer,
const char *session_name)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_snapshot_list_output(struct mi_writer *writer,
const struct lttng_snapshot_output *output)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_snapshot_del_output(struct mi_writer *writer, int id,
const char *name, const char *current_session_name)
{
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)
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)
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_rotation_schedule(struct mi_writer *writer,
const struct lttng_rotation_schedule *schedule)
{
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_rotation_schedule_result(struct mi_writer *writer,
const struct lttng_rotation_schedule *schedule,
bool success)
return ret;
}
-LTTNG_HIDDEN
int mi_lttng_rotate(struct mi_writer *writer,
const char *session_name,
enum lttng_rotation_state rotation_state,
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;
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;
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;
/* 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;
/* 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);
#include <common/payload.h>
#include <common/payload-view.h>
-LTTNG_HIDDEN
struct lttng_notification *lttng_notification_create(
struct lttng_trigger *trigger,
struct lttng_evaluation *evaluation)
return notification;
}
-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 *src_view,
struct lttng_notification **notification)
#include "payload.h"
#include <stddef.h>
-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)
} : (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)
} : (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)
} : (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)
} : (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)
{
};
}
-LTTNG_HIDDEN
int lttng_payload_view_get_fd_handle_count(
const struct lttng_payload_view *payload_view)
{
return ret;
}
-LTTNG_HIDDEN
struct fd_handle *lttng_payload_view_pop_fd_handle(
struct lttng_payload_view *view)
{
*
* @view Payload to validate
*/
-LTTNG_HIDDEN
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);
* 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);
* 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);
* 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);
* 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);
*
* 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);
*
* 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);
fd_handle_put(fd_handle);
}
-LTTNG_HIDDEN
void lttng_payload_init(struct lttng_payload *payload)
{
LTTNG_ASSERT(payload);
release_fd_handle_ref);
}
-LTTNG_HIDDEN
int lttng_payload_copy(const struct lttng_payload *src_payload,
struct lttng_payload *dst_payload)
{
return ret;
}
-LTTNG_HIDDEN
void lttng_payload_reset(struct lttng_payload *payload)
{
if (!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)
{
* 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);
/*
* 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);
/**
*
* 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);
*
* Return a newly allocated lttng pipe on success or else NULL.
*/
-LTTNG_HIDDEN
struct lttng_pipe *lttng_pipe_open(int flags)
{
int ret;
*
* 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)
{
*
* Return 0 on success else a negative value.
*/
-LTTNG_HIDDEN
int lttng_pipe_read_close(struct lttng_pipe *pipe)
{
int ret;
*
* Return 0 on success else a negative value.
*/
-LTTNG_HIDDEN
int lttng_pipe_write_close(struct lttng_pipe *pipe)
{
int ret;
*
* Return 0 on success else a negative value.
*/
-LTTNG_HIDDEN
int lttng_pipe_close(struct lttng_pipe *pipe)
{
int ret, ret_val = 0;
/*
* Close and destroy a lttng pipe object. Finally, pipe is freed.
*/
-LTTNG_HIDDEN
void lttng_pipe_destroy(struct lttng_pipe *pipe)
{
int ret;
* 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;
* 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)
{
* 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;
* 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;
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 */
* 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;
}
}
-LTTNG_HIDDEN
ssize_t lttng_write(int fd, const void *buf, size_t count)
{
size_t i = 0;
* 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 */
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)
{
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)
{
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)
{
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;
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;
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;
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)
{
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)
{
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)
return ret;
}
-LTTNG_HIDDEN
int run_as_generate_filter_bytecode(const char *filter_expression,
const struct lttng_credentials *creds,
struct lttng_bytecode **bytecode)
return ret;
}
-LTTNG_HIDDEN
int run_as_create_worker(const char *procname,
post_fork_cleanup_cb clean_up_func,
void *clean_up_user_data)
return ret;
}
-LTTNG_HIDDEN
void run_as_destroy_worker(void)
{
pthread_mutex_lock(&worker_lock);
*/
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 */
free(descriptor);
}
-LTTNG_HIDDEN
ssize_t lttng_session_descriptor_create_from_buffer(
const struct lttng_buffer_view *payload,
struct lttng_session_descriptor **descriptor)
return ret;
}
-LTTNG_HIDDEN
int lttng_session_descriptor_serialize(
const struct lttng_session_descriptor *descriptor,
struct lttng_dynamic_buffer *buffer)
return ret;
}
-LTTNG_HIDDEN
enum lttng_session_descriptor_type
lttng_session_descriptor_get_type(
const struct lttng_session_descriptor *descriptor)
return descriptor->type;
}
-LTTNG_HIDDEN
enum lttng_session_descriptor_output_type
lttng_session_descriptor_get_output_type(
const struct lttng_session_descriptor *descriptor)
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)
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,
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)
return status;
}
-LTTNG_HIDDEN
int lttng_session_descriptor_set_session_name(
struct lttng_session_descriptor *descriptor,
const char *name)
return ret;
}
-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)
{
return false;
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_session_descriptor_set_default_output(
struct lttng_session_descriptor *descriptor,
time_t *session_creation_time,
* 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)
/*
* Creates an PF_INET socket.
*/
-LTTNG_HIDDEN
int lttcomm_create_inet_sock(struct lttcomm_sock *sock, int type, int proto)
{
int val = 1, ret;
/*
* Bind socket and return.
*/
-LTTNG_HIDDEN
int lttcomm_bind_inet_sock(struct lttcomm_sock *sock)
{
return bind(sock->fd,
/*
* Connect PF_INET socket.
*/
-LTTNG_HIDDEN
int lttcomm_connect_inet_sock(struct lttcomm_sock *sock)
{
int ret, closeret;
* 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;
/*
* 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;
*
* 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)
{
*
* 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)
{
/*
* Shutdown cleanly and close.
*/
-LTTNG_HIDDEN
int lttcomm_close_inet_sock(struct lttcomm_sock *sock)
{
int ret;
return val;
}
-LTTNG_HIDDEN
void lttcomm_inet_init(void)
{
unsigned long syn_retries, fin_timeout, syn_timeout, env;
/*
* Creates an PF_INET socket.
*/
-LTTNG_HIDDEN
int lttcomm_create_inet6_sock(struct lttcomm_sock *sock, int type, int proto)
{
int val = 1, ret;
/*
* Bind socket and return.
*/
-LTTNG_HIDDEN
int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock)
{
return bind(sock->fd,
/*
* Connect PF_INET socket.
*/
-LTTNG_HIDDEN
int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock)
{
int ret, closeret;
* 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;
/*
* 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;
*
* 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)
{
*
* 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)
{
/*
* Shutdown cleanly and close.
*/
-LTTNG_HIDDEN
int lttcomm_close_inet6_sock(struct lttcomm_sock *sock)
{
int ret;
*
* 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;
* 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;
/*
* Return allocated lttcomm socket structure.
*/
-LTTNG_HIDDEN
struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto)
{
struct lttcomm_sock *sock;
* 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;
* 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 */
/*
* Init IPv4 sockaddr structure.
*/
-LTTNG_HIDDEN
int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr,
const char *ip, unsigned int port)
{
/*
* Init IPv6 sockaddr structure.
*/
-LTTNG_HIDDEN
int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr,
const char *ip, unsigned int port)
{
/*
* Return allocated lttcomm socket structure from lttng URI.
*/
-LTTNG_HIDDEN
struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri)
{
int ret;
/*
* Destroy and free lttcomm socket.
*/
-LTTNG_HIDDEN
void lttcomm_destroy_sock(struct lttcomm_sock *sock)
{
free(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)
{
/*
* Set socket receiving timeout.
*/
-LTTNG_HIDDEN
int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec)
{
int ret;
/*
* Set socket sending timeout.
*/
-LTTNG_HIDDEN
int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
int lttcomm_sock_get_port(const struct lttcomm_sock *sock, uint16_t *port)
{
LTTNG_ASSERT(sock);
return 0;
}
-LTTNG_HIDDEN
int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port)
{
LTTNG_ASSERT(sock);
return 0;
}
-LTTNG_HIDDEN
void lttcomm_init(void)
{
const char *env;
}
}
-LTTNG_HIDDEN
unsigned long lttcomm_get_network_timeout(void)
{
return network_timeout;
#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 */
* 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;
/*
* 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];
#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 */
#include <stdlib.h>
-LTTNG_HIDDEN
bool lttng_snapshot_output_validate(const struct lttng_snapshot_output *output)
{
bool valid = false;
return valid;
}
-LTTNG_HIDDEN
bool lttng_snapshot_output_is_equal(
const struct lttng_snapshot_output *a,
const struct lttng_snapshot_output *b)
char data_url[PATH_MAX];
} LTTNG_PACKED;
-LTTNG_HIDDEN
int lttng_snapshot_output_serialize(
const struct lttng_snapshot_output *output,
struct lttng_payload *payload)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_snapshot_output_create_from_payload(
struct lttng_payload_view *view,
struct lttng_snapshot_output **output_p)
return ret;
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_snapshot_output_mi_serialize(
const struct lttng_snapshot_output *output,
struct mi_writer *writer)
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);
* 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;
* 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) &
* 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) &
* 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;
* 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;
*
* Returns -1 if there's an error.
*/
-LTTNG_HIDDEN
int strutils_split(const char *input,
char delim,
bool escape_delim,
return ret;
}
-LTTNG_HIDDEN
size_t strutils_array_of_strings_len(char * const *array)
{
char * const *item;
#include <common/macros.h>
#include <common/dynamic-array.h>
-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 */
* 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 */
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;
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 +
}
}
-LTTNG_HIDDEN
int time_to_iso8601_str(time_t time, char *str, size_t len)
{
int ret = 0;
return ret;
}
-LTTNG_HIDDEN
int time_to_datetime_str(time_t time, char *str, size_t len)
{
int ret = 0;
#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"
* 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);
/*
*
* 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 */
*
* 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);
/*
* (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);
*
* 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);
*
* 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,
*
* 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);
*
* 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);
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)
{
return NULL;
}
-LTTNG_HIDDEN
void lttng_trace_chunk_set_fd_tracker(struct lttng_trace_chunk *chunk,
struct fd_tracker *fd_tracker)
{
chunk->fd_tracker = fd_tracker;
}
-LTTNG_HIDDEN
struct lttng_trace_chunk *lttng_trace_chunk_copy(
struct lttng_trace_chunk *source_chunk)
{
return NULL;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_get_id(
struct lttng_trace_chunk *chunk, uint64_t *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)
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_get_close_timestamp(
struct lttng_trace_chunk *chunk, time_t *close_ts)
{
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_set_close_timestamp(
struct lttng_trace_chunk *chunk, time_t close_ts)
{
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)
return status;
}
-LTTNG_HIDDEN
bool lttng_trace_chunk_get_name_overridden(struct lttng_trace_chunk *chunk)
{
bool name_overridden;
return true;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_override_name(
struct lttng_trace_chunk *chunk, const char *name)
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_rename_path(
struct lttng_trace_chunk *chunk, const char *path)
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_get_credentials(
struct lttng_trace_chunk *chunk,
struct lttng_credentials *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)
return status;
}
-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)
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)
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status
lttng_trace_chunk_get_session_output_directory_handle(
struct lttng_trace_chunk *chunk,
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)
return ret;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_create_subdirectory(
struct lttng_trace_chunk *chunk,
const char *path)
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_open_fs_handle(
struct lttng_trace_chunk *chunk,
const char *file_path,
return status;
}
-LTTNG_HIDDEN
enum lttng_trace_chunk_status lttng_trace_chunk_open_file(
struct lttng_trace_chunk *chunk,
const char *file_path,
return status;
}
-LTTNG_HIDDEN
int lttng_trace_chunk_unlink_file(struct lttng_trace_chunk *chunk,
const char *file_path)
{
}
}
-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)
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)
return status;
}
-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)
{
return equal;
}
-LTTNG_HIDDEN
bool lttng_trace_chunk_get(struct lttng_trace_chunk *chunk)
{
return urcu_ref_get_unless_zero(&chunk->ref);
}
}
-LTTNG_HIDDEN
void lttng_trace_chunk_put(struct lttng_trace_chunk *chunk)
{
if (!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;
return NULL;
}
-LTTNG_HIDDEN
void lttng_trace_chunk_registry_destroy(
struct lttng_trace_chunk_registry *registry)
{
return element;
}
-LTTNG_HIDDEN
struct lttng_trace_chunk *
lttng_trace_chunk_registry_publish_chunk(
struct lttng_trace_chunk_registry *registry,
return published_chunk;
}
-LTTNG_HIDDEN
struct lttng_trace_chunk *
lttng_trace_chunk_registry_find_chunk(
const struct lttng_trace_chunk_registry *registry,
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)
return ret;
}
-LTTNG_HIDDEN
struct lttng_trace_chunk *
lttng_trace_chunk_registry_find_anonymous_chunk(
const struct lttng_trace_chunk_registry *registry,
session_id, NULL);
}
-LTTNG_HIDDEN
unsigned int lttng_trace_chunk_registry_put_each_chunk(
const struct lttng_trace_chunk_registry *registry)
{
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);
* 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,
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,
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 */
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,
return ret;
}
-LTTNG_HIDDEN
const char *lttng_process_attr_to_string(enum lttng_process_attr process_attr)
{
switch (process_attr) {
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));
return values;
}
-LTTNG_HIDDEN
unsigned int _lttng_process_attr_values_get_count(
const struct lttng_process_attr_values *values)
{
&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)
return ret;
}
-LTTNG_HIDDEN
int lttng_process_attr_values_serialize(
const struct lttng_process_attr_values *values,
struct lttng_dynamic_buffer *buffer)
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_process_attr_values_create_from_buffer(
enum lttng_domain_type domain,
enum lttng_process_attr process_attr,
return -1;
}
-LTTNG_HIDDEN
void lttng_process_attr_values_destroy(struct lttng_process_attr_values *values)
{
if (!values) {
free(values);
}
-LTTNG_HIDDEN
struct process_attr_value *process_attr_value_copy(
const struct process_attr_value *value)
{
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);
return hash;
}
-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)
{
if (!value) {
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,
#include <lttng/trigger/trigger-internal.h>
#include <pthread.h>
-LTTNG_HIDDEN
bool lttng_trigger_validate(const struct lttng_trigger *trigger)
{
bool valid;
lttng_trigger_put(trigger);
}
-LTTNG_HIDDEN
ssize_t lttng_trigger_create_from_payload(
struct lttng_payload_view *src_view,
struct lttng_trigger **_trigger)
* 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)
{
return ret;
}
-LTTNG_HIDDEN
bool lttng_trigger_is_equal(
const struct lttng_trigger *a, const struct lttng_trigger *b)
{
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)
{
return status;
}
-LTTNG_HIDDEN
int lttng_trigger_assign_name(struct lttng_trigger *dst,
const struct lttng_trigger *src)
{
return ret;
}
-LTTNG_HIDDEN
void lttng_trigger_set_tracer_token(struct lttng_trigger *trigger,
uint64_t token)
{
LTTNG_OPTIONAL_SET(&trigger->tracer_token, token);
}
-LTTNG_HIDDEN
uint64_t lttng_trigger_get_tracer_token(const struct lttng_trigger *trigger)
{
LTTNG_ASSERT(trigger);
return LTTNG_OPTIONAL_GET(trigger->tracer_token);
}
-LTTNG_HIDDEN
int lttng_trigger_generate_name(struct lttng_trigger *trigger,
uint64_t unique_id)
{
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) {
lttng_trigger_put(trigger);
}
-LTTNG_HIDDEN
struct lttng_triggers *lttng_triggers_create(void)
{
struct lttng_triggers *triggers = NULL;
return triggers;
}
-LTTNG_HIDDEN
struct lttng_trigger *lttng_triggers_borrow_mutable_at_index(
const struct lttng_triggers *triggers, unsigned int index)
{
return trigger;
}
-LTTNG_HIDDEN
int lttng_triggers_add(
struct lttng_triggers *triggers, struct lttng_trigger *trigger)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_triggers_remove_hidden_triggers(struct lttng_triggers *triggers)
{
int ret;
return ret;
}
-LTTNG_HIDDEN
ssize_t lttng_triggers_create_from_payload(
struct lttng_payload_view *src_view,
struct lttng_triggers **triggers)
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)
{
return ret;
}
-LTTNG_HIDDEN
enum lttng_domain_type lttng_trigger_get_underlying_domain_type_restriction(
const struct lttng_trigger *trigger)
{
* 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)
return ret;
}
-LTTNG_HIDDEN
struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger)
{
int ret;
return copy;
}
-LTTNG_HIDDEN
bool lttng_trigger_needs_tracer_notifier(const struct lttng_trigger *trigger)
{
bool needs_tracer_notifier = false;
return needs_tracer_notifier;
}
-LTTNG_HIDDEN
void lttng_trigger_set_as_registered(struct lttng_trigger *trigger)
{
pthread_mutex_lock(&trigger->lock);
pthread_mutex_unlock(&trigger->lock);
}
-LTTNG_HIDDEN
void lttng_trigger_set_as_unregistered(struct lttng_trigger *trigger)
{
pthread_mutex_lock(&trigger->lock);
* 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
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
/*
* Connect to unix socket using the path name.
*/
-LTTNG_HIDDEN
int lttcomm_connect_unix_sock(const char *pathname)
{
struct sockaddr_un s_un;
* 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;
return new_fd;
}
-LTTNG_HIDDEN
int lttcomm_create_anon_unix_socketpair(int *fds)
{
if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds) < 0) {
* 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;
/*
* Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
*/
-LTTNG_HIDDEN
int lttcomm_listen_unix_sock(int sock)
{
int ret;
*
* Return the size of received data.
*/
-LTTNG_HIDDEN
ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
{
struct msghdr msg;
*
* 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;
*
* 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;
*
* 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;
/*
* Shutdown cleanly a unix socket.
*/
-LTTNG_HIDDEN
int lttcomm_close_unix_sock(int sock)
{
int ret, closeret;
*
* 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;
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)
{
*
* 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;
* 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];
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)
{
* 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];
*
* 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;
*
* 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)
{
* 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;
return ret;
}
#elif (defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__))
-LTTNG_HIDDEN
int lttcomm_setsockopt_creds_unix_sock(int sock)
{
return 0;
#include <common/payload.h>
#include <common/payload-view.h>
-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 */
/*
* 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;
*
* 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));
/*
* Free URI memory.
*/
-LTTNG_HIDDEN
void uri_free(struct lttng_uri *uri)
{
free(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;
* 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)
{
return ret;
}
-LTTNG_HIDDEN
int lttng_userspace_probe_location_serialize(
const struct lttng_userspace_probe_location *location,
struct lttng_payload *payload)
return ret;
}
-LTTNG_HIDDEN
int lttng_userspace_probe_location_create_from_payload(
struct lttng_payload_view *view,
struct lttng_userspace_probe_location **location)
return ret;
}
-LTTNG_HIDDEN
int lttng_userspace_probe_location_flatten(
const struct lttng_userspace_probe_location *location,
struct lttng_dynamic_buffer *buffer)
return ret;
}
-LTTNG_HIDDEN
struct lttng_userspace_probe_location *lttng_userspace_probe_location_copy(
const struct lttng_userspace_probe_location *location)
{
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)
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)
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)
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);
/*
* Create a pipe in dst.
*/
-LTTNG_HIDDEN
int utils_create_pipe(int *dst)
{
int ret;
* 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;
* 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;
/*
* Close both read and write side of the pipe.
*/
-LTTNG_HIDDEN
void utils_close_pipe(int *src)
{
int i, ret;
/*
* Create a new string using two strings range.
*/
-LTTNG_HIDDEN
char *utils_strdupdelim(const char *begin, const char *end)
{
char *str;
/*
* Set CLOEXEC flag to the give file descriptor.
*/
-LTTNG_HIDDEN
int utils_set_fd_cloexec(int fd)
{
int ret;
/*
* Create pid file to the given path and filename.
*/
-LTTNG_HIDDEN
int utils_create_pid_file(pid_t pid, const char *filepath)
{
int ret;
* 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;
*
* 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;
*
* 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;
*
* 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)
*
* @return 0 on success, -1 on failure.
*/
-LTTNG_HIDDEN
int utils_parse_size_suffix(const char * const str, uint64_t * const size)
{
int ret;
*
* @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;
* 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) {
* 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) {
* 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;
* 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;
*
* 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;
* 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;
* 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)
{
* 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;
return ret;
}
-LTTNG_HIDDEN
int utils_truncate_stream_file(int fd, off_t length)
{
int ret;
return DEFAULT_MAN_BIN_PATH;
}
-LTTNG_HIDDEN
int utils_show_help(int section, const char *page_name,
const char *help_msg)
{
* 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);
* 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;
return ret;
}
-LTTNG_HIDDEN
enum lttng_error_code utils_user_id_from_name(const char *user_name, uid_t *uid)
{
struct passwd p, *pres;
return ret_val;
}
-LTTNG_HIDDEN
enum lttng_error_code utils_group_id_from_name(
const char *group_name, gid_t *gid)
{
return ret_val;
}
-LTTNG_HIDDEN
int utils_parse_unsigned_long_long(const char *str,
unsigned long long *value)
{
* - `str` is zero length
* - `str` contains invalid
*/
-LTTNG_HIDDEN
int utils_parse_unsigned_long_long(const char *str,
unsigned long long *value);
typedef uint8_t lttng_uuid[LTTNG_UUID_LEN];
-LTTNG_HIDDEN
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 */
WAITER_TEARDOWN = (1 << 2),
};
-LTTNG_HIDDEN
void lttng_waiter_init(struct lttng_waiter *waiter)
{
cds_wfs_node_init(&waiter->wait_queue_node);
/*
* User must init "waiter" before passing its memory to waker thread.
*/
-LTTNG_HIDDEN
void lttng_waiter_wait(struct lttng_waiter *waiter)
{
unsigned int i;
* 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();
int32_t state;
};
-LTTNG_HIDDEN
void lttng_waiter_init(struct lttng_waiter *waiter);
-LTTNG_HIDDEN
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 */
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 \
--- /dev/null
+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
#include <common/sessiond-comm/sessiond-comm.h>
#include <lttng/lttng.h>
-/*
- * 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);
* 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);
*
* 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)
{
*
* If yes return 1, else return -1.
*/
-LTTNG_HIDDEN
int lttng_check_tracing_group(void)
{
gid_t *grp_list, tracing_gid;
*
* On success, return the socket's file descriptor. On error, return -1.
*/
-LTTNG_HIDDEN int connect_sessiond(void)
+int connect_sessiond(void)
{
int ret;
*
* 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,
return ret;
}
-LTTNG_HIDDEN
int lttng_ctl_ask_sessiond_payload(struct lttng_payload_view *message,
struct lttng_payload *reply)
{