projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce application contexts to session configuration schema
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-app.h
diff --git
a/src/bin/lttng-sessiond/ust-app.h
b/src/bin/lttng-sessiond/ust-app.h
index aa66059adafb5aaa2d0270f0f0634ca3414b34b6..4398fe2414a68707f5fc9352b1b5eab0cfb0214c 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.h
+++ b/
src/bin/lttng-sessiond/ust-app.h
@@
-1,5
+1,6
@@
/*
* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
/*
* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 only,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 only,
@@
-15,7
+16,7
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef _LTT_UST_APP_H
+#ifndef _LTT_UST_APP_H
#define _LTT_UST_APP_H
#include <stdint.h>
#define _LTT_UST_APP_H
#include <stdint.h>
@@
-48,7
+49,7
@@
struct ust_app_notify_sock_obj {
struct ust_app_ht_key {
const char *name;
const struct lttng_filter_bytecode *filter;
struct ust_app_ht_key {
const char *name;
const struct lttng_filter_bytecode *filter;
- enum lttng_ust_loglevel_type loglevel;
+ enum lttng_ust_loglevel_type loglevel
_type
;
const struct lttng_event_exclusion *exclusion;
};
const struct lttng_event_exclusion *exclusion;
};
@@
-101,7
+102,7
@@
struct ust_app_stream_list {
struct ust_app_ctx {
int handle;
struct ust_app_ctx {
int handle;
- struct lttng_ust_context ctx;
+ struct lttng_ust_context
_attr
ctx;
struct lttng_ust_object_data *obj;
struct lttng_ht_node_ulong node;
struct cds_list_head list;
struct lttng_ust_object_data *obj;
struct lttng_ht_node_ulong node;
struct cds_list_head list;
@@
-182,6
+183,8
@@
struct ust_app_session {
int started; /* allows detection of start vs restart. */
int handle; /* used has unique identifier for app session */
int started; /* allows detection of start vs restart. */
int handle; /* used has unique identifier for app session */
+ bool deleted; /* Session deleted flag. Check with lock held. */
+
/*
* Tracing session ID. Multiple ust app session can have the same tracing
* session id making this value NOT unique to the object.
/*
* Tracing session ID. Multiple ust app session can have the same tracing
* session id making this value NOT unique to the object.
@@
-190,6
+193,11
@@
struct ust_app_session {
uint64_t id; /* Unique session identifier */
struct lttng_ht *channels; /* Registered channels */
struct lttng_ht_node_u64 node;
uint64_t id; /* Unique session identifier */
struct lttng_ht *channels; /* Registered channels */
struct lttng_ht_node_u64 node;
+ /*
+ * Node indexed by UST session object descriptor (handle). Stored in the
+ * ust_sessions_objd hash table in the ust_app object.
+ */
+ struct lttng_ht_node_ulong ust_objd_node;
char path[PATH_MAX];
/* UID/GID of the application owning the session */
uid_t uid;
char path[PATH_MAX];
/* UID/GID of the application owning the session */
uid_t uid;
@@
-225,6
+233,8
@@
struct ust_app_session {
*/
struct ust_app {
int sock;
*/
struct ust_app {
int sock;
+ pthread_mutex_t sock_lock; /* Protects sock protocol. */
+
int notify_sock;
pid_t pid;
pid_t ppid;
int notify_sock;
pid_t pid;
pid_t ppid;
@@
-268,6
+278,10
@@
struct ust_app {
* Hash table containing ust_app_channel indexed by channel objd.
*/
struct lttng_ht *ust_objd;
* Hash table containing ust_app_channel indexed by channel objd.
*/
struct lttng_ht *ust_objd;
+ /*
+ * Hash table containing ust_app_session indexed by objd.
+ */
+ struct lttng_ht *ust_sessions_objd;
/*
* If this application is of the agent domain and this is non negative then
/*
* If this application is of the agent domain and this is non negative then
@@
-281,11
+295,7
@@
struct ust_app {
#ifdef HAVE_LIBLTTNG_UST_CTL
int ust_app_register(struct ust_register_msg *msg, int sock);
#ifdef HAVE_LIBLTTNG_UST_CTL
int ust_app_register(struct ust_register_msg *msg, int sock);
-static inline
-int ust_app_register_done(int sock)
-{
- return ustctl_register_done(sock);
-}
+int ust_app_register_done(struct ust_app *app);
int ust_app_version(struct ust_app *app);
void ust_app_unregister(int sock);
int ust_app_start_trace_all(struct ltt_ust_session *usess);
int ust_app_version(struct ust_app *app);
void ust_app_unregister(int sock);
int ust_app_start_trace_all(struct ltt_ust_session *usess);
@@
-379,7
+389,7
@@
int ust_app_register(struct ust_register_msg *msg, int sock)
return -ENOSYS;
}
static inline
return -ENOSYS;
}
static inline
-int ust_app_register_done(
int sock
)
+int ust_app_register_done(
struct ust_app *app
)
{
return -ENOSYS;
}
{
return -ENOSYS;
}
This page took
0.026369 seconds
and
4
git commands to generate.