X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Flttng%2Flttng.h;h=bd8cf45a8414e0a450ccc01398804be76c89f6eb;hb=4b2221858653255be812d5a4e55c2ec05ec1819e;hp=f92716cd495b8e3b38f6253fd4f7fa7ac2f0b6a4;hpb=82a3637f639486c07ff937ab03e1e9532379d26a;p=lttng-tools.git diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index f92716cd4..bd8cf45a8 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -5,11 +5,6 @@ * * Copyright (C) 2011 - David Goulet * - * LGPL-compatible code should include this header with : - * - * #define _LGPL_SOURCE - * #include - * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; only @@ -63,14 +58,6 @@ enum lttng_domain_type { LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN, }; -struct lttng_domain { - enum lttng_domain_type type; - union { - pid_t pid; - char exec_name[NAME_MAX]; - } attr; -}; - /* * Instrumentation type of tracing event. */ @@ -78,6 +65,7 @@ enum lttng_event_type { LTTNG_EVENT_TRACEPOINT, LTTNG_EVENT_PROBE, LTTNG_EVENT_FUNCTION, + LTTNG_EVENT_FUNCTION_ENTRY, }; /* @@ -102,6 +90,14 @@ enum lttng_event_context_type { LTTNG_EVENT_CONTEXT_VPPID = 9, }; +struct lttng_domain { + enum lttng_domain_type type; + union { + pid_t pid; + char exec_name[NAME_MAX]; + } attr; +}; + /* Perf counter attributes */ struct lttng_event_perf_counter_ctx { uint32_t type; @@ -142,6 +138,7 @@ struct lttng_event_function_attr { struct lttng_event { char name[LTTNG_SYMBOL_NAME_LEN]; enum lttng_event_type type; + uint32_t enabled; /* Per event type configuration */ union { struct lttng_event_probe_attr probe; @@ -166,6 +163,7 @@ struct lttng_channel_attr { */ struct lttng_channel { char name[NAME_MAX]; + uint32_t enabled; struct lttng_channel_attr attr; }; @@ -213,13 +211,44 @@ extern int lttng_create_session(const char *name, const char *path); extern int lttng_destroy_session(const char *name); /* - * List tracing sessions. + * List all tracing sessions. * - * Return the size of the "lttng_session" array. Caller must free(3) the - * returned data. + * Return the size of the "lttng_session" array. Caller must free(3). */ extern int lttng_list_sessions(struct lttng_session **sessions); +/* + * List registered domain(s) of the session. + * + * Return the size of the "lttng_domain" array. Caller must free(3). + */ +extern int lttng_list_domains(const char *session_name, + struct lttng_domain **domains); + +/* + * List channel(s) of a session. + * + * Return the size of the "lttng_channel" array. Caller must free(3). + */ +extern int lttng_list_channels(struct lttng_domain *domain, + const char *session_name, struct lttng_channel **channels); + +/* + * List event(s) of a session channel. + * + * Return the size of the "lttng_event" array. Caller must free(3). + */ +extern int lttng_list_events(struct lttng_domain *domain, + const char *session_name, const char *channel_name, + struct lttng_event **events); + +/* + * List available kernel tracing events + * + * Return the size of the "lttng_event" array. Caller must free(3). + */ +extern int lttng_list_kernel_events(struct lttng_event **events); + /* * Check if a session daemon is alive. */ @@ -308,6 +337,6 @@ extern int lttng_disable_channel(struct lttng_domain *domain, * * Return the size of the allocated event list. Caller must free(3) the data. */ -extern int lttng_list_events(struct lttng_domain *domain, char **event_list); +//extern int lttng_list_events(struct lttng_domain *domain, char **event_list); #endif /* _LTTNG_H */