X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmi-lttng.h;h=d655f6fb8a0266d41feacd0ed06d58df44fbfcfb;hp=ad92832368e8d4d35c6d21da878f457b3453483e;hb=0f7c296359bf90005e1dadf2d7a02a4b223a8031;hpb=1575be4a0f558cd7bb6e5d0a3e9410c4640c9ee5 diff --git a/src/common/mi-lttng.h b/src/common/mi-lttng.h index ad9283236..d655f6fb8 100644 --- a/src/common/mi-lttng.h +++ b/src/common/mi-lttng.h @@ -39,10 +39,29 @@ struct mi_lttng_version { char package_url[LTTNG_NAME_MAX]; /* Define to the home page for this package. */ }; +/* Error query callbacks. */ +typedef enum lttng_error_code (*mi_lttng_error_query_trigger_cb)( + const struct lttng_trigger *trigger, + struct lttng_error_query_results **results); +typedef enum lttng_error_code (*mi_lttng_error_query_condition_cb)( + const struct lttng_trigger *trigger, + struct lttng_error_query_results **results); +typedef enum lttng_error_code (*mi_lttng_error_query_action_cb)( + const struct lttng_trigger *trigger, + const struct lttng_action_path *action_path, + struct lttng_error_query_results **results); + +struct mi_lttng_error_query_callbacks { + mi_lttng_error_query_trigger_cb trigger_cb; + mi_lttng_error_query_condition_cb condition_cb; + mi_lttng_error_query_action_cb action_cb; +}; + /* Strings related to command */ 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; +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; @@ -57,6 +76,7 @@ extern const char * const mi_lttng_element_command_regenerate; extern const char * const mi_lttng_element_command_regenerate_action; extern const char * const mi_lttng_element_command_name; extern const char * const mi_lttng_element_command_output; +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; @@ -212,6 +232,170 @@ LTTNG_HIDDEN 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; +/* 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; + +LTTNG_HIDDEN extern const char + *const mi_lttng_element_rate_policy_every_n_interval; +LTTNG_HIDDEN 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 + *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 + *const mi_lttng_element_condition_buffer_usage_high; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_condition_buffer_usage_low; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_condition_event_rule_matches; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_condition_session_consumed_size; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_condition_session_rotation; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_condition_session_rotation_completed; +LTTNG_HIDDEN 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; + +/* 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; + +/* 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 + *const mi_lttng_element_event_expr_channel_context_field; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_event_expr_app_specific_context_field; +LTTNG_HIDDEN 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; + +/* String related to event rule */ +LTTNG_HIDDEN 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 + *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 + *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 + *const mi_lttng_element_event_rule_user_tracepoint; + +/* String related to lttng_event_rule_kernel_syscall. */ +LTTNG_HIDDEN 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 + mi_lttng_event_rule_kernel_syscall_emission_site_entry_exit; +LTTNG_HIDDEN extern const char + *const mi_lttng_event_rule_kernel_syscall_emission_site_entry; +LTTNG_HIDDEN extern const char + *const mi_lttng_event_rule_kernel_syscall_emission_site_exit; + +LTTNG_HIDDEN extern const char *const + mi_lttng_element_event_rule_user_tracepoint_name_pattern_exclusions; +LTTNG_HIDDEN 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 + *const mi_lttng_element_log_level_rule_at_least_as_severe_as; +LTTNG_HIDDEN 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; + +/* String related to kernel probe location. */ +LTTNG_HIDDEN extern const char *const mi_lttng_element_kernel_probe_location; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_kernel_probe_location_symbol_offset; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_kernel_probe_location_symbol_offset_name; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_kernel_probe_location_symbol_offset_offset; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_kernel_probe_location_address; +LTTNG_HIDDEN 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 + *const mi_lttng_element_userspace_probe_location_binary_path; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_userspace_probe_location_function; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_userspace_probe_location_function_name; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_userspace_probe_location_lookup_method; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_userspace_probe_location_lookup_method_function_default; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_userspace_probe_location_lookup_method_function_elf; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_userspace_probe_location_lookup_method_tracepoint_sdt; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_userspace_probe_location_tracepoint; +LTTNG_HIDDEN extern const char *const + mi_lttng_element_userspace_probe_location_tracepoint_probe_name; +LTTNG_HIDDEN 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 + mi_lttng_element_userspace_probe_location_function_instrumentation_type; +LTTNG_HIDDEN 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; + +/* String related to error_query. */ +LTTNG_HIDDEN extern const char *const mi_lttng_element_error_query_result; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_error_query_result_counter; +LTTNG_HIDDEN extern const char + *const mi_lttng_element_error_query_result_counter_value; +LTTNG_HIDDEN 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; + /* String related to add-context command */ LTTNG_HIDDEN extern const char * const mi_lttng_element_context_symbol; @@ -792,7 +976,7 @@ int mi_lttng_snapshot_output_session_name(struct mi_writer *writer, * Negative values indicate an error. */ int mi_lttng_snapshot_list_output(struct mi_writer *writer, - struct lttng_snapshot_output *output); + const struct lttng_snapshot_output *output); /* * Machine interface of the output of the command snapshot del output