f7d3c48f8d078afd83eb4f015c3d6cb8ad3e3c72
2 * Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include <common/hashtable/hashtable.h>
25 #include <lttng/lttng.h>
28 * Hash table that contains the JUL app created upon registration indexed by
31 struct lttng_ht
*jul_apps_ht_by_sock
;
34 * Registration message payload from a JUL application. The PID is used to find
35 * back the corresponding UST app object so both socket can be linked.
37 struct jul_register_msg
{
42 * JUL application object created after a successful registration. This object
43 * is kept inside an UST app.
47 * PID sent during registration of a JUL application.
52 * JUL TCP socket that was created upon registration.
54 struct lttcomm_sock
*sock
;
57 * Associated UST app. socket. To get a reference to the ust application
58 * object corresponding to that socket, a lookup MUST be done each time
59 * since there is important synchronization issue for the lockless hash
60 * table shared accross multiple threads.
64 /* Initialized with the JUL sock value. */
65 struct lttng_ht_node_ulong node
;
69 * Java Util Logging event representation.
73 * Name of the event which is directly mapped to a Logger object name in
76 char name
[LTTNG_SYMBOL_NAME_LEN
];
79 * Tells if the event is enabled or not on the JUL Agent.
81 unsigned int enabled
:1;
84 * Hash table nodes of the JUL domain. Indexed by name string.
86 struct lttng_ht_node_str node
;
90 * Top level data structure in a UST session containing JUL event name created
95 * Contains JUL event indexed by name.
97 struct lttng_ht
*events
;
100 /* Initialize JUL domain subsystem. */
103 /* Initialize an already allocated JUL domain. */
104 int jul_init_domain(struct jul_domain
*dom
);
105 void jul_destroy_domain(struct jul_domain
*dom
);
108 struct jul_event
*jul_create_event(const char *name
);
109 void jul_add_event(struct jul_event
*event
, struct jul_domain
*dom
);
110 struct jul_event
*jul_find_by_name(const char *name
, struct jul_domain
*dom
);
111 void jul_delete_event(struct jul_event
*event
, struct jul_domain
*dom
);
112 void jul_destroy_event(struct jul_event
*event
);
115 struct jul_app
*jul_create_app(pid_t pid
, struct lttcomm_sock
*sock
);
116 void jul_add_app(struct jul_app
*app
);
117 void jul_delete_app(struct jul_app
*app
);
118 struct jul_app
*jul_find_app_by_sock(int sock
);
119 void jul_attach_app(struct jul_app
*japp
);
120 void jul_detach_app(struct jul_app
*app
);
121 void jul_destroy_app(struct jul_app
*app
);
124 int jul_enable_event(struct jul_event
*event
);
125 int jul_disable_event(struct jul_event
*event
);
126 void jul_update(struct jul_domain
*domain
, int sock
);
This page took 0.05148 seconds and 4 git commands to generate.