X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmi-lttng.h;h=4b2b035e04a66d1d55c9036103975e3ce90a3612;hp=6151118ca63ebec5020b446d2b2b240985166857;hb=acc0921507a42345aa6b032231180c7c6999f55a;hpb=e5b83100577f6b378e89c8c7ccbba5892be9d50a diff --git a/src/common/mi-lttng.h b/src/common/mi-lttng.h index 6151118ca..4b2b035e0 100644 --- a/src/common/mi-lttng.h +++ b/src/common/mi-lttng.h @@ -47,13 +47,18 @@ struct mi_lttng_version { /* Strings related to command */ const char * const mi_lttng_element_command; +const char * const mi_lttng_element_command_name; const char * const mi_lttng_element_command_version; const char * const mi_lttng_element_command_list; const char * const mi_lttng_element_command_save; const char * const mi_lttng_element_command_load; const char * const mi_lttng_element_command_stop; -const char * const mi_lttng_element_command_name; const char * const mi_lttng_element_command_start; +const char * const mi_lttng_element_command_create; +const char * const mi_lttng_element_command_destroy; +const char * const mi_lttng_element_command_calibrate; +const char * const mi_lttng_element_command_add_context; +const char * const mi_lttng_element_command_enable_channels; const char * const mi_lttng_element_command_output; const char * const mi_lttng_element_command_success; @@ -72,6 +77,14 @@ const char * const mi_lttng_element_version_description; const char * const mi_lttng_element_event_field; const char * const mi_lttng_element_event_fields; +/* String related to lttng_event_context */ +const char * const mi_lttng_context_type_perf_counter; +const char * const mi_lttng_context_type_perf_cpu_counter; +const char * const mi_lttng_context_type_perf_thread_counter; + +/* String related to lttng_event_perf_counter_ctx */ +const char * const mi_lttng_element_perf_counter_context; + /* Strings related to pid */ const char * const mi_lttng_element_pids; const char * const mi_lttng_element_pid; @@ -90,6 +103,7 @@ const char * const mi_lttng_element_type_enum; const char * const mi_lttng_element_type_float; const char * const mi_lttng_element_type_string; const char * const mi_lttng_element_nowrite; +const char * const mi_lttng_element_success; /* String related to loglevel */ const char * const mi_lttng_loglevel_str_alert; @@ -115,12 +129,17 @@ const char * const mi_lttng_loglevel_type_range; const char * const mi_lttng_loglevel_type_single; const char * const mi_lttng_loglevel_type_unknown; +/* Sting related to lttng_calibrate */ +const char * const mi_lttng_element_calibrate; +const char * const mi_lttng_element_calibrate_function; + /* Utility string function */ const char *mi_lttng_loglevel_string(int value); const char *mi_lttng_logleveltype_string(enum lttng_loglevel_type value); const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type value); const char *mi_lttng_domaintype_string(enum lttng_domain_type value); const char *mi_lttng_buffertype_string(enum lttng_buffer_type value); +const char *mi_lttng_calibratetype_string(enum lttng_calibrate_type val); /* * Create an instance of a machine interface writer. @@ -475,7 +494,7 @@ int mi_lttng_event_field(struct mi_writer *writer, * * writer An instance of a machine interface writer. * - * Returns zero if the element's value could be written. + * Returns zero if the element could be written. * Negative values indicate an error. */ int mi_lttng_event_fields_open(struct mi_writer *writer); @@ -508,4 +527,48 @@ int mi_lttng_pids_open(struct mi_writer *writer); int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *cmdline, int is_open); +/* + * Machine interface for struct lttng_calibrate. + * + * writer An instance of a machine interface writer. + * + * calibrate A lttng_calibrate instance. + * + * Returns zero if the element's value could be written. + * Negative values indicate an error. + */ +int mi_lttng_calibrate(struct mi_writer *writer, + struct lttng_calibrate *calibrate); + +/* + * Machine interface of a context. + * + * writer An instance of a machine interface writer + * + * context An instance of a lttng_event_context + * + * is_open Define if we close the context element + * This should be used carefully and the client + * need to close the context element. + * 0-> False + * 1-> True + * Returns zero if the element's value could be written. + * Negative values indicate an error. + */ +int mi_lttng_context(struct mi_writer *writer, + struct lttng_event_context *context, int is_open); + +/* + * Machine interface of a perf_counter_context. + * + * writer An instance of a machine interface writer + * + * contest An instance of a lttng_event_perf_counter_ctx + * + * Returns zero if the element's value could be written. + * Negative values indicate an error. + */ +int mi_lttng_perf_counter_context(struct mi_writer *writer, + struct lttng_event_perf_counter_ctx *perf_context); + #endif /* _MI_LTTNG_H */