X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fjul.h;h=0a0c8ef0eb3e90aa6c057b77a05eb11956487b17;hb=be6a6276f221b9bc83c16e3c3ba6ca76f5f35350;hp=4aa0ef144dbbb78f33fb8aa07f095cb30f02fb04;hpb=6657149e7451a23a65cf0170e4458201454a8851;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/jul.h b/src/bin/lttng-sessiond/jul.h index 4aa0ef144..0a0c8ef0e 100644 --- a/src/bin/lttng-sessiond/jul.h +++ b/src/bin/lttng-sessiond/jul.h @@ -15,8 +15,8 @@ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef _JUL_H -#define _JUL_H +#ifndef LTTNG_SESSIOND_JUL_H +#define LTTNG_SESSIOND_JUL_H #define _GNU_SOURCE #include @@ -30,6 +30,11 @@ */ struct lttng_ht *jul_apps_ht_by_sock; +struct jul_ht_key { + const char *name; + enum lttng_loglevel_jul loglevel; +}; + /* * Registration message payload from a JUL application. The PID is used to find * back the corresponding UST app object so both socket can be linked. @@ -54,14 +59,6 @@ struct jul_app { */ struct lttcomm_sock *sock; - /* - * Associated UST app. socket. To get a reference to the ust application - * object corresponding to that socket, a lookup MUST be done each time - * since there is important synchronization issue for the lockless hash - * table shared accross multiple threads. - */ - int ust_app_sock; - /* Initialized with the JUL sock value. */ struct lttng_ht_node_ulong node; }; @@ -75,6 +72,8 @@ struct jul_event { * the JUL API. */ char name[LTTNG_SYMBOL_NAME_LEN]; + enum lttng_loglevel_jul loglevel; + enum lttng_loglevel_type loglevel_type; /* * Tells if the event is enabled or not on the JUL Agent. @@ -85,6 +84,9 @@ struct jul_event { * Hash table nodes of the JUL domain. Indexed by name string. */ struct lttng_ht_node_str node; + + /* Bytecode filter associated with the event . NULL if none. */ + struct lttng_filter_bytecode *filter; }; /* @@ -113,9 +115,13 @@ int jul_init_domain(struct jul_domain *dom); void jul_destroy_domain(struct jul_domain *dom); /* JUL event API. */ -struct jul_event *jul_create_event(const char *name); +struct jul_event *jul_create_event(const char *name, + struct lttng_filter_bytecode *filter); void jul_add_event(struct jul_event *event, struct jul_domain *dom); -struct jul_event *jul_find_by_name(const char *name, struct jul_domain *dom); +struct jul_event *jul_find_event(const char *name, + enum lttng_loglevel_jul loglevel, struct jul_domain *dom); +struct jul_event *jul_find_event_by_name(const char *name, + struct jul_domain *dom); void jul_delete_event(struct jul_event *event, struct jul_domain *dom); void jul_destroy_event(struct jul_event *event); @@ -124,9 +130,8 @@ struct jul_app *jul_create_app(pid_t pid, struct lttcomm_sock *sock); void jul_add_app(struct jul_app *app); void jul_delete_app(struct jul_app *app); struct jul_app *jul_find_app_by_sock(int sock); -void jul_attach_app(struct jul_app *japp); -void jul_detach_app(struct jul_app *app); void jul_destroy_app(struct jul_app *app); +int jul_send_registration_done(struct jul_app *app); /* JUL action API */ int jul_enable_event(struct jul_event *event); @@ -134,4 +139,4 @@ int jul_disable_event(struct jul_event *event); void jul_update(struct jul_domain *domain, int sock); int jul_list_events(struct lttng_event **events); -#endif /* _JUL_H */ +#endif /* LTTNG_SESSIOND_JUL_H */