X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=a067480b0bc8cff9aa9d9389680432f313f715a0;hb=de774d109ecb14831270cd3f514ed68bb6ea4e69;hp=af76f2678021b721493c556f1427e09472a29952;hpb=d26228ae208d9a5e9484c17a36c4efaf373bf474;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index af76f267..a067480b 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -2,19 +2,18 @@ * Copyright (C) 2011 - Julien Desfossez * Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; only version 2 - * of the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License only. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _LTTNG_UST_CTL_H @@ -22,6 +21,11 @@ #include +/* + * Error values: all the following functions return: + * >= 0: Success (LTTNG_UST_OK) + * < 0: error code. + */ int ustctl_register_done(int sock); int ustctl_create_session(int sock); int ustctl_open_metadata(int sock, int session_handle, @@ -30,20 +34,29 @@ int ustctl_open_metadata(int sock, int session_handle, int ustctl_create_channel(int sock, int session_handle, struct lttng_ust_channel_attr *chops, struct lttng_ust_object_data **channel_data); -int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data, - struct lttng_ust_object_data **stream_data); int ustctl_create_event(int sock, struct lttng_ust_event *ev, struct lttng_ust_object_data *channel_data, struct lttng_ust_object_data **event_data); int ustctl_add_context(int sock, struct lttng_ust_context *ctx, struct lttng_ust_object_data *obj_data, struct lttng_ust_object_data **context_data); +int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode, + struct lttng_ust_object_data *obj_data); int ustctl_enable(int sock, struct lttng_ust_object_data *object); int ustctl_disable(int sock, struct lttng_ust_object_data *object); int ustctl_start_session(int sock, int handle); int ustctl_stop_session(int sock, int handle); +/* + * Return -LTTNG_UST_ERR_NOENT if no more stream is available for creation. + * Return 0 on success. + * Return negative error value on system error. + * Return positive error value on UST error. + */ +int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data, + struct lttng_ust_object_data **stream_data); + /* * ustctl_tracepoint_list returns a tracepoint list handle, or negative * error value. @@ -51,16 +64,31 @@ int ustctl_stop_session(int sock, int handle); int ustctl_tracepoint_list(int sock); /* * ustctl_tracepoint_list_get is used to iterate on the tp list - * handle. End is iteration is reached when -ENOENT is returned. + * handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is + * returned. */ int ustctl_tracepoint_list_get(int sock, int tp_list_handle, - char iter[LTTNG_UST_SYM_NAME_LEN]); + struct lttng_ust_tracepoint_iter *iter); + +/* + * ustctl_tracepoint_field_list returns a tracepoint field list handle, + * or negative error value. + */ +int ustctl_tracepoint_field_list(int sock); + +/* + * ustctl_tracepoint_field_list_get is used to iterate on the tp field + * list handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is + * returned. + */ +int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle, + struct lttng_ust_field_iter *iter); int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v); int ustctl_wait_quiescent(int sock); -/* not implemented yet */ -struct lttng_ust_calibrate; +int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object); + int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate); /* @@ -129,7 +157,9 @@ void ustctl_flush_buffer(struct lttng_ust_shm_handle *handle, struct lttng_ust_lib_ring_buffer *buf, int producer_active); -/* Release object created by members of this API */ +/* Release object created by members of this API. */ int ustctl_release_object(int sock, struct lttng_ust_object_data *data); +/* Release handle returned by create session. */ +int ustctl_release_handle(int sock, int handle); #endif /* _LTTNG_UST_CTL_H */